diff options
author | YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> | 2005-09-01 20:44:49 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2005-09-01 20:44:49 -0400 |
commit | 2dac4b96b9362954a0638317b90e3e7bcb112e83 (patch) | |
tree | 8cf0b815263b1809488b4071b4a5a3a1aece2ad1 /net/ipv6/raw.c | |
parent | 573dbd95964b01a942aa0c68e92b06f2c9536964 (diff) |
[IPV6]: Repair Incoming Interface Handling for Raw Socket.
Due to changes to enforce checking interface bindings,
sockets did not see loopback packets bound for our local address
on our interface.
e.g.)
When we ping6 fe80::1%eth0, skb->dev points loopback_dev while
IP6CB(skb)->iif indicates eth0.
This patch fixes the issue by using appropriate incoming interface,
in the sense of scoping architecture.
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6/raw.c')
-rw-r--r-- | net/ipv6/raw.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/ipv6/raw.c b/net/ipv6/raw.c index 7a5863298f3f..ed3a76b30fd9 100644 --- a/net/ipv6/raw.c +++ b/net/ipv6/raw.c | |||
@@ -166,7 +166,7 @@ int ipv6_raw_deliver(struct sk_buff *skb, int nexthdr) | |||
166 | if (sk == NULL) | 166 | if (sk == NULL) |
167 | goto out; | 167 | goto out; |
168 | 168 | ||
169 | sk = __raw_v6_lookup(sk, nexthdr, daddr, saddr, skb->dev->ifindex); | 169 | sk = __raw_v6_lookup(sk, nexthdr, daddr, saddr, IP6CB(skb)->iif); |
170 | 170 | ||
171 | while (sk) { | 171 | while (sk) { |
172 | delivered = 1; | 172 | delivered = 1; |
@@ -178,7 +178,7 @@ int ipv6_raw_deliver(struct sk_buff *skb, int nexthdr) | |||
178 | rawv6_rcv(sk, clone); | 178 | rawv6_rcv(sk, clone); |
179 | } | 179 | } |
180 | sk = __raw_v6_lookup(sk_next(sk), nexthdr, daddr, saddr, | 180 | sk = __raw_v6_lookup(sk_next(sk), nexthdr, daddr, saddr, |
181 | skb->dev->ifindex); | 181 | IP6CB(skb)->iif); |
182 | } | 182 | } |
183 | out: | 183 | out: |
184 | read_unlock(&raw_v6_lock); | 184 | read_unlock(&raw_v6_lock); |