diff options
author | YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> | 2008-06-04 13:02:49 +0900 |
---|---|---|
committer | YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> | 2008-06-05 04:02:36 +0900 |
commit | 91e1908f569dd96a25a3947de8771e6cc93999dd (patch) | |
tree | 552e4ac3dfc4aa0ba3ce8d2a329fb55d4fac72af /net/ipv6/datagram.c | |
parent | 187e38384c4abfbbb1b880fab234d16c2df23a25 (diff) | |
download | blackbird-op-linux-91e1908f569dd96a25a3947de8771e6cc93999dd.tar.gz blackbird-op-linux-91e1908f569dd96a25a3947de8771e6cc93999dd.zip |
[IPV6] NETNS: Handle ancillary data in appropriate namespace.
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Diffstat (limited to 'net/ipv6/datagram.c')
-rw-r--r-- | net/ipv6/datagram.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/net/ipv6/datagram.c b/net/ipv6/datagram.c index 53e3883f7666..b9c2de84a8a2 100644 --- a/net/ipv6/datagram.c +++ b/net/ipv6/datagram.c @@ -496,7 +496,8 @@ int datagram_recv_ctl(struct sock *sk, struct msghdr *msg, struct sk_buff *skb) return 0; } -int datagram_send_ctl(struct msghdr *msg, struct flowi *fl, +int datagram_send_ctl(struct net *net, + struct msghdr *msg, struct flowi *fl, struct ipv6_txoptions *opt, int *hlimit, int *tclass) { @@ -540,7 +541,7 @@ int datagram_send_ctl(struct msghdr *msg, struct flowi *fl, addr_type = __ipv6_addr_type(&src_info->ipi6_addr); if (fl->oif) { - dev = dev_get_by_index(&init_net, fl->oif); + dev = dev_get_by_index(net, fl->oif); if (!dev) return -ENODEV; } else if (addr_type & IPV6_ADDR_LINKLOCAL) @@ -548,7 +549,7 @@ int datagram_send_ctl(struct msghdr *msg, struct flowi *fl, if (addr_type != IPV6_ADDR_ANY) { int strict = __ipv6_addr_src_scope(addr_type) <= IPV6_ADDR_SCOPE_LINKLOCAL; - if (!ipv6_chk_addr(&init_net, &src_info->ipi6_addr, + if (!ipv6_chk_addr(net, &src_info->ipi6_addr, strict ? dev : NULL, 0)) err = -EINVAL; else |