aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6/ip6_output.c
diff options
context:
space:
mode:
authorAndrew McDonald <andrew@mcdonald.org.uk>2005-08-09 22:44:42 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2005-08-29 18:37:06 -0400
commit0bd1b59b15e4057101c89d4db15a3683c0d897f7 (patch)
tree1912652fdf55f1bcc703ae9a3dcb93036dcfca67 /net/ipv6/ip6_output.c
parent7af4cc3fa158ff1dda6e7451c7e6afa6b0bb85cb (diff)
[IPV6]: Check interface bindings on IPv6 raw socket reception
Take account of whether a socket is bound to a particular device when selecting an IPv6 raw socket to receive a packet. Also perform this check when receiving IPv6 packets with router alert options. Signed-off-by: Andrew McDonald <andrew@mcdonald.org.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6/ip6_output.c')
-rw-r--r--net/ipv6/ip6_output.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/net/ipv6/ip6_output.c b/net/ipv6/ip6_output.c
index a7fcbcc83576..00f85148b85f 100644
--- a/net/ipv6/ip6_output.c
+++ b/net/ipv6/ip6_output.c
@@ -277,7 +277,9 @@ static int ip6_call_ra_chain(struct sk_buff *skb, int sel)
277 read_lock(&ip6_ra_lock); 277 read_lock(&ip6_ra_lock);
278 for (ra = ip6_ra_chain; ra; ra = ra->next) { 278 for (ra = ip6_ra_chain; ra; ra = ra->next) {
279 struct sock *sk = ra->sk; 279 struct sock *sk = ra->sk;
280 if (sk && ra->sel == sel) { 280 if (sk && ra->sel == sel &&
281 (!sk->sk_bound_dev_if ||
282 sk->sk_bound_dev_if == skb->dev->ifindex)) {
281 if (last) { 283 if (last) {
282 struct sk_buff *skb2 = skb_clone(skb, GFP_ATOMIC); 284 struct sk_buff *skb2 = skb_clone(skb, GFP_ATOMIC);
283 if (skb2) 285 if (skb2)