]> git.ipfire.org Git - thirdparty/openvpn.git/commitdiff
Fixed issue where OpenVPN does not apply the --txqueuelen option
authorjames <james@e7ae566f-a301-0410-adde-c780ea21d3b5>
Thu, 9 Nov 2006 09:49:14 +0000 (09:49 +0000)
committerjames <james@e7ae566f-a301-0410-adde-c780ea21d3b5>
Thu, 9 Nov 2006 09:49:14 +0000 (09:49 +0000)
to persistent interfaces made with --mktun (Roy Marples).

git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@1447 e7ae566f-a301-0410-adde-c780ea21d3b5

init.c
tun.c
tun.h

diff --git a/init.c b/init.c
index 1712cb29c1c52a54087f0b1eb7e7c5f89238ce78..2eb18962a4be0fa81ee14c894c78cf273be14263 100644 (file)
--- a/init.c
+++ b/init.c
@@ -425,7 +425,8 @@ do_persist_tuntap (const struct options *options)
        msg (M_FATAL|M_OPTERR,
             "options --mktun or --rmtun should only be used together with --dev");
       tuncfg (options->dev, options->dev_type, options->dev_node,
-             options->tun_ipv6, options->persist_mode);
+             options->tun_ipv6, options->persist_mode,
+             &options->tuntap_options);
       if (options->persist_mode && options->lladdr)
         set_lladdr(options->dev, options->lladdr, NULL);
       return true;
diff --git a/tun.c b/tun.c
index 3166b32edd61c5d057d15f61aafa8a2187e5cdef..abfd760ed5c7f5b07d033a42f1a613b19f5020c0 100644 (file)
--- a/tun.c
+++ b/tun.c
@@ -1163,13 +1163,14 @@ open_tun (const char *dev, const char *dev_type, const char *dev_node, bool ipv6
 #ifdef TUNSETPERSIST
 
 void
-tuncfg (const char *dev, const char *dev_type, const char *dev_node, bool ipv6, int persist_mode)
+tuncfg (const char *dev, const char *dev_type, const char *dev_node, bool ipv6, int persist_mode, const struct tuntap_options *options)
 {
   struct tuntap *tt;
 
   ALLOC_OBJ (tt, struct tuntap);
   clear_tuntap (tt);
   tt->type = dev_type_enum (dev, dev_type);
+  tt->options = *options;
   open_tun (dev, dev_type, dev_node, ipv6, tt);
   if (ioctl (tt->fd, TUNSETPERSIST, persist_mode) < 0)
     msg (M_ERR, "Cannot ioctl TUNSETPERSIST(%d) %s", persist_mode, dev);
diff --git a/tun.h b/tun.h
index 508e4a59717563bc0c6c8ea0143c940341667cb3..4d66533459326bf8df9349fc79de091c332aa0a8 100644 (file)
--- a/tun.h
+++ b/tun.h
@@ -204,7 +204,7 @@ int write_tun (struct tuntap* tt, uint8_t *buf, int len);
 int read_tun (struct tuntap* tt, uint8_t *buf, int len);
 
 void tuncfg (const char *dev, const char *dev_type, const char *dev_node,
-            bool ipv6, int persist_mode);
+            bool ipv6, int persist_mode, const struct tuntap_options *options);
 
 const char *guess_tuntap_dev (const char *dev,
                              const char *dev_type,