diff options
author | Andrew McDonald <andrew@mcdonald.org.uk> | 2005-08-09 19:44:42 -0700 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2005-08-29 15:37:06 -0700 |
commit | 0bd1b59b15e4057101c89d4db15a3683c0d897f7 (patch) | |
tree | 1912652fdf55f1bcc703ae9a3dcb93036dcfca67 /net/ipv6/ip6_output.c | |
parent | 7af4cc3fa158ff1dda6e7451c7e6afa6b0bb85cb (diff) | |
download | linux-3.10-0bd1b59b15e4057101c89d4db15a3683c0d897f7.tar.gz linux-3.10-0bd1b59b15e4057101c89d4db15a3683c0d897f7.tar.bz2 linux-3.10-0bd1b59b15e4057101c89d4db15a3683c0d897f7.zip |
[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.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/net/ipv6/ip6_output.c b/net/ipv6/ip6_output.c index a7fcbcc8357..00f85148b85 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) read_lock(&ip6_ra_lock); for (ra = ip6_ra_chain; ra; ra = ra->next) { struct sock *sk = ra->sk; - if (sk && ra->sel == sel) { + if (sk && ra->sel == sel && + (!sk->sk_bound_dev_if || + sk->sk_bound_dev_if == skb->dev->ifindex)) { if (last) { struct sk_buff *skb2 = skb_clone(skb, GFP_ATOMIC); if (skb2) |