packages: openvpn/openvpn-ipv6_payload.patch, openvpn/openvpn.spec - ipv6_p...

jajcus jajcus at pld-linux.org
Fri Jun 1 10:53:22 CEST 2012


Author: jajcus                       Date: Fri Jun  1 08:53:22 2012 GMT
Module: packages                      Tag: HEAD
---- Log message:
- ipv6_payload bcond is back and updated, it was not quite obsolete

---- Files affected:
packages/openvpn:
   openvpn-ipv6_payload.patch (1.1 -> 1.2) , openvpn.spec (1.172 -> 1.173) 

---- Diffs:

================================================================
Index: packages/openvpn/openvpn-ipv6_payload.patch
diff -u packages/openvpn/openvpn-ipv6_payload.patch:1.1 packages/openvpn/openvpn-ipv6_payload.patch:1.2
--- packages/openvpn/openvpn-ipv6_payload.patch:1.1	Tue Apr 19 08:58:49 2011
+++ packages/openvpn/openvpn-ipv6_payload.patch	Fri Jun  1 10:53:17 2012
@@ -1,17 +1,7 @@
-diff -durN -x '*~' -x '*.orig' -x '*.rej' openvpn-2.1.4.orig/.mailmap openvpn-2.1.4/.mailmap
---- openvpn-2.1.4.orig/.mailmap	1970-01-01 01:00:00.000000000 +0100
-+++ openvpn-2.1.4/.mailmap	2011-04-19 08:39:50.000000000 +0200
-@@ -0,0 +1 @@
-+James Yonan <james at openvpn.net>      james <james at e7ae566f-a301-0410-adde-c780ea21d3b5>
-diff -durN -x '*~' -x '*.orig' -x '*.rej' openvpn-2.1.4.orig/.svncommitters openvpn-2.1.4/.svncommitters
---- openvpn-2.1.4.orig/.svncommitters	1970-01-01 01:00:00.000000000 +0100
-+++ openvpn-2.1.4/.svncommitters	2011-04-19 08:39:50.000000000 +0200
-@@ -0,0 +1 @@
-+james = James Yonan <james at openvpn.net>
-diff -durN -x '*~' -x '*.orig' -x '*.rej' openvpn-2.1.4.orig/ChangeLog.IPv6 openvpn-2.1.4/ChangeLog.IPv6
---- openvpn-2.1.4.orig/ChangeLog.IPv6	1970-01-01 01:00:00.000000000 +0100
-+++ openvpn-2.1.4/ChangeLog.IPv6	2011-04-19 08:39:50.000000000 +0200
-@@ -0,0 +1,317 @@
+diff -durN openvpn-2.2.2.orig/ChangeLog.IPv6 openvpn-2.2.2/ChangeLog.IPv6
+--- openvpn-2.2.2.orig/ChangeLog.IPv6	1970-01-01 01:00:00.000000000 +0100
++++ openvpn-2.2.2/ChangeLog.IPv6	2012-06-01 10:40:28.000000000 +0200
+@@ -0,0 +1,440 @@
 +Do 31. Dez 15:32:40 CET 2009 Gert Doering
 +
 +  * Basic IPv6 p2mp functionality implemented
@@ -329,9 +319,132 @@
 +    is older than 9.7, log warning and disable IPv6 (won't work anyway).
 +
 +  * release as patch 20100307-1
-diff -durN -x '*~' -x '*.orig' -x '*.rej' openvpn-2.1.4.orig/README.IPv6 openvpn-2.1.4/README.IPv6
---- openvpn-2.1.4.orig/README.IPv6	1970-01-01 01:00:00.000000000 +0100
-+++ openvpn-2.1.4/README.IPv6	2011-04-19 08:39:50.000000000 +0200
++
++Sat Jul 10 14:37:52 CEST 2010
++
++  * TEST SUCCESS: point-to-point tun mode with --ifconfig-ipv6 between
++                  Solaris10/sparc and Linux (Michal Ludvig)
++    (using the whiteboard tun driver on Solaris, otherwise "no IPv6")
++
++Sun Aug  8 12:30:44 CEST 2010
++
++  * route.c: split NetBSD and OpenBSD parts of add_route_ipv6() and
++             delete_route_ipv6(), implement OpenBSD variant
++             (needs "-prefixlen nn" while NetBSD uses "/nn")
++
++  * tun.c: implement IPv6 ifconfig for OpenBSD
++
++  * tun.c: destroy tunX interface at tun_close() on OpenBSD (cleanup)
++
++  * TEST SUCCESS: OpenBSD 4.7: client-tun/net30, v4+v6
++
++Thu Sep  2 21:18:32 CEST 2010
++
++  * tun.c: the TAP binary in 2.2-beta3 has the IPv6 related changes, but
++    the version number is 9.8 now -> check for 9.8, not 9.7
++
++Wed Sep 22 22:20:37 CEST 2010
++
++  * tun.c: bugfix for Linux/iproute2/"topology subnet".  Works :-)
++
++  * TEST SUCCESS: Linux/ifconfig: client-tun/net30+subnet, v4+v6
++
++  * TEST SUCCESS: Linux/iproute2: client-tun/net30+subnet, v4+v6
++
++  * options.c: tag as 20100922-1 so "allmerged" users can see IPv6 change
++
++Fri Sep 24 17:57:41 CEST 2010
++
++  * TEST SUCCESS: Linux/<both>: client-tap, v4+v6, ping6 on connected addr
++
++  * TEST FAIL: Linux/<both>: client-tap, v6, route6 (gateway missing)
++
++Do 21. Okt 19:36:49 CEST 2010
++
++  * t_client.sh.in: cherrypick commit f25fe91a40aa3f and 6f1e61b41be52 
++    (proper exit codes to signal "SKIP" if we do not want to run)
++
++So 16. Jan 17:25:23 CET 2011
++
++  * tun.c, route.c: cherrypick 121755c2cb4891f and f0eac1a5979096c67
++    (TAP driver and "topology subnet" support for Solaris)
++
++  * tun.c: add IPv6 configuration for TAP interfaces (<device>:1 inet6)
++
++  * tun.c: on close_tun on Solaris, unplumb IPv6 TUN or TAP interfaces
++
++  * TEST SUCCESS: OpenSolaris: client-tun, v4+v6
++    TEST SUCCESS: OpenSolaris: client-tap, v4+v6, ping6 on connected addr
++    TEST FAIL: OpenSolaris: client-tap, v6, route6 (gateway missing)
++
++So 24. Apr 16:51:45 CEST 2011
++
++  * rebase to "beta2.2" branch (at 2.2RC2 tag)
++
++  * mroute.c: remove mroute_helper_lock/_unlock() calls for IPv6
++  * socket.c: remove locking with L_INET_NTOA mutex
++      (all the threading stuff got removed by David Sommerseth for 2.2)
++
++  * mroute.c: remove duplicate mroute_helper_add_iroute6() and
++              mroute_helper_del_iroute6() - "git rebase" artefact
++
++  * ChangeLog.IPv6 and TODO.IPv6: add to commit
++
++  * options.c: tag as 20110424-2 (2.2RC2)
++
++  * TEST SUCCESS: Linux/ifconfig: client-tun/net30+subnet, v4+v6
++
++  * TEST SUCCESS: Linux/iproute2: client-tun/net30+subnet, v4+v6
++
++Thu Apr 28 19:10:01 CEST 2011
++
++  * rebase to "origin/release/2.2" branch (at v2.2.0 tag)
++
++Thu May 19 20:51:12 CEST 2011
++
++  * include Windows "netsh add" -> "netsh set ... store=active" patch from
++    Seth Mos, to fix restart problems on Windows due to persistant addresses
++
++  * TEST SUCCESS: Windows XP SP3: client-tun/net30, v4+v6
++
++Sat May 21 17:03:20 CEST 2011
++
++  * tun.c: Solaris cleanup (use CLEAR() to zero-out "ifr")
++
++  * tun.c: Windows cleanup: remove route and IPv6 address on disconnect
++
++  * route.c, route.h: remove "static" from delete_route_ipv6(), needed
++    for ipv6-route cleanup on disconnect
++
++  * TEST SUCCESS: Windows XP SP3: client-tun/net30, v4+v6
++
++  * TEST SUCCESS: Windows 7 Home Premium: client-tun/net30, v4+v6
++
++So 22. Mai 14:46:12 CEST 2011
++
++  * Tony Lim: removing routes fails on windows if certain bits are set
++    in the "host part" (others are silently ignored) -->
++
++  * route.c: create print_in6_addr_netbits_only() helper, call from 
++    add_route_ipv6() and delete_route_ipv6() to get only network part
++    of route-to-be-modified
++
++  * route.c: set 'store=active' on adding routes on WIN32 as well (Tony Lim)
++
++  * options.c: bump IPv6 release to 20110522-1
++
++  * TEST SUCCESS: Linux/iproute2: client-tun/net30+subnet, v4+v6
++
++  * TEST SUCCESS: Windows XP SP3: client-tun/net30, v4+v6
++
++  * TEST SUCCESS: Windows 7 Home Premium: client-tun/net30, v4+v6
++
++  * TEST SUCCESS: OpenBSD 4.7: client-tun/net30, v4+v6
++    TEST FAIL: OpenBSD 4.7: client-tun/subnet, v4
++    (seems to be due to "topology subnet has just not been implemented yet")
+diff -durN openvpn-2.2.2.orig/README.IPv6 openvpn-2.2.2/README.IPv6
+--- openvpn-2.2.2.orig/README.IPv6	1970-01-01 01:00:00.000000000 +0100
++++ openvpn-2.2.2/README.IPv6	2012-06-01 10:40:28.000000000 +0200
 @@ -0,0 +1,8 @@
 +This is an experimentally patched version of OpenVPN 2.1 with IPv6
 +payload support.
@@ -341,14 +454,14 @@
 +  http://www.greenie.net/ipv6/openvpn.html
 +
 +Gert Doering, 31.12.2009
-diff -durN -x '*~' -x '*.orig' -x '*.rej' openvpn-2.1.4.orig/TODO.IPv6 openvpn-2.1.4/TODO.IPv6
---- openvpn-2.1.4.orig/TODO.IPv6	1970-01-01 01:00:00.000000000 +0100
-+++ openvpn-2.1.4/TODO.IPv6	2011-04-19 08:39:50.000000000 +0200
-@@ -0,0 +1,100 @@
+diff -durN openvpn-2.2.2.orig/TODO.IPv6 openvpn-2.2.2/TODO.IPv6
+--- openvpn-2.2.2.orig/TODO.IPv6	1970-01-01 01:00:00.000000000 +0100
++++ openvpn-2.2.2/TODO.IPv6	2012-06-01 10:40:28.000000000 +0200
+@@ -0,0 +1,153 @@
 +known issues for IPv6 payload support in OpenVPN
 +-----------------------------------------------
 +
-+1.) "--topology subnet" doesn't work together with IPv6 payload
++1.) "--topology subnet" doesn't work together with IPv6 payload on FreeBSD
 +    (verified for FreeBSD server, Linux/ifconfig client, problems 
 +    with ICMP6 neighbor solicitations from BSD not being answered by Linux)
 +
@@ -361,6 +474,7 @@
 +
 +    * fixed for configured routes, 3.1.10 *
 +    * missing for manual-ifconfig-connected (NetBSD, Darwin, Win32)
++      * fixed for Win32, 22.5.2011
 +
 +4.) do "ifconfig tun0 inet6 unplumb"  or "ifconfig tun0 destroy" for
 +    Solaris, *BSD, ... at program termination time, to clean up leftovers
@@ -383,6 +497,11 @@
 +    * semi-fixed for NetBSD, 28.2.10, always do tun0 destroy / tun0 create
 +      before actual ifconfig -- tunnel still lingers after OpenVPN quits
 +
++4b.) verify this - on FreeBSD, tun0 is auto-destroyed if created by
++     opening /dev/tun (and lingers if created by "ifconfig tun0 create")
++
++     -> use for persistant tunnels on not-linux?
++
 +5.) add new option "ifconfig-ipv6-push"
 +    (per-client static IPv6 assignment, -> radiusplugin, etc)
 +
@@ -399,6 +518,13 @@
 +8.) full IPv6 support for TAP interfaces 
 +    (main issue should be routes+gateway - and testing :-) )
 +
++    test 2010/09/24: TAP itself works on linux/ifconfig+iproute2, but 
++    route-via-tap doesn't work at all (route points to "tap0" which fails)
++
++17:51:14.075412 fe:ab:6e:c5:53:71 > 33:33:ff:00:00:01, ethertype IPv6 (0x86dd), length 86: 2001:608:4:a053::1:0 > ff02::1:ff00:1: ICMP6, neighbor solicitation, who has 2001:608:4:a001::1, length 32
++
++    how is iroute-via-tap supposed to work??
++
 +9.) verify that iroute-ipv6 and route-ipv6 interact in the same way as
 +    documented for iroute/route:
 +
@@ -445,9 +571,49 @@
 +	- revert ifconfig/open_tun order to "normal" (separate commit!!!)
 +	  (openvpn-devel, Subject: OpenBSD)
 +	- test
-diff -durN -x '*~' -x '*.orig' -x '*.rej' openvpn-2.1.4.orig/forward.c openvpn-2.1.4/forward.c
---- openvpn-2.1.4.orig/forward.c	2010-11-04 20:29:02.000000000 +0100
-+++ openvpn-2.1.4/forward.c	2011-04-19 08:39:50.000000000 +0200
++
++17.) client-option (Elwood)
++	- ignore-v6-push-options yes/no
++	- ignore-v6-route-push  ("as for IPv4 routes")
++
++18.) fail-save?  "what if 'ip -6 addr add' fails" -> fail, or fallback to v4?
++	(-> recomment setting "ignore-v6-push-options yes")
++
++19.) safety check: if connecting over IPv6 (v6 transport) and the pushed
++     route-ipv6 network encompasses the server IPv6 address, make sure 
++     we at least log a warning (until we can fiddle with external routing
++     to make this work correctly).
++
++20.) show "route add" / "route delete" commands for IPv6 in log file
++     (we show the "ifconfig" commands, so why not the routes?)
++
++     2010-08-07: this is a null-feature - it's already there, but with
++                 different debug level (M_INFO vs. D_ROUTE) so user 
++                 didn't notice
++
++21.) enable ipv6-only server operations
++      - decouple ipv6 pool handling from ipv4 pool
++      - make sure Rest of OpenVPN doesn't assume "there will always be IPv4"
++
++22.) implement --learn-address for IPv6
++
++23.) FreeBSD 8 seems to require explicit setting of the "ifconfig" IPv6
++     route, while FreeBSD 6+7 don't --> more testing, and code fix
++
++     workaround for the time being: just add
++
++	server-ipv6 2001:608:4:a051::/64
++	route-ipv6 2001:608:4:a051::/64
++
++    to the config
++
++    (problem + workaround applies both to tun and tap style devices)
++
++24.) implement link-local IPv6 addresses
++     (OSPFv3 over TUN/multipoint does not work right now)
+diff -durN openvpn-2.2.2.orig/forward.c openvpn-2.2.2/forward.c
+--- openvpn-2.2.2.orig/forward.c	2011-12-13 17:58:56.000000000 +0100
++++ openvpn-2.2.2/forward.c	2012-06-01 10:40:28.000000000 +0200
 @@ -262,7 +262,8 @@
  static void
  check_add_routes_action (struct context *c, const bool errors)
@@ -458,9 +624,9 @@
    update_time ();
    event_timeout_clear (&c->c2.route_wakeup);
    event_timeout_clear (&c->c2.route_wakeup_expire);
-diff -durN -x '*~' -x '*.orig' -x '*.rej' openvpn-2.1.4.orig/helper.c openvpn-2.1.4/helper.c
---- openvpn-2.1.4.orig/helper.c	2010-11-04 20:29:02.000000000 +0100
-+++ openvpn-2.1.4/helper.c	2011-04-19 08:39:50.000000000 +0200
+diff -durN openvpn-2.2.2.orig/helper.c openvpn-2.2.2/helper.c
+--- openvpn-2.2.2.orig/helper.c	2011-12-13 17:58:56.000000000 +0100
++++ openvpn-2.2.2/helper.c	2012-06-01 10:40:28.000000000 +0200
 @@ -142,6 +142,55 @@
  
  #if P2MP
@@ -517,10 +683,10 @@
    /*
     *
     * HELPER DIRECTIVE:
-diff -durN -x '*~' -x '*.orig' -x '*.rej' openvpn-2.1.4.orig/init.c openvpn-2.1.4/init.c
---- openvpn-2.1.4.orig/init.c	2010-11-04 20:29:02.000000000 +0100
-+++ openvpn-2.1.4/init.c	2011-04-19 08:39:50.000000000 +0200
-@@ -844,7 +844,7 @@
+diff -durN openvpn-2.2.2.orig/init.c openvpn-2.2.2/init.c
+--- openvpn-2.2.2.orig/init.c	2011-12-13 17:58:56.000000000 +0100
++++ openvpn-2.2.2/init.c	2012-06-01 10:40:28.000000000 +0200
+@@ -843,7 +843,7 @@
  	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,
@@ -529,7 +695,7 @@
  	      options->username, options->groupname, &options->tuntap_options);
        if (options->persist_mode && options->lladdr)
          set_lladdr(options->dev, options->lladdr, NULL);
-@@ -1067,6 +1067,8 @@
+@@ -1066,6 +1066,8 @@
  {
    if (c->options.routes && !c->c1.route_list)
      c->c1.route_list = new_route_list (c->options.max_routes, &c->gc);
@@ -538,7 +704,7 @@
  }
  
  
-@@ -1109,6 +1111,45 @@
+@@ -1108,6 +1110,45 @@
      }
  }
  
@@ -584,7 +750,7 @@
  /*
   * Called after all initialization has been completed.
   */
-@@ -1173,12 +1214,13 @@
+@@ -1172,12 +1213,13 @@
  void
  do_route (const struct options *options,
  	  struct route_list *route_list,
@@ -600,7 +766,7 @@
  
    if (plugin_defined (plugins, OPENVPN_PLUGIN_ROUTE_UP))
      {
-@@ -1235,11 +1277,16 @@
+@@ -1234,11 +1276,16 @@
  			   c->options.topology,
  			   c->options.ifconfig_local,
  			   c->options.ifconfig_remote_netmask,
@@ -617,7 +783,7 @@
    init_tun_post (c->c1.tuntap,
  		 &c->c2.frame,
  		 &c->options.tuntap_options);
-@@ -1271,6 +1318,8 @@
+@@ -1270,6 +1317,8 @@
        /* parse and resolve the route option list */
        if (c->options.routes && c->c1.route_list && c->c2.link_socket)
  	do_init_route_list (&c->options, c->c1.route_list, &c->c2.link_socket->info, false, c->c2.es);
@@ -626,7 +792,7 @@
  
        /* do ifconfig */
        if (!c->options.ifconfig_noexec
-@@ -1287,7 +1336,7 @@
+@@ -1286,7 +1335,7 @@
  
        /* open the tun device */
        open_tun (c->options.dev, c->options.dev_type, c->options.dev_node,
@@ -635,7 +801,7 @@
  
        /* set the hardware address */
        if (c->options.lladdr)
-@@ -1316,7 +1365,8 @@
+@@ -1315,7 +1364,8 @@
  
        /* possibly add routes */
        if (!c->options.route_delay_defined)
@@ -645,7 +811,7 @@
  
        /*
         * Did tun/tap driver give us an MTU?
-@@ -1390,8 +1440,9 @@
+@@ -1389,8 +1439,9 @@
  #endif
  
  	  /* delete any routes we added */
@@ -657,9 +823,9 @@
  
  	  /* actually close tun/tap device based on --down-pre flag */
  	  if (!c->options.down_pre)
-diff -durN -x '*~' -x '*.orig' -x '*.rej' openvpn-2.1.4.orig/init.h openvpn-2.1.4/init.h
---- openvpn-2.1.4.orig/init.h	2010-11-04 20:29:02.000000000 +0100
-+++ openvpn-2.1.4/init.h	2011-04-19 08:39:50.000000000 +0200
+diff -durN openvpn-2.2.2.orig/init.h openvpn-2.2.2/init.h
+--- openvpn-2.2.2.orig/init.h	2011-12-13 17:58:56.000000000 +0100
++++ openvpn-2.2.2/init.h	2012-06-01 10:40:28.000000000 +0200
 @@ -63,6 +63,7 @@
  
  void do_route (const struct options *options,
@@ -668,21 +834,23 @@
  	       const struct tuntap *tt,
  	       const struct plugin_list *plugins,
  	       struct env_set *es);
-diff -durN -x '*~' -x '*.orig' -x '*.rej' openvpn-2.1.4.orig/misc.c openvpn-2.1.4/misc.c
---- openvpn-2.1.4.orig/misc.c	2010-11-04 20:29:02.000000000 +0100
-+++ openvpn-2.1.4/misc.c	2011-04-19 08:39:50.000000000 +0200
-@@ -1017,7 +1017,7 @@
+diff -durN openvpn-2.2.2.orig/misc.c openvpn-2.2.2/misc.c
+--- openvpn-2.2.2.orig/misc.c	2011-12-13 17:58:56.000000000 +0100
++++ openvpn-2.2.2/misc.c	2012-06-01 10:40:28.000000000 +0200
+@@ -1001,7 +1001,9 @@
  	{
  	  const char *str = construct_name_value (name_tmp, val_tmp, &gc);
  	  env_set_add (es, str);
 -	  /*msg (M_INFO, "SETENV_ES '%s'", str);*/
-+	  msg (M_INFO, "SETENV_ES '%s'", str);/**/
++#if DEBUG_VERBOSE_SETENV
++	  msg (M_INFO, "SETENV_ES '%s'", str);
++#endif
  	}
        else
  	env_set_del (es, name_tmp);
-diff -durN -x '*~' -x '*.orig' -x '*.rej' openvpn-2.1.4.orig/mroute.c openvpn-2.1.4/mroute.c
---- openvpn-2.1.4.orig/mroute.c	2010-11-04 20:29:02.000000000 +0100
-+++ openvpn-2.1.4/mroute.c	2011-04-19 08:39:50.000000000 +0200
+diff -durN openvpn-2.2.2.orig/mroute.c openvpn-2.2.2/mroute.c
+--- openvpn-2.2.2.orig/mroute.c	2011-12-13 21:17:06.000000000 +0100
++++ openvpn-2.2.2/mroute.c	2012-06-01 10:42:51.000000000 +0200
 @@ -88,12 +88,33 @@
      }
  }
@@ -717,12 +885,15 @@
  #ifdef ENABLE_PF
  
  static unsigned int
-@@ -155,10 +176,29 @@
+@@ -157,13 +178,29 @@
  	    }
  	  break;
  	case 6:
 -	  {
--	    msg (M_WARN, "Need IPv6 code in mroute_extract_addr_from_packet"); 
+-            if( !ipv6warned ) {
+-              msg (M_WARN, "IPv6 in tun mode is not supported in OpenVPN 2.2");
+-              ipv6warned = true;
+-            }
 -	    break;
 -	  }
 +	  if (BLEN (buf) >= (int) sizeof (struct openvpn_ipv6hdr))
@@ -751,7 +922,7 @@
  	}
      }
    return ret;
-@@ -252,14 +292,36 @@
+@@ -257,14 +294,36 @@
   * Zero off the host bits in an address, leaving
   * only the network bits, using the netbits member of
   * struct mroute_addr as the controlling parameter.
@@ -791,7 +962,7 @@
  }
  
  /*
-@@ -337,17 +399,24 @@
+@@ -342,17 +401,24 @@
  	  }
  	  break;
  	case MR_ADDR_IPV6:
@@ -827,10 +998,11 @@
  
  /*
   * mroute_helper's main job is keeping track of
-@@ -423,6 +492,44 @@
+@@ -422,6 +488,40 @@
+ 	mroute_helper_regenerate (mh);
      }
  }
- 
++
 +/* this is a bit inelegant, we really should have a helper to that 
 + * is only passed the netbits value, and not the whole struct iroute *
 + * - thus one helper could do IPv4 and IPv6.  For the sake of "not change
@@ -843,12 +1015,10 @@
 +  if (ir6->netbits >= 0)
 +    {
 +      ASSERT (ir6->netbits < MR_HELPER_NET_LEN);
-+      mroute_helper_lock (mh);
 +      ++mh->cache_generation;
 +      ++mh->net_len_refcount[ir6->netbits];
 +      if (mh->net_len_refcount[ir6->netbits] == 1)
 +	mroute_helper_regenerate (mh);
-+      mroute_helper_unlock (mh);
 +    }
 +}
 +
@@ -859,3152 +1029,9275 @@
 +  if (ir6->netbits >= 0)
 +    {
 +      ASSERT (ir6->netbits < MR_HELPER_NET_LEN);
-+      mroute_helper_lock (mh);
 +      ++mh->cache_generation;
 +      --mh->net_len_refcount[ir6->netbits];
 +      ASSERT (mh->net_len_refcount[ir6->netbits] >= 0);
 +      if (!mh->net_len_refcount[ir6->netbits])
 +	mroute_helper_regenerate (mh);
-+      mroute_helper_unlock (mh);
 +    }
 +}
-+
+ 
  void
  mroute_helper_free (struct mroute_helper *mh)
- {
-diff -durN -x '*~' -x '*.orig' -x '*.rej' openvpn-2.1.4.orig/mroute.h openvpn-2.1.4/mroute.h
---- openvpn-2.1.4.orig/mroute.h	2010-11-04 20:29:02.000000000 +0100
-+++ openvpn-2.1.4/mroute.h	2011-04-19 08:39:50.000000000 +0200
-@@ -85,7 +85,7 @@
- /*
-  * Number of bits in an address.  Should be raised for IPv6.
-  */
--#define MR_HELPER_NET_LEN 32
-+#define MR_HELPER_NET_LEN 129
- 
- /*
-  * Used to help maintain CIDR routing table.
-@@ -128,6 +128,8 @@
- void mroute_helper_free (struct mroute_helper *mh);
- void mroute_helper_add_iroute (struct mroute_helper *mh, const struct iroute *ir);
- void mroute_helper_del_iroute (struct mroute_helper *mh, const struct iroute *ir);
-+void mroute_helper_add_iroute6 (struct mroute_helper *mh, const struct iroute_ipv6 *ir6);
-+void mroute_helper_del_iroute6 (struct mroute_helper *mh, const struct iroute_ipv6 *ir6);
- 
- /*
-  * Given a raw packet in buf, return the src and dest
-diff -durN -x '*~' -x '*.orig' -x '*.rej' openvpn-2.1.4.orig/multi.c openvpn-2.1.4/multi.c
---- openvpn-2.1.4.orig/multi.c	2010-11-04 20:29:02.000000000 +0100
-+++ openvpn-2.1.4/multi.c	2011-04-19 08:39:50.000000000 +0200
-@@ -316,25 +316,18 @@
-    */
-   if (t->options.ifconfig_pool_defined)
-     {
--      if (dev == DEV_TYPE_TAP)
--	{
--	  m->ifconfig_pool = ifconfig_pool_init (IFCONFIG_POOL_INDIV,
--						 t->options.ifconfig_pool_start,
--						 t->options.ifconfig_pool_end,
--						 t->options.duplicate_cn);
--	}
--      else if (dev == DEV_TYPE_TUN)
--	{
--	  m->ifconfig_pool = ifconfig_pool_init (
--	    (t->options.topology == TOP_NET30) ? IFCONFIG_POOL_30NET : IFCONFIG_POOL_INDIV,
--	    t->options.ifconfig_pool_start,
--	    t->options.ifconfig_pool_end,
--	    t->options.duplicate_cn);
--	}
--      else
--	{
--	  ASSERT (0);
--	}
-+      int pool_type = IFCONFIG_POOL_INDIV;
+diff -durN openvpn-2.2.2.orig/mroute.c~ openvpn-2.2.2/mroute.c~
+--- openvpn-2.2.2.orig/mroute.c~	1970-01-01 01:00:00.000000000 +0100
++++ openvpn-2.2.2/mroute.c~	2012-06-01 10:40:28.000000000 +0200
+@@ -0,0 +1,518 @@
++/*
++ *  OpenVPN -- An application to securely tunnel IP networks
++ *             over a single TCP/UDP port, with support for SSL/TLS-based
++ *             session authentication and key exchange,
++ *             packet encryption, packet authentication, and
++ *             packet compression.
++ *
++ *  Copyright (C) 2002-2010 OpenVPN Technologies, Inc. <sales at openvpn.net>
++ *
++ *  This program is free software; you can redistribute it and/or modify
++ *  it under the terms of the GNU General Public License version 2
++ *  as published by the Free Software Foundation.
++ *
++ *  This program is distributed in the hope that it will be useful,
++ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
++ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++ *  GNU General Public License for more details.
++ *
++ *  You should have received a copy of the GNU General Public License
++ *  along with this program (see the file COPYING included with this
++ *  distribution); if not, write to the Free Software Foundation, Inc.,
++ *  59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
++ */
 +
-+      if ( dev == DEV_TYPE_TUN && t->options.topology == TOP_NET30 )
-+	pool_type = IFCONFIG_POOL_30NET;
++#include "syshead.h"
 +
-+      m->ifconfig_pool = ifconfig_pool_init (pool_type,
-+				 t->options.ifconfig_pool_start,
-+				 t->options.ifconfig_pool_end,
-+				 t->options.duplicate_cn,
-+				 t->options.ifconfig_ipv6_pool_defined,
-+				 t->options.ifconfig_ipv6_pool_base,
-+				 t->options.ifconfig_ipv6_pool_netbits );
- 
-       /* reload pool data from file */
-       if (t->c1.ifconfig_pool_persist)
-@@ -429,10 +422,14 @@
- 		   struct multi_instance *mi)
- {
-   const struct iroute *ir;
-+  const struct iroute_ipv6 *ir6;
-   if (TUNNEL_TYPE (mi->context.c1.tuntap) == DEV_TYPE_TUN)
-     {
-       for (ir = mi->context.options.iroutes; ir != NULL; ir = ir->next)
- 	mroute_helper_del_iroute (m->route_helper, ir);
++#if P2MP_SERVER
 +
<<Diff was trimmed, longer than 597 lines>>

---- CVS-web:
    http://cvs.pld-linux.org/packages/openvpn/openvpn-ipv6_payload.patch?r1=1.1&r2=1.2
    http://cvs.pld-linux.org/packages/openvpn/openvpn.spec?r1=1.172&r2=1.173



More information about the pld-cvs-commit mailing list