diff options
author | Hannes Frederic Sowa <hannes@stressinduktion.org> | 2014-02-18 15:38:08 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-02-19 16:28:42 -0500 |
commit | c8e6ad0829a723a74cd2fea9996a3392d2579a18 (patch) | |
tree | 370dd2b5d5ad64cabef6fa837aac4ca8a1b9a958 /include/net/ip.h | |
parent | 21f374c6cfbf98c1efceee0b528ce784d215935c (diff) |
ipv6: honor IPV6_PKTINFO with v4 mapped addresses on sendmsg
In case we decide in udp6_sendmsg to send the packet down the ipv4
udp_sendmsg path because the destination is either of family AF_INET or
the destination is an ipv4 mapped ipv6 address, we don't honor the
maybe specified ipv4 mapped ipv6 address in IPV6_PKTINFO.
We simply can check for this option in ip_cmsg_send because no calls to
ipv6 module functions are needed to do so.
Reported-by: Gert Doering <gert@space.net>
Cc: Tore Anderson <tore@fud.no>
Signed-off-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/ip.h')
-rw-r--r-- | include/net/ip.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/net/ip.h b/include/net/ip.h index 23be0fd37937..4aa781b7f609 100644 --- a/include/net/ip.h +++ b/include/net/ip.h | |||
@@ -489,7 +489,8 @@ int ip_options_rcv_srr(struct sk_buff *skb); | |||
489 | 489 | ||
490 | void ipv4_pktinfo_prepare(const struct sock *sk, struct sk_buff *skb); | 490 | void ipv4_pktinfo_prepare(const struct sock *sk, struct sk_buff *skb); |
491 | void ip_cmsg_recv(struct msghdr *msg, struct sk_buff *skb); | 491 | void ip_cmsg_recv(struct msghdr *msg, struct sk_buff *skb); |
492 | int ip_cmsg_send(struct net *net, struct msghdr *msg, struct ipcm_cookie *ipc); | 492 | int ip_cmsg_send(struct net *net, struct msghdr *msg, |
493 | struct ipcm_cookie *ipc, bool allow_ipv6); | ||
493 | int ip_setsockopt(struct sock *sk, int level, int optname, char __user *optval, | 494 | int ip_setsockopt(struct sock *sk, int level, int optname, char __user *optval, |
494 | unsigned int optlen); | 495 | unsigned int optlen); |
495 | int ip_getsockopt(struct sock *sk, int level, int optname, char __user *optval, | 496 | int ip_getsockopt(struct sock *sk, int level, int optname, char __user *optval, |