Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e0aa6770 authored by Eric Dumazet's avatar Eric Dumazet Committed by David S. Miller
Browse files

dccp: do not use ipv6 header for ipv4 flow



When a dual stack dccp listener accepts an ipv4 flow,
it should not attempt to use an ipv6 header or
inet6_iif() helper.

Fixes: 3df80d93 ("[DCCP]: Introduce DCCPv6")
Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 89e41309
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -436,8 +436,8 @@ static struct sock *dccp_v6_request_recv_sock(const struct sock *sk,
		newnp->ipv6_mc_list = NULL;
		newnp->ipv6_mc_list = NULL;
		newnp->ipv6_ac_list = NULL;
		newnp->ipv6_ac_list = NULL;
		newnp->ipv6_fl_list = NULL;
		newnp->ipv6_fl_list = NULL;
		newnp->mcast_oif   = inet6_iif(skb);
		newnp->mcast_oif   = inet_iif(skb);
		newnp->mcast_hops  = ipv6_hdr(skb)->hop_limit;
		newnp->mcast_hops  = ip_hdr(skb)->ttl;


		/*
		/*
		 * No need to charge this sock to the relevant IPv6 refcnt debug socks count
		 * No need to charge this sock to the relevant IPv6 refcnt debug socks count