SOURCES (LINUX_2_6): kernel-vserver-fixes.patch - fix ipv6 source selection...

arekm arekm at pld-linux.org
Tue Nov 18 14:31:56 CET 2008


Author: arekm                        Date: Tue Nov 18 13:31:56 2008 GMT
Module: SOURCES                       Tag: LINUX_2_6
---- Log message:
- fix ipv6 source selection: http://people.linux-vserver.org/~bonbons/vs2.3.0.35.10-ipv6-saddr-breakout-fix.diff

---- Files affected:
SOURCES:
   kernel-vserver-fixes.patch (1.1.2.7 -> 1.1.2.8) 

---- Diffs:

================================================================
Index: SOURCES/kernel-vserver-fixes.patch
diff -u SOURCES/kernel-vserver-fixes.patch:1.1.2.7 SOURCES/kernel-vserver-fixes.patch:1.1.2.8
--- SOURCES/kernel-vserver-fixes.patch:1.1.2.7	Sun Nov  2 23:28:03 2008
+++ SOURCES/kernel-vserver-fixes.patch	Tue Nov 18 14:31:50 2008
@@ -42,3 +42,40 @@
  #define __NR_migrate_pages	258
  #define __NR_mbind		259
  #define __NR_get_mempolicy	260
+diff -NurpP linux-2.6.27.6-vs2.3.0.35.10.orig/net/ipv6/addrconf.c linux-2.6.27.6-vs2.3.0.35.10/net/ipv6/addrconf.c
+--- linux-2.6.27.6-vs2.3.0.35.10.orig/net/ipv6/addrconf.c	2008-11-17 23:55:48.000000000 +0100
++++ linux-2.6.27.6-vs2.3.0.35.10/net/ipv6/addrconf.c	2008-11-17 23:47:48.000000000 +0100
+@@ -1183,6 +1183,8 @@ int ipv6_dev_get_saddr(struct net *net, 
+ 					       dev->name);
+ 				continue;
+ 			}
++			if (!v6_addr_in_nx_info(nxi, &score->ifa->addr, -1))
++				continue;
+ 
+ 			score->rule = -1;
+ 			bitmap_zero(score->scorebits, IPV6_SADDR_RULE_MAX);
+diff -NurpP linux-2.6.27.6-vs2.3.0.35.10.orig/net/ipv6/raw.c linux-2.6.27.6-vs2.3.0.35.10/net/ipv6/raw.c
+--- linux-2.6.27.6-vs2.3.0.35.10.orig/net/ipv6/raw.c	2008-10-10 00:13:53.000000000 +0200
++++ linux-2.6.27.6-vs2.3.0.35.10/net/ipv6/raw.c	2008-11-17 23:34:18.000000000 +0100
+@@ -29,6 +29,7 @@
+ #include <linux/icmpv6.h>
+ #include <linux/netfilter.h>
+ #include <linux/netfilter_ipv6.h>
++#include <linux/vs_inet6.h>
+ #include <linux/skbuff.h>
+ #include <asm/uaccess.h>
+ #include <asm/ioctls.h>
+@@ -281,6 +282,13 @@ static int rawv6_bind(struct sock *sk, s
+ 			}
+ 		}
+ 
++		if (!v6_addr_in_nx_info(sk->sk_nx_info, &addr->sin6_addr, -1)) {
++			err = -EADDRNOTAVAIL;
++			if (dev)
++				dev_put(dev);
++			goto out;
++		}
++
+ 		/* ipv4 addr of the socket is invalid.  Only the
+ 		 * unspecified and mapped address have a v4 equivalent.
+ 		 */
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SOURCES/kernel-vserver-fixes.patch?r1=1.1.2.7&r2=1.1.2.8&f=u



More information about the pld-cvs-commit mailing list