~ubuntu-branches/ubuntu/saucy/openvpn/saucy-proposed

« back to all changes in this revision

Viewing changes to debian/patches/ipv6-payload.patch

  • Committer: Package Import Robot
  • Author(s): Chuck Short
  • Date: 2011-12-31 04:55:56 UTC
  • mfrom: (1.1.18) (10.2.16 sid)
  • Revision ID: package-import@ubuntu.com-20111231045556-3fwmrbggevr9iqxd
Tags: 2.2.1-3ubuntu1
* Merge from Debian testing.  Remaining changes:
 + debian/openvpn.init.d:
    - Do not use start-stop-daemon and </dev/null to avoid blocking boot.
    - Show per-VPN result messages.
    - Add "--script-security 2" by default for backwards compatabliity.
  + debian/control: Add lsb-base >= 3.2-14 to allow status_of_proc()
  + debian/update-resolv-conf: Support multiple domains.
  + fix bug where '--script-security 2' would be passed for all
    daemons after the first. (LP: #794916)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
Description: IPv6 payload support
2
2
Author: Gert Döring
3
3
URL: http://www.greenie.net/ipv6/openvpn.html
4
 
Index: openvpn-2.2.0/ChangeLog.IPv6
 
4
Index: openvpn-2.2.1/ChangeLog.IPv6
5
5
===================================================================
6
6
--- /dev/null   1970-01-01 00:00:00.000000000 +0000
7
 
+++ openvpn-2.2.0/ChangeLog.IPv6        2011-05-10 17:06:44.356002136 +0200
 
7
+++ openvpn-2.2.1/ChangeLog.IPv6        2011-12-13 12:24:54.608739565 +0100
8
8
@@ -0,0 +1,394 @@
9
9
+Do 31. Dez 15:32:40 CET 2009 Gert Doering
10
10
+
400
400
+
401
401
+  * TEST SUCCESS: Linux/iproute2: client-tun/net30+subnet, v4+v6
402
402
+
403
 
Index: openvpn-2.2.0/README.IPv6
 
403
Index: openvpn-2.2.1/README.IPv6
404
404
===================================================================
405
405
--- /dev/null   1970-01-01 00:00:00.000000000 +0000
406
 
+++ openvpn-2.2.0/README.IPv6   2011-05-10 17:06:44.356002136 +0200
 
406
+++ openvpn-2.2.1/README.IPv6   2011-12-13 12:24:54.608739565 +0100
407
407
@@ -0,0 +1,8 @@
408
408
+This is an experimentally patched version of OpenVPN 2.1 with IPv6
409
409
+payload support.
413
413
+  http://www.greenie.net/ipv6/openvpn.html
414
414
+
415
415
+Gert Doering, 31.12.2009
416
 
Index: openvpn-2.2.0/TODO.IPv6
 
416
Index: openvpn-2.2.1/TODO.IPv6
417
417
===================================================================
418
418
--- /dev/null   1970-01-01 00:00:00.000000000 +0000
419
 
+++ openvpn-2.2.0/TODO.IPv6     2011-05-10 17:06:44.356002136 +0200
 
419
+++ openvpn-2.2.1/TODO.IPv6     2011-12-13 12:24:54.609739553 +0100
420
420
@@ -0,0 +1,149 @@
421
421
+known issues for IPv6 payload support in OpenVPN
422
422
+-----------------------------------------------
567
567
+    to the config
568
568
+
569
569
+    (problem + workaround applies both to tun and tap style devices)
570
 
Index: openvpn-2.2.0/forward.c
 
570
Index: openvpn-2.2.1/forward.c
571
571
===================================================================
572
 
--- openvpn-2.2.0.orig/forward.c        2011-05-10 17:05:51.000000000 +0200
573
 
+++ openvpn-2.2.0/forward.c     2011-05-10 17:06:44.356002136 +0200
 
572
--- openvpn-2.2.1.orig/forward.c        2011-06-24 08:13:38.000000000 +0200
 
573
+++ openvpn-2.2.1/forward.c     2011-12-13 12:24:54.611739529 +0100
574
574
@@ -262,7 +262,8 @@
575
575
 static void
576
576
 check_add_routes_action (struct context *c, const bool errors)
581
581
   update_time ();
582
582
   event_timeout_clear (&c->c2.route_wakeup);
583
583
   event_timeout_clear (&c->c2.route_wakeup_expire);
584
 
Index: openvpn-2.2.0/helper.c
 
584
Index: openvpn-2.2.1/helper.c
585
585
===================================================================
586
 
--- openvpn-2.2.0.orig/helper.c 2011-05-10 17:05:51.000000000 +0200
587
 
+++ openvpn-2.2.0/helper.c      2011-05-10 17:06:44.356002136 +0200
 
586
--- openvpn-2.2.1.orig/helper.c 2011-06-24 08:13:38.000000000 +0200
 
587
+++ openvpn-2.2.1/helper.c      2011-12-13 12:24:54.612739516 +0100
588
588
@@ -142,6 +142,55 @@
589
589
 
590
590
 #if P2MP
641
641
   /*
642
642
    *
643
643
    * HELPER DIRECTIVE:
644
 
Index: openvpn-2.2.0/init.c
 
644
Index: openvpn-2.2.1/init.c
645
645
===================================================================
646
 
--- openvpn-2.2.0.orig/init.c   2011-05-10 17:05:51.000000000 +0200
647
 
+++ openvpn-2.2.0/init.c        2011-05-10 17:06:44.356002136 +0200
 
646
--- openvpn-2.2.1.orig/init.c   2011-12-13 12:23:07.000000000 +0100
 
647
+++ openvpn-2.2.1/init.c        2011-12-13 12:24:54.615739477 +0100
648
648
@@ -843,7 +843,7 @@
649
649
        msg (M_FATAL|M_OPTERR,
650
650
             "options --mktun or --rmtun should only be used together with --dev");
782
782
 
783
783
          /* actually close tun/tap device based on --down-pre flag */
784
784
          if (!c->options.down_pre)
785
 
Index: openvpn-2.2.0/init.h
 
785
Index: openvpn-2.2.1/init.h
786
786
===================================================================
787
 
--- openvpn-2.2.0.orig/init.h   2011-05-10 17:05:51.000000000 +0200
788
 
+++ openvpn-2.2.0/init.h        2011-05-10 17:06:44.356002136 +0200
 
787
--- openvpn-2.2.1.orig/init.h   2011-06-24 08:13:38.000000000 +0200
 
788
+++ openvpn-2.2.1/init.h        2011-12-13 12:24:54.615739477 +0100
789
789
@@ -63,6 +63,7 @@
790
790
 
791
791
 void do_route (const struct options *options,
794
794
               const struct tuntap *tt,
795
795
               const struct plugin_list *plugins,
796
796
               struct env_set *es);
797
 
Index: openvpn-2.2.0/misc.c
 
797
Index: openvpn-2.2.1/misc.c
798
798
===================================================================
799
 
--- openvpn-2.2.0.orig/misc.c   2011-05-10 17:05:51.000000000 +0200
800
 
+++ openvpn-2.2.0/misc.c        2011-05-10 17:06:44.356002136 +0200
 
799
--- openvpn-2.2.1.orig/misc.c   2011-06-24 08:13:38.000000000 +0200
 
800
+++ openvpn-2.2.1/misc.c        2011-12-13 12:24:54.617739452 +0100
801
801
@@ -1001,7 +1001,9 @@
802
802
        {
803
803
          const char *str = construct_name_value (name_tmp, val_tmp, &gc);
809
809
        }
810
810
       else
811
811
        env_set_del (es, name_tmp);
812
 
Index: openvpn-2.2.0/mroute.c
 
812
Index: openvpn-2.2.1/mroute.c
813
813
===================================================================
814
 
--- openvpn-2.2.0.orig/mroute.c 2011-05-10 17:05:52.000000000 +0200
815
 
+++ openvpn-2.2.0/mroute.c      2011-05-10 17:06:44.360002121 +0200
 
814
--- openvpn-2.2.1.orig/mroute.c 2011-12-13 12:23:07.000000000 +0100
 
815
+++ openvpn-2.2.1/mroute.c      2011-12-13 12:24:54.618739440 +0100
816
816
@@ -88,12 +88,33 @@
817
817
     }
818
818
 }
998
998
 
999
999
 void
1000
1000
 mroute_helper_free (struct mroute_helper *mh)
1001
 
Index: openvpn-2.2.0/mroute.h
 
1001
Index: openvpn-2.2.1/mroute.h
1002
1002
===================================================================
1003
 
--- openvpn-2.2.0.orig/mroute.h 2011-05-10 17:05:52.000000000 +0200
1004
 
+++ openvpn-2.2.0/mroute.h      2011-05-10 17:06:44.360002121 +0200
 
1003
--- openvpn-2.2.1.orig/mroute.h 2011-06-24 08:13:38.000000000 +0200
 
1004
+++ openvpn-2.2.1/mroute.h      2011-12-13 12:24:54.618739440 +0100
1005
1005
@@ -85,7 +85,7 @@
1006
1006
 /*
1007
1007
  * Number of bits in an address.  Should be raised for IPv6.
1020
1020
 
1021
1021
 /*
1022
1022
  * Given a raw packet in buf, return the src and dest
1023
 
Index: openvpn-2.2.0/multi.c
 
1023
Index: openvpn-2.2.1/multi.c
1024
1024
===================================================================
1025
 
--- openvpn-2.2.0.orig/multi.c  2011-05-10 17:05:51.000000000 +0200
1026
 
+++ openvpn-2.2.0/multi.c       2011-05-10 17:06:44.360002121 +0200
 
1025
--- openvpn-2.2.1.orig/multi.c  2011-12-13 12:23:07.000000000 +0100
 
1026
+++ openvpn-2.2.1/multi.c       2011-12-13 12:24:54.621739404 +0100
1027
1027
@@ -316,25 +316,18 @@
1028
1028
    */
1029
1029
   if (t->options.ifconfig_pool_defined)
1260
1260
              /* add routes locally, pointing to new client, if
1261
1261
                 --iroute options have been specified */
1262
1262
              multi_add_iroutes (m, mi);
1263
 
Index: openvpn-2.2.0/openvpn.8
 
1263
Index: openvpn-2.2.1/openvpn.8
1264
1264
===================================================================
1265
 
--- openvpn-2.2.0.orig/openvpn.8        2011-05-10 17:06:06.000000000 +0200
1266
 
+++ openvpn-2.2.0/openvpn.8     2011-05-10 17:06:44.360002121 +0200
1267
 
@@ -789,6 +789,8 @@
 
1265
--- openvpn-2.2.1.orig/openvpn.8        2011-12-13 12:24:20.000000000 +0100
 
1266
+++ openvpn-2.2.1/openvpn.8     2011-12-13 12:24:54.628739315 +0100
 
1267
@@ -794,6 +794,8 @@
1268
1268
 .B \-\-dev tunX.
1269
1269
 A warning will be displayed
1270
1270
 if no specific IPv6 TUN support for your OS has been compiled into OpenVPN.
1273
1273
 .\"*********************************************************
1274
1274
 .TP
1275
1275
 .B \-\-dev-node node
1276
 
@@ -4936,6 +4938,57 @@
 
1276
@@ -4949,6 +4951,57 @@
1277
1277
 .B \-\-verb
1278
1278
 option can be used BEFORE this option to produce debugging information.
1279
1279
 .\"*********************************************************
1331
1331
 .SH SCRIPTING AND ENVIRONMENTAL VARIABLES
1332
1332
 OpenVPN exports a series
1333
1333
 of environmental variables for use by user-defined scripts.
1334
 
Index: openvpn-2.2.0/openvpn.h
 
1334
Index: openvpn-2.2.1/openvpn.h
1335
1335
===================================================================
1336
 
--- openvpn-2.2.0.orig/openvpn.h        2011-05-10 17:05:51.000000000 +0200
1337
 
+++ openvpn-2.2.0/openvpn.h     2011-05-10 17:06:44.360002121 +0200
 
1336
--- openvpn-2.2.1.orig/openvpn.h        2011-06-24 08:13:39.000000000 +0200
 
1337
+++ openvpn-2.2.1/openvpn.h     2011-12-13 12:24:54.629739303 +0100
1338
1338
@@ -165,6 +165,9 @@
1339
1339
   /* list of --route directives */
1340
1340
   struct route_list *route_list;
1357
1357
   /* client authentication state, CAS_SUCCEEDED must be 0 */
1358
1358
 # define CAS_SUCCEEDED 0
1359
1359
 # define CAS_PENDING   1
1360
 
Index: openvpn-2.2.0/options.c
 
1360
Index: openvpn-2.2.1/options.c
1361
1361
===================================================================
1362
 
--- openvpn-2.2.0.orig/options.c        2011-05-10 17:05:57.000000000 +0200
1363
 
+++ openvpn-2.2.0/options.c     2011-05-10 17:07:53.032011405 +0200
 
1362
--- openvpn-2.2.1.orig/options.c        2011-12-13 12:23:07.000000000 +0100
 
1363
+++ openvpn-2.2.1/options.c     2011-12-13 12:24:54.635739227 +0100
1364
1364
@@ -85,6 +85,7 @@
1365
1365
 #ifdef USE_PF_INET6
1366
1366
   " [PF_INET6]"
1369
1369
   " built on " __DATE__
1370
1370
 ;
1371
1371
 
1372
 
@@ -180,6 +181,8 @@
 
1372
@@ -181,6 +182,8 @@
1373
1373
   "                  addresses outside of the subnets used by either peer.\n"
1374
1374
   "                  TAP: configure device to use IP address l as a local\n"
1375
1375
   "                  endpoint and rn as a subnet mask.\n"
1378
1378
   "--ifconfig-noexec : Don't actually execute ifconfig/netsh command, instead\n"
1379
1379
   "                    pass --ifconfig parms by environment to scripts.\n"
1380
1380
   "--ifconfig-nowarn : Don't warn if the --ifconfig option on this side of the\n"
1381
 
@@ -190,6 +193,10 @@
 
1381
@@ -191,6 +194,10 @@
1382
1382
   "                  netmask default: 255.255.255.255\n"
1383
1383
   "                  gateway default: taken from --route-gateway or --ifconfig\n"
1384
1384
   "                  Specify default by leaving blank or setting to \"nil\".\n"
1389
1389
   "--max-routes n :  Specify the maximum number of routes that may be defined\n"
1390
1390
   "                  or pulled from a server.\n"
1391
1391
   "--route-gateway gw|'dhcp' : Specify a default gateway for use with --route.\n"
1392
 
@@ -378,6 +385,7 @@
 
1392
@@ -379,6 +386,7 @@
1393
1393
   "\n"
1394
1394
   "Multi-Client Server options (when --mode server is used):\n"
1395
1395
   "--server network netmask : Helper option to easily configure server mode.\n"
1397
1397
   "--server-bridge [IP netmask pool-start-IP pool-end-IP] : Helper option to\n"
1398
1398
   "                    easily configure ethernet bridging server mode.\n"
1399
1399
   "--push \"option\" : Push a config file option back to the peer for remote\n"
1400
 
@@ -391,10 +399,16 @@
 
1400
@@ -392,10 +400,16 @@
1401
1401
   "--ifconfig-pool-persist file [seconds] : Persist/unpersist ifconfig-pool\n"
1402
1402
   "                  data to file, at seconds intervals (default=600).\n"
1403
1403
   "                  If seconds=0, file will be treated as read-only.\n"
1414
1414
   "                  Sets up internal routes only.\n"
1415
1415
   "                  Only valid in a client-specific config file.\n"
1416
1416
   "--disable       : Client is disabled.\n"
1417
 
@@ -879,6 +893,78 @@
 
1417
@@ -880,6 +894,78 @@
1418
1418
   return ret;
1419
1419
 }
1420
1420
 
1493
1493
 static char *
1494
1494
 string_substitute (const char *src, int from, int to, struct gc_arena *gc)
1495
1495
 {
1496
 
@@ -997,6 +1083,8 @@
 
1496
@@ -998,6 +1084,8 @@
1497
1497
 #if P2MP_SERVER
1498
1498
   msg (D_SHOW_PARMS, "  server_network = %s", print_in_addr_t (o->server_network, 0, &gc));
1499
1499
   msg (D_SHOW_PARMS, "  server_netmask = %s", print_in_addr_t (o->server_netmask, 0, &gc));
1502
1502
   msg (D_SHOW_PARMS, "  server_bridge_ip = %s", print_in_addr_t (o->server_bridge_ip, 0, &gc));
1503
1503
   msg (D_SHOW_PARMS, "  server_bridge_netmask = %s", print_in_addr_t (o->server_bridge_netmask, 0, &gc));
1504
1504
   msg (D_SHOW_PARMS, "  server_bridge_pool_start = %s", print_in_addr_t (o->server_bridge_pool_start, 0, &gc));
1505
 
@@ -1017,6 +1105,9 @@
 
1505
@@ -1018,6 +1106,9 @@
1506
1506
   msg (D_SHOW_PARMS, "  ifconfig_pool_netmask = %s", print_in_addr_t (o->ifconfig_pool_netmask, 0, &gc));
1507
1507
   SHOW_STR (ifconfig_pool_persist_filename);
1508
1508
   SHOW_INT (ifconfig_pool_persist_refresh_freq);
1512
1512
   SHOW_INT (n_bcast_buf);
1513
1513
   SHOW_INT (tcp_queue_limit);
1514
1514
   SHOW_INT (real_hash_size);
1515
 
@@ -1030,6 +1121,9 @@
 
1515
@@ -1031,6 +1122,9 @@
1516
1516
   SHOW_BOOL (push_ifconfig_defined);
1517
1517
   msg (D_SHOW_PARMS, "  push_ifconfig_local = %s", print_in_addr_t (o->push_ifconfig_local, 0, &gc));
1518
1518
   msg (D_SHOW_PARMS, "  push_ifconfig_remote_netmask = %s", print_in_addr_t (o->push_ifconfig_remote_netmask, 0, &gc));
1522
1522
   SHOW_BOOL (enable_c2c);
1523
1523
   SHOW_BOOL (duplicate_cn);
1524
1524
   SHOW_INT (cf_max);
1525
 
@@ -1084,6 +1178,25 @@
 
1525
@@ -1085,6 +1179,25 @@
1526
1526
   o->iroutes = ir;
1527
1527
 }
1528
1528
 
1548
1548
 #endif /* P2MP_SERVER */
1549
1549
 #endif /* P2MP */
1550
1550
 
1551
 
@@ -1121,6 +1234,13 @@
 
1551
@@ -1122,6 +1235,13 @@
1552
1552
     options->routes = new_route_option_list (options->max_routes, &options->gc);
1553
1553
 }
1554
1554
 
1562
1562
 #ifdef ENABLE_DEBUG
1563
1563
 static void
1564
1564
 show_connection_entry (const struct connection_entry *o)
1565
 
@@ -1211,6 +1331,9 @@
 
1565
@@ -1212,6 +1332,9 @@
1566
1566
   SHOW_STR (ifconfig_remote_netmask);
1567
1567
   SHOW_BOOL (ifconfig_noexec);
1568
1568
   SHOW_BOOL (ifconfig_nowarn);
1572
1572
 
1573
1573
 #ifdef HAVE_GETTIMEOFDAY
1574
1574
   SHOW_INT (shaper);
1575
 
@@ -1914,8 +2037,10 @@
 
1575
@@ -1915,8 +2038,10 @@
1576
1576
       if (options->connection_list)
1577
1577
        msg (M_USAGE, "<connection> cannot be used with --mode server");
1578
1578
 #endif
1583
1583
       if (options->shaper)
1584
1584
        msg (M_USAGE, "--shaper cannot be used with --mode server");
1585
1585
       if (options->inetd)
1586
 
@@ -1948,6 +2073,11 @@
 
1586
@@ -1949,6 +2074,11 @@
1587
1587
        msg (M_USAGE, "--up-delay cannot be used with --mode server");
1588
1588
       if (!options->ifconfig_pool_defined && options->ifconfig_pool_persist_filename)
1589
1589
        msg (M_USAGE, "--ifconfig-pool-persist must be used with --ifconfig-pool");
1595
1595
       if (options->auth_user_pass_file)
1596
1596
        msg (M_USAGE, "--auth-user-pass cannot be used with --mode server (it should be used on the client side only)");
1597
1597
       if (options->ccd_exclusive && !options->client_config_dir)
1598
 
@@ -1979,6 +2109,8 @@
 
1598
@@ -1980,6 +2110,8 @@
1599
1599
        */
1600
1600
       if (options->ifconfig_pool_defined || options->ifconfig_pool_persist_filename)
1601
1601
        msg (M_USAGE, "--ifconfig-pool/--ifconfig-pool-persist requires --mode server");
1604
1604
       if (options->real_hash_size != defaults.real_hash_size
1605
1605
          || options->virtual_hash_size != defaults.virtual_hash_size)
1606
1606
        msg (M_USAGE, "--hash-size requires --mode server");
1607
 
@@ -2524,6 +2656,8 @@
 
1607
@@ -2525,6 +2657,8 @@
1608
1608
                     o->topology,
1609
1609
                     o->ifconfig_local,
1610
1610
                     o->ifconfig_remote_netmask,
1613
1613
                     (in_addr_t)0,
1614
1614
                     (in_addr_t)0,
1615
1615
                     false,
1616
 
@@ -3849,6 +3983,30 @@
 
1616
@@ -3850,6 +3984,30 @@
1617
1617
          goto err;
1618
1618
        }
1619
1619
     }
1644
1644
   else if (streq (p[0], "ifconfig-noexec"))
1645
1645
     {
1646
1646
       VERIFY_PERMISSION (OPT_P_UP);
1647
 
@@ -4649,6 +4807,26 @@
 
1647
@@ -4650,6 +4808,26 @@
1648
1648
        }
1649
1649
       add_route_to_option_list (options->routes, p[1], p[2], p[3], p[4]);
1650
1650
     }
1671
1671
   else if (streq (p[0], "max-routes") && p[1])
1672
1672
     {
1673
1673
       int max_routes;
1674
 
@@ -4860,6 +5038,33 @@
 
1674
@@ -4861,6 +5039,33 @@
1675
1675
            }
1676
1676
        }
1677
1677
     }
1705
1705
   else if (streq (p[0], "server-bridge") && p[1] && p[2] && p[3] && p[4])
1706
1706
     {
1707
1707
       const int lev = M_WARN;
1708
 
@@ -4944,6 +5149,28 @@
 
1708
@@ -4945,6 +5150,28 @@
1709
1709
       VERIFY_PERMISSION (OPT_P_GENERAL);
1710
1710
       options->topology = TOP_P2P;
1711
1711
     }
1734
1734
   else if (streq (p[0], "hash-size") && p[1] && p[2])
1735
1735
     {
1736
1736
       int real, virtual;
1737
 
@@ -5139,6 +5366,11 @@
 
1737
@@ -5140,6 +5367,11 @@
1738
1738
        }
1739
1739
       option_iroute (options, p[1], netmask, msglevel);
1740
1740
     }
1746
1746
   else if (streq (p[0], "ifconfig-push") && p[1] && p[2])
1747
1747
     {
1748
1748
       in_addr_t local, remote_netmask;
1749
 
@@ -5177,6 +5409,43 @@
 
1749
@@ -5178,6 +5410,43 @@
1750
1750
          goto err;
1751
1751
        }
1752
1752
     }
1790
1790
   else if (streq (p[0], "disable"))
1791
1791
     {
1792
1792
       VERIFY_PERMISSION (OPT_P_INSTANCE);
1793
 
Index: openvpn-2.2.0/options.h
 
1793
Index: openvpn-2.2.1/options.h
1794
1794
===================================================================
1795
 
--- openvpn-2.2.0.orig/options.h        2011-05-10 17:05:51.000000000 +0200
1796
 
+++ openvpn-2.2.0/options.h     2011-05-10 17:06:44.368002238 +0200
 
1795
--- openvpn-2.2.1.orig/options.h        2011-06-24 08:13:39.000000000 +0200
 
1796
+++ openvpn-2.2.1/options.h     2011-12-13 12:24:54.636739214 +0100
1797
1797
@@ -205,6 +205,9 @@
1798
1798
   int topology; /* one of the TOP_x values from proto.h */
1799
1799
   const char *ifconfig_local;
1812
1812
   bool route_nopull;
1813
1813
   bool route_gateway_via_dhcp;
1814
1814
   bool allow_pull_fqdn; /* as a client, allow server to push a FQDN for certain parameters */
1815
 
@@ -361,6 +365,9 @@
 
1815
@@ -363,6 +367,9 @@
1816
1816
   bool server_defined;
1817
1817
   in_addr_t server_network;
1818
1818
   in_addr_t server_netmask;
1822
1822
 
1823
1823
 # define SF_NOPOOL (1<<0)
1824
1824
 # define SF_TCP_NODELAY_HELPER (1<<1)
1825
 
@@ -382,6 +389,11 @@
 
1825
@@ -384,6 +391,11 @@
1826
1826
   in_addr_t ifconfig_pool_netmask;
1827
1827
   const char *ifconfig_pool_persist_filename;
1828
1828
   int ifconfig_pool_persist_refresh_freq;
1834
1834
   int real_hash_size;
1835
1835
   int virtual_hash_size;
1836
1836
   const char *client_connect_script;
1837
 
@@ -394,12 +406,17 @@
 
1837
@@ -395,12 +407,17 @@
1838
1838
   int n_bcast_buf;
1839
1839
   int tcp_queue_limit;
1840
1840
   struct iroute *iroutes;
1852
1852
   bool enable_c2c;
1853
1853
   bool duplicate_cn;
1854
1854
   int cf_max;
1855
 
@@ -722,6 +739,10 @@
 
1855
@@ -723,6 +740,10 @@
1856
1856
                            unsigned int *option_types_found,
1857
1857
                            struct env_set *es);
1858
1858
 
1863
1863
 /*
1864
1864
  * inline functions
1865
1865
  */
1866
 
Index: openvpn-2.2.0/pool.c
 
1866
Index: openvpn-2.2.1/pool.c
1867
1867
===================================================================
1868
 
--- openvpn-2.2.0.orig/pool.c   2011-05-10 17:05:51.000000000 +0200
1869
 
+++ openvpn-2.2.0/pool.c        2011-05-10 17:06:44.368002238 +0200
 
1868
--- openvpn-2.2.1.orig/pool.c   2011-06-24 08:13:39.000000000 +0200
 
1869
+++ openvpn-2.2.1/pool.c        2011-12-13 12:24:54.637739202 +0100
1870
1870
@@ -132,7 +132,10 @@
1871
1871
 }
1872
1872
 
2015
2015
       if (h < 0)
2016
2016
        break;
2017
2017
       msg (M_INFO | M_NOPREFIX, "IFCONFIG_POOL TEST pass 3: l=%s r=%s cn=%s",
2018
 
Index: openvpn-2.2.0/pool.h
 
2018
Index: openvpn-2.2.1/pool.h
2019
2019
===================================================================
2020
 
--- openvpn-2.2.0.orig/pool.h   2011-05-10 17:05:52.000000000 +0200
2021
 
+++ openvpn-2.2.0/pool.h        2011-05-10 17:06:44.368002238 +0200
 
2020
--- openvpn-2.2.1.orig/pool.h   2011-06-24 08:13:39.000000000 +0200
 
2021
+++ openvpn-2.2.1/pool.h        2011-12-13 12:24:54.637739202 +0100
2022
2022
@@ -52,6 +52,9 @@
2023
2023
   int size;
2024
2024
   int type;
2045
2045
 
2046
2046
 bool ifconfig_pool_release (struct ifconfig_pool* pool, ifconfig_pool_handle hand, const bool hard);
2047
2047
 
2048
 
Index: openvpn-2.2.0/proto.h
 
2048
Index: openvpn-2.2.1/proto.h
2049
2049
===================================================================
2050
 
--- openvpn-2.2.0.orig/proto.h  2011-05-10 17:05:51.000000000 +0200
2051
 
+++ openvpn-2.2.0/proto.h       2011-05-10 17:06:44.368002238 +0200
 
2050
--- openvpn-2.2.1.orig/proto.h  2011-06-24 08:13:39.000000000 +0200
 
2051
+++ openvpn-2.2.1/proto.h       2011-12-13 12:24:54.638739190 +0100
2052
2052
@@ -108,6 +108,21 @@
2053
2053
 };
2054
2054
 
2071
2071
  * UDP header
2072
2072
  */
2073
2073
 struct openvpn_udphdr {
2074
 
Index: openvpn-2.2.0/push.c
 
2074
Index: openvpn-2.2.1/push.c
2075
2075
===================================================================
2076
 
--- openvpn-2.2.0.orig/push.c   2011-05-10 17:05:51.000000000 +0200
2077
 
+++ openvpn-2.2.0/push.c        2011-05-10 17:06:44.368002238 +0200
 
2076
--- openvpn-2.2.1.orig/push.c   2011-06-24 08:13:39.000000000 +0200
 
2077
+++ openvpn-2.2.1/push.c        2011-12-13 12:24:54.638739190 +0100
2078
2078
@@ -189,8 +189,26 @@
2079
2079
   const int safe_cap = BCAP (&buf) - extra;
2080
2080
   bool push_sent = false;
2102
2102
   while (e)
2103
2103
     {
2104
2104
       if (e->enable)
2105
 
Index: openvpn-2.2.0/route.c
 
2105
Index: openvpn-2.2.1/route.c
2106
2106
===================================================================
2107
 
--- openvpn-2.2.0.orig/route.c  2011-05-10 17:06:07.000000000 +0200
2108
 
+++ openvpn-2.2.0/route.c       2011-05-10 17:06:44.368002238 +0200
 
2107
--- openvpn-2.2.1.orig/route.c  2011-12-13 12:24:33.000000000 +0100
 
2108
+++ openvpn-2.2.1/route.c       2011-12-13 12:24:54.641739154 +0100
2109
2109
@@ -35,10 +35,12 @@
2110
2110
 #include "socket.h"
2111
2111
 #include "manage.h"
2260
2260
 route_list_add_default_gateway (struct route_list *rl,
2261
2261
                                struct env_set *es,
2262
2262
                                const in_addr_t addr)
2263
 
@@ -471,6 +579,72 @@
 
2263
@@ -469,6 +577,72 @@
2264
2264
   return ret;
2265
2265
 }
2266
2266
 
2333
2333
 static void
2334
2334
 add_route3 (in_addr_t network,
2335
2335
            in_addr_t netmask,
2336
 
@@ -716,10 +890,13 @@
 
2336
@@ -714,10 +888,13 @@
2337
2337
 }
2338
2338
 
2339
2339
 void
2350
2350
     {
2351
2351
       int i;
2352
2352
 
2353
 
@@ -744,12 +921,27 @@
 
2353
@@ -742,12 +919,27 @@
2354
2354
        }
2355
2355
       rl->routes_added = true;
2356
2356
     }
2380
2380
     {
2381
2381
       int i;
2382
2382
       for (i = rl->n - 1; i >= 0; --i)
2383
 
@@ -759,9 +951,28 @@
 
2383
@@ -757,9 +949,28 @@
2384
2384
        }
2385
2385
       rl->routes_added = false;
2386
2386
     }
2411
2411
 }
2412
2412
 
2413
2413
 #ifdef ENABLE_DEBUG
2414
 
@@ -844,6 +1055,34 @@
 
2414
@@ -842,6 +1053,34 @@
2415
2415
     setenv_route (es, &rl->routes[i], i + 1);
2416
2416
 }
2417
2417
 
2446
2446
 void
2447
2447
 add_route (struct route *r, const struct tuntap *tt, unsigned int flags, const struct env_set *es)
2448
2448
 {
2449
 
@@ -1037,6 +1276,176 @@
 
2449
@@ -1035,6 +1274,176 @@
2450
2450
   gc_free (&gc);
2451
2451
 }
2452
2452
 
2623
2623
 static void
2624
2624
 delete_route (const struct route *r, const struct tuntap *tt, unsigned int flags, const struct env_set *es)
2625
2625
 {
2626
 
@@ -1173,6 +1582,142 @@
 
2626
@@ -1171,6 +1580,142 @@
2627
2627
 #endif
2628
2628
 
2629
2629
   argv_reset (&argv);
2766
2766
   gc_free (&gc);
2767
2767
 }
2768
2768
 
2769
 
Index: openvpn-2.2.0/route.h
 
2769
Index: openvpn-2.2.1/route.h
2770
2770
===================================================================
2771
 
--- openvpn-2.2.0.orig/route.h  2011-05-10 17:05:51.000000000 +0200
2772
 
+++ openvpn-2.2.0/route.h       2011-05-10 17:06:44.372002310 +0200
 
2771
--- openvpn-2.2.1.orig/route.h  2011-06-24 08:13:39.000000000 +0200
 
2772
+++ openvpn-2.2.1/route.h       2011-12-13 12:24:54.642739141 +0100
2773
2773
@@ -92,6 +92,19 @@
2774
2774
   struct route_option routes[EMPTY_ARRAY_SIZE];
2775
2775
 };
2890
2890
 
2891
2891
 bool is_special_addr (const char *addr_str);
2892
2892
 
2893
 
Index: openvpn-2.2.0/socket.c
 
2893
Index: openvpn-2.2.1/socket.c
2894
2894
===================================================================
2895
 
--- openvpn-2.2.0.orig/socket.c 2011-05-10 17:05:51.000000000 +0200
2896
 
+++ openvpn-2.2.0/socket.c      2011-05-10 17:06:44.372002310 +0200
 
2895
--- openvpn-2.2.1.orig/socket.c 2011-12-13 12:23:07.000000000 +0100
 
2896
+++ openvpn-2.2.1/socket.c      2011-12-13 12:24:54.645739102 +0100
2897
2897
@@ -543,6 +543,24 @@
2898
2898
   }
2899
2899
 }
3034
3034
 int
3035
3035
 socket_recv_queue (struct link_socket *sock, int maxsize)
3036
3036
 {
3037
 
Index: openvpn-2.2.0/socket.h
 
3037
Index: openvpn-2.2.1/socket.h
3038
3038
===================================================================
3039
 
--- openvpn-2.2.0.orig/socket.h 2011-05-10 17:05:51.000000000 +0200
3040
 
+++ openvpn-2.2.0/socket.h      2011-05-10 17:06:44.372002310 +0200
 
3039
--- openvpn-2.2.1.orig/socket.h 2011-12-13 12:23:07.000000000 +0100
 
3040
+++ openvpn-2.2.1/socket.h      2011-12-13 12:24:54.646739089 +0100
3041
3041
@@ -368,6 +368,8 @@
3042
3042
 #define IA_EMPTY_IF_UNDEF (1<<0)
3043
3043
 #define IA_NET_ORDER      (1<<1)
3055
3055
 
3056
3056
 socket_descriptor_t create_socket_tcp (void);
3057
3057
 
3058
 
Index: openvpn-2.2.0/tun.c
 
3058
Index: openvpn-2.2.1/tun.c
3059
3059
===================================================================
3060
 
--- openvpn-2.2.0.orig/tun.c    2011-05-10 17:05:51.980002247 +0200
3061
 
+++ openvpn-2.2.0/tun.c 2011-05-10 17:06:44.372002310 +0200
 
3060
--- openvpn-2.2.1.orig/tun.c    2011-12-13 12:23:07.394079932 +0100
 
3061
+++ openvpn-2.2.1/tun.c 2011-12-13 12:41:30.078294479 +0100
3062
3062
@@ -56,13 +56,14 @@
3063
3063
                            const in_addr_t ip,
3064
3064
                            const in_addr_t netmask,
3511
3511
 
3512
3512
   /*
3513
3513
    * We handle --dev null specially, we do not open /dev/null for this.
3514
 
@@ -1215,13 +1445,13 @@
3515
 
       close (tt->fd);
3516
 
       tt->fd = -1;
3517
 
     }
3518
 
-  open_tun_generic (dev, dev_type, dev_node, ipv6, false, true, tt);
3519
 
+  open_tun_generic (dev, dev_type, dev_node, false, true, tt);
3520
 
 }
3521
 
 
 
3514
@@ -1212,7 +1442,7 @@
3522
3515
 #else
3523
3516
 
3524
3517
 void
3527
3520
 {
3528
3521
   ASSERT (0);
3529
3522
 }
3530
 
@@ -1231,9 +1461,9 @@
 
3523
@@ -1222,9 +1452,9 @@
3531
3524
 #else
3532
3525
 
3533
3526
 void
3539
3532
 }
3540
3533
 
3541
3534
 #endif /* HAVE_LINUX_IF_TUN_H */
3542
 
@@ -1253,7 +1483,7 @@
 
3535
@@ -1244,7 +1474,7 @@
3543
3536
 #endif
3544
3537
 
3545
3538
 void
3548
3541
 {
3549
3542
   struct tuntap *tt;
3550
3543
 
3551
 
@@ -1261,7 +1491,7 @@
 
3544
@@ -1252,7 +1482,7 @@
3552
3545
   clear_tuntap (tt);
3553
3546
   tt->type = dev_type_enum (dev, dev_type);
3554
3547
   tt->options = *options;
3557
3550
   if (ioctl (tt->fd, TUNSETPERSIST, persist_mode) < 0)
3558
3551
     msg (M_ERR, "Cannot ioctl TUNSETPERSIST(%d) %s", persist_mode, dev);
3559
3552
   if (username != NULL)
3560
 
@@ -1404,7 +1634,7 @@
 
3553
@@ -1395,7 +1625,7 @@
3561
3554
 #endif
3562
3555
 
3563
3556
 void
3566
3559
 {
3567
3560
   int if_fd, ip_muxid, arp_muxid, arp_fd, ppa = -1;
3568
3561
   struct lifreq ifr;
3569
 
@@ -1415,7 +1645,10 @@
 
3562
@@ -1406,7 +1636,10 @@
3570
3563
   bool is_tun;
3571
3564
   struct strioctl  strioc_if, strioc_ppa;
3572
3565
 
3578
3571
   memset(&ifr, 0x0, sizeof(ifr));
3579
3572
 
3580
3573
   if (tt->type == DEV_TYPE_NULL)
3581
 
@@ -1570,6 +1803,18 @@
 
3574
@@ -1561,6 +1794,18 @@
3582
3575
 {
3583
3576
   if (tt)
3584
3577
     {
3597
3590
       if (tt->ip_fd >= 0)
3598
3591
        {
3599
3592
           struct lifreq ifr;
3600
 
@@ -1622,11 +1867,20 @@
 
3593
@@ -1613,11 +1858,20 @@
3601
3594
 }
3602
3595
 
3603
3596
 static void
3619
3612
   argv_printf (&argv,
3620
3613
                    "%s %s unplumb",
3621
3614
                    IFCONFIG_PATH,
3622
 
@@ -1683,9 +1937,9 @@
 
3615
@@ -1674,9 +1928,9 @@
3623
3616
  */
3624
3617
 
3625
3618
 void
3631
3624
 
3632
3625
   /* Enable multicast on the interface */
3633
3626
   if (tt->fd >= 0)
3634
 
@@ -1708,12 +1962,31 @@
 
3627
@@ -1699,12 +1953,31 @@
3635
3628
     }
3636
3629
 }
3637
3630
 
3663
3656
       free (tt);
3664
3657
     }
3665
3658
 }
3666
 
@@ -1776,33 +2049,51 @@
 
3659
@@ -1767,33 +2040,51 @@
3667
3660
 #elif defined(TARGET_NETBSD)
3668
3661
 
3669
3662
 /*
3726
3719
   if (tt)
3727
3720
     {
3728
3721
       close_tun_generic (tt);
3729
 
@@ -1810,6 +2101,65 @@
 
3722
@@ -1801,6 +2092,65 @@
3730
3723
     }
3731
3724
 }
3732
3725
 
3792
3785
 int
3793
3786
 write_tun (struct tuntap* tt, uint8_t *buf, int len)
3794
3787
 {
3795
 
@@ -1821,6 +2171,7 @@
 
3788
@@ -1812,6 +2162,7 @@
3796
3789
 {
3797
3790
     return read (tt->fd, buf, len);
3798
3791
 }
3800
3793
 
3801
3794
 #elif defined(TARGET_FREEBSD)
3802
3795
 
3803
 
@@ -1834,9 +2185,9 @@
 
3796
@@ -1825,9 +2176,9 @@
3804
3797
 }
3805
3798
 
3806
3799
 void
3812
3805
 
3813
3806
   if (tt->fd >= 0 && tt->type == DEV_TYPE_TUN)
3814
3807
     {
3815
 
@@ -1922,9 +2273,9 @@
 
3808
@@ -1913,9 +2264,9 @@
3816
3809
 }
3817
3810
 
3818
3811
 void
3824
3817
 
3825
3818
   if (tt->fd >= 0)
3826
3819
     {
3827
 
@@ -1993,6 +2344,61 @@
 
3820
@@ -1984,6 +2335,61 @@
3828
3821
     return read (tt->fd, buf, len);
3829
3822
 }
3830
3823
 
3886
3879
 #elif defined(WIN32)
3887
3880
 
3888
3881
 int
3889
 
@@ -3978,7 +4384,7 @@
 
3882
@@ -3969,7 +4375,7 @@
3890
3883
 }
3891
3884
 
3892
3885
 void
3895
3888
 {
3896
3889
   struct gc_arena gc = gc_new ();
3897
3890
   char device_path[256];
3898
 
@@ -3989,7 +4395,7 @@
 
3891
@@ -3980,7 +4386,7 @@
3899
3892
 
3900
3893
   /*netcmd_semaphore_lock ();*/
3901
3894
 
3904
3897
 
3905
3898
   if (tt->type == DEV_TYPE_NULL)
3906
3899
     {
3907
 
@@ -4111,6 +4517,16 @@
 
3900
@@ -4102,6 +4508,16 @@
3908
3901
       msg (M_FATAL, "ERROR:  This version of " PACKAGE_NAME " requires a TAP-Win32 driver that is at least version %d.%d -- If you recently upgraded your " PACKAGE_NAME " distribution, a reboot is probably required at this point to get Windows to see the new driver.",
3909
3902
           TAP_WIN32_MIN_MAJOR,
3910
3903
           TAP_WIN32_MIN_MINOR);
3921
3914
   }
3922
3915
 
3923
3916
   /* get driver MTU */
3924
 
@@ -4435,6 +4851,12 @@
 
3917
@@ -4426,6 +4842,12 @@
3925
3918
 
3926
3919
   if (tt)
3927
3920
     {
3934
3927
 #if 1
3935
3928
       if (tt->ipapi_context_defined)
3936
3929
        {
3937
 
@@ -4538,9 +4960,9 @@
 
3930
@@ -4529,9 +4951,9 @@
3938
3931
 #else /* generic */
3939
3932
 
3940
3933
 void
3946
3939
 }
3947
3940
 
3948
3941
 void
3949
 
Index: openvpn-2.2.0/tun.h
 
3942
Index: openvpn-2.2.1/tun.h
3950
3943
===================================================================
3951
 
--- openvpn-2.2.0.orig/tun.h    2011-05-10 17:05:51.000000000 +0200
3952
 
+++ openvpn-2.2.0/tun.h 2011-05-10 17:06:44.372002310 +0200
 
3944
--- openvpn-2.2.1.orig/tun.h    2011-06-24 08:13:39.000000000 +0200
 
3945
+++ openvpn-2.2.1/tun.h 2011-12-13 12:24:54.653739003 +0100
3953
3946
@@ -130,6 +130,7 @@
3954
3947
   int topology; /* one of the TOP_x values */
3955
3948
 
3996
3989
                         in_addr_t local_public,
3997
3990
                         in_addr_t remote_public,
3998
3991
                         const bool strict_warn,
3999
 
Index: openvpn-2.2.0/win32.c
 
3992
Index: openvpn-2.2.1/win32.c
4000
3993
===================================================================
4001
 
--- openvpn-2.2.0.orig/win32.c  2011-05-10 17:05:51.000000000 +0200
4002
 
+++ openvpn-2.2.0/win32.c       2011-05-10 17:06:44.376002351 +0200
 
3994
--- openvpn-2.2.1.orig/win32.c  2011-06-24 08:13:39.000000000 +0200
 
3995
+++ openvpn-2.2.1/win32.c       2011-12-13 12:24:54.654738990 +0100
4003
3996
@@ -874,16 +874,21 @@
4004
3997
 static char *
4005
3998
 env_block (const struct env_set *es)
4041
4034
       *p = '\0';
4042
4035
       return ret;
4043
4036
     }
4044
 
Index: openvpn-2.2.0/win32.h
 
4037
Index: openvpn-2.2.1/win32.h
4045
4038
===================================================================
4046
 
--- openvpn-2.2.0.orig/win32.h  2011-05-10 17:05:51.000000000 +0200
4047
 
+++ openvpn-2.2.0/win32.h       2011-05-10 17:06:44.376002351 +0200
 
4039
--- openvpn-2.2.1.orig/win32.h  2011-12-13 12:23:07.000000000 +0100
 
4040
+++ openvpn-2.2.1/win32.h       2011-12-13 12:24:54.654738990 +0100
4048
4041
@@ -272,6 +272,8 @@
4049
4042
 
4050
4043
 /* call self in a subprocess */