diff options
author | Erich E. Hoover <ehoover@mines.edu> | 2012-02-08 04:11:08 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-02-08 15:52:45 -0500 |
commit | c4062dfc425e94290ac427a98d6b4721dd2bc91f (patch) | |
tree | 30180df3e11ded7ed8ea2c3c4525092d0711f1af /net/ipv6/icmp.c | |
parent | 76e21053b5bf33a07c76f99d27a74238310e3c71 (diff) |
ipv6: Implement IPV6_UNICAST_IF socket option.
The IPV6_UNICAST_IF feature is the IPv6 compliment to IP_UNICAST_IF.
Signed-off-by: Erich E. Hoover <ehoover@mines.edu>
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6/icmp.c')
-rw-r--r-- | net/ipv6/icmp.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/net/ipv6/icmp.c b/net/ipv6/icmp.c index 01d46bff63c3..af88934e4d79 100644 --- a/net/ipv6/icmp.c +++ b/net/ipv6/icmp.c | |||
@@ -468,6 +468,8 @@ void icmpv6_send(struct sk_buff *skb, u8 type, u8 code, __u32 info) | |||
468 | 468 | ||
469 | if (!fl6.flowi6_oif && ipv6_addr_is_multicast(&fl6.daddr)) | 469 | if (!fl6.flowi6_oif && ipv6_addr_is_multicast(&fl6.daddr)) |
470 | fl6.flowi6_oif = np->mcast_oif; | 470 | fl6.flowi6_oif = np->mcast_oif; |
471 | else if (!fl6.flowi6_oif) | ||
472 | fl6.flowi6_oif = np->ucast_oif; | ||
471 | 473 | ||
472 | dst = icmpv6_route_lookup(net, skb, sk, &fl6); | 474 | dst = icmpv6_route_lookup(net, skb, sk, &fl6); |
473 | if (IS_ERR(dst)) | 475 | if (IS_ERR(dst)) |
@@ -553,6 +555,8 @@ static void icmpv6_echo_reply(struct sk_buff *skb) | |||
553 | 555 | ||
554 | if (!fl6.flowi6_oif && ipv6_addr_is_multicast(&fl6.daddr)) | 556 | if (!fl6.flowi6_oif && ipv6_addr_is_multicast(&fl6.daddr)) |
555 | fl6.flowi6_oif = np->mcast_oif; | 557 | fl6.flowi6_oif = np->mcast_oif; |
558 | else if (!fl6.flowi6_oif) | ||
559 | fl6.flowi6_oif = np->ucast_oif; | ||
556 | 560 | ||
557 | err = ip6_dst_lookup(sk, &dst, &fl6); | 561 | err = ip6_dst_lookup(sk, &dst, &fl6); |
558 | if (err) | 562 | if (err) |