]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
couple IPV6 fixes from DaveM
authorChris Wright <chrisw@sous-sol.org>
Thu, 22 Jun 2006 08:51:07 +0000 (01:51 -0700)
committerChris Wright <chrisw@sous-sol.org>
Thu, 22 Jun 2006 08:51:07 +0000 (01:51 -0700)
queue-2.6.17/ipv6-addrconf-fix-default-source-address-selection-without-config_ipv6_privacy.patch [new file with mode: 0644]
queue-2.6.17/ipv6-fix-source-address-selection.patch [new file with mode: 0644]
queue-2.6.17/series

diff --git a/queue-2.6.17/ipv6-addrconf-fix-default-source-address-selection-without-config_ipv6_privacy.patch b/queue-2.6.17/ipv6-addrconf-fix-default-source-address-selection-without-config_ipv6_privacy.patch
new file mode 100644 (file)
index 0000000..811505c
--- /dev/null
@@ -0,0 +1,33 @@
+From stable-bounces@linux.kernel.org  Thu Jun 22 01:43:03 2006
+Date: Thu, 22 Jun 2006 01:42:13 -0700 (PDT)
+From: David Miller <davem@davemloft.net>
+To: stable@kernel.org
+Cc: 
+Subject: IPV6 ADDRCONF: Fix default source address selection without CONFIG_IPV6_PRIVACY
+
+From: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
+
+We need to update hiscore.rule even if we don't enable CONFIG_IPV6_PRIVACY,
+because we have more less significant rule; longest match.
+
+Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Chris Wright <chrisw@sous-sol.org>
+---
+
+---
+ net/ipv6/addrconf.c |    3 +++
+ 1 file changed, 3 insertions(+)
+
+--- linux-2.6.17.1.orig/net/ipv6/addrconf.c
++++ linux-2.6.17.1/net/ipv6/addrconf.c
+@@ -1075,6 +1075,9 @@ int ipv6_dev_get_saddr(struct net_device
+                               if (hiscore.attrs & IPV6_SADDR_SCORE_PRIVACY)
+                                       continue;
+                       }
++#else
++                      if (hiscore.rule < 7)
++                              hiscore.rule++;
+ #endif
+                       /* Rule 8: Use longest matching prefix */
+                       if (hiscore.rule < 8) {
diff --git a/queue-2.6.17/ipv6-fix-source-address-selection.patch b/queue-2.6.17/ipv6-fix-source-address-selection.patch
new file mode 100644 (file)
index 0000000..18effd8
--- /dev/null
@@ -0,0 +1,50 @@
+From stable-bounces@linux.kernel.org  Thu Jun 22 01:39:43 2006
+Date: Thu, 22 Jun 2006 01:39:05 -0700 (PDT)
+From: David Miller <davem@davemloft.net>
+To: stable@kernel.org
+Cc: 
+Subject: IPV6: Fix source address selection.
+
+From: \e$,1 aukasz Stelmach <stlman@poczta.fm>
+    
+Two additional labels (RFC 3484, sec. 10.3) for IPv6 addreses
+are defined to make a distinction between global unicast
+addresses and Unique Local Addresses (fc00::/7, RFC 4193) and
+Teredo (2001::/32, RFC 4380). It is necessary to avoid attempts
+of connection that would either fail (eg. fec0:: to 2001:feed::)
+or be sub-optimal (2001:0:: to 2001:feed::).
+
+Signed-off-by: \e$,1 aukasz Stelmach <stlman@poczta.fm>
+Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Chris Wright <chrisw@sous-sol.org>
+---
+
+---
+ net/ipv6/addrconf.c |    6 ++++++
+ 1 file changed, 6 insertions(+)
+
+--- linux-2.6.17.1.orig/net/ipv6/addrconf.c
++++ linux-2.6.17.1/net/ipv6/addrconf.c
+@@ -862,6 +862,8 @@ static int inline ipv6_saddr_label(const
+   *   2002::/16               2
+   *   ::/96                   3
+   *   ::ffff:0:0/96           4
++  *   fc00::/7                5
++  *   2001::/32               6
+   */
+       if (type & IPV6_ADDR_LOOPBACK)
+               return 0;
+@@ -869,8 +871,12 @@ static int inline ipv6_saddr_label(const
+               return 3;
+       else if (type & IPV6_ADDR_MAPPED)
+               return 4;
++      else if (addr->s6_addr32[0] == htonl(0x20010000))
++              return 6;
+       else if (addr->s6_addr16[0] == htons(0x2002))
+               return 2;
++      else if ((addr->s6_addr[0] & 0xfe) == 0xfc)
++              return 5;
+       return 1;
+ }
index 22ac34daadcbaf6eed2396f7fcfd97ada4081f3e..ab53e538fb1a1ffc960398436b5bc43f4327f972 100644 (file)
@@ -13,3 +13,5 @@ ntfs-critical-bug-fix.patch
 x86-compile-fix-for-asm-i386-alternatives.h.patch
 bcm43xx-init-fix-for-possible-machine-check.patch
 uml-fix-uptime.patch
+ipv6-fix-source-address-selection.patch
+ipv6-addrconf-fix-default-source-address-selection-without-config_ipv6_privacy.patch