diff options
author | Eric Dumazet <edumazet@google.com> | 2019-03-19 05:46:18 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-04-03 06:22:12 +0200 |
commit | 6b703ff23cb94d04050d68591bf79945b6965e90 (patch) | |
tree | 189da2970f6b70c5ae5a702b98fe399499b222e9 /net | |
parent | cf2afae3abba7fb14a5ef1adafbf5b4fc671aba5 (diff) | |
download | linux-stable-6b703ff23cb94d04050d68591bf79945b6965e90.tar.gz linux-stable-6b703ff23cb94d04050d68591bf79945b6965e90.tar.bz2 linux-stable-6b703ff23cb94d04050d68591bf79945b6965e90.zip |
dccp: do not use ipv6 header for ipv4 flow
[ Upstream commit e0aa67709f89d08c8d8e5bdd9e0b649df61d0090 ]
When a dual stack dccp listener accepts an ipv4 flow,
it should not attempt to use an ipv6 header or
inet6_iif() helper.
Fixes: 3df80d9320bc ("[DCCP]: Introduce DCCPv6")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net')
-rw-r--r-- | net/dccp/ipv6.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/dccp/ipv6.c b/net/dccp/ipv6.c index 4d925dbe4bb7..6dd6a7d4373c 100644 --- a/net/dccp/ipv6.c +++ b/net/dccp/ipv6.c @@ -490,8 +490,8 @@ static struct sock *dccp_v6_request_recv_sock(struct sock *sk, newnp->ipv6_mc_list = NULL; newnp->ipv6_ac_list = NULL; newnp->ipv6_fl_list = NULL; - newnp->mcast_oif = inet6_iif(skb); - newnp->mcast_hops = ipv6_hdr(skb)->hop_limit; + newnp->mcast_oif = inet_iif(skb); + newnp->mcast_hops = ip_hdr(skb)->ttl; /* * No need to charge this sock to the relevant IPv6 refcnt debug socks count |