Skip to contentSkip to conversation

ipv6: missed namespace context in ipv6_rthdr_rcv

PATCH Applied Denis V. Lunev 3 participants 3 messages Jul 10, 2008

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ipv6: missed namespace context in ipv6_rthdr_rcv

---
 net/ipv6/exthdrs.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
net/ipv6/exthdrs.c +1 -1
index 3cd1c99..dcf94fd 100644
@@ -445,7 +445,7 @@ looped_back:
 			kfree_skb(skb);
 			return -1;
 		}
-		if (!ipv6_chk_home_addr(&init_net, addr)) {
+		if (!ipv6_chk_home_addr(dev_net(skb->dst->dev), addr)) {
 			IP6_INC_STATS_BH(ip6_dst_idev(skb->dst),
 					 IPSTATS_MIB_INADDRERRORS);
 			kfree_skb(skb);
Signature · 1 line
1.5.3.rc5
#1 lore raw
Quoted 10 lines · Denis V. Lunev
---
 net/ipv6/exthdrs.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
net/ipv6/exthdrs.c +0 -0
index 3cd1c99..dcf94fd 100644

net/ipv6/exthdrs.c looped_back: · line 451

Quoted 8 lines
net/ipv6/exthdrs.c +1 -1
@@ -445,7 +445,7 @@ looped_back:
 			kfree_skb(skb);
 			return -1;
 		}
-		if (!ipv6_chk_home_addr(&init_net, addr)) {
+		if (!ipv6_chk_home_addr(dev_net(skb->dst->dev), addr)) {
 			IP6_INC_STATS_BH(ip6_dst_idev(skb->dst),
 					 IPSTATS_MIB_INADDRERRORS);
 			kfree_skb(skb);

Thanks Denis :)

maintainer Applied
#2 lore raw

From: Daniel Lezcano <[email protected]>
Date: Thu, 10 Jul 2008 14:55:57 +0200

Quoted 6 lines
Quoted 5 lines · Denis V. Lunev
---
 net/ipv6/exthdrs.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
Quoted 15 lines

net/ipv6/exthdrs.c looped_back: · line 451

Quoted 13 lines
net/ipv6/exthdrs.c +1 -1
index 3cd1c99..dcf94fd 100644
@@ -445,7 +445,7 @@ looped_back:
 			kfree_skb(skb);
 			return -1;
 		}
-		if (!ipv6_chk_home_addr(&init_net, addr)) {
+		if (!ipv6_chk_home_addr(dev_net(skb->dst->dev), addr)) {
 			IP6_INC_STATS_BH(ip6_dst_idev(skb->dst),
 					 IPSTATS_MIB_INADDRERRORS);
 			kfree_skb(skb);

Thanks Denis :)

Applied to net-2.6, thanks!