]>
Commit | Line | Data |
---|---|---|
38568109 GKH |
1 | From foo@baz Thu Mar 28 21:54:17 CET 2019 |
2 | From: Eric Dumazet <edumazet@google.com> | |
3 | Date: Tue, 19 Mar 2019 05:46:18 -0700 | |
4 | Subject: dccp: do not use ipv6 header for ipv4 flow | |
5 | ||
6 | From: Eric Dumazet <edumazet@google.com> | |
7 | ||
8 | [ Upstream commit e0aa67709f89d08c8d8e5bdd9e0b649df61d0090 ] | |
9 | ||
10 | When a dual stack dccp listener accepts an ipv4 flow, | |
11 | it should not attempt to use an ipv6 header or | |
12 | inet6_iif() helper. | |
13 | ||
14 | Fixes: 3df80d9320bc ("[DCCP]: Introduce DCCPv6") | |
15 | Signed-off-by: Eric Dumazet <edumazet@google.com> | |
16 | Signed-off-by: David S. Miller <davem@davemloft.net> | |
17 | Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | |
18 | --- | |
19 | net/dccp/ipv6.c | 4 ++-- | |
20 | 1 file changed, 2 insertions(+), 2 deletions(-) | |
21 | ||
22 | --- a/net/dccp/ipv6.c | |
23 | +++ b/net/dccp/ipv6.c | |
24 | @@ -433,8 +433,8 @@ static struct sock *dccp_v6_request_recv | |
25 | newnp->ipv6_mc_list = NULL; | |
26 | newnp->ipv6_ac_list = NULL; | |
27 | newnp->ipv6_fl_list = NULL; | |
28 | - newnp->mcast_oif = inet6_iif(skb); | |
29 | - newnp->mcast_hops = ipv6_hdr(skb)->hop_limit; | |
30 | + newnp->mcast_oif = inet_iif(skb); | |
31 | + newnp->mcast_hops = ip_hdr(skb)->ttl; | |
32 | ||
33 | /* | |
34 | * No need to charge this sock to the relevant IPv6 refcnt debug socks count |