[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAF=yD-Kb4ZfJ3sMAnWEOB_s9Y=TTnLbRZxrDPiGZLO=trPjY5Q@mail.gmail.com>
Date: Fri, 18 May 2018 13:09:37 -0400
From: Willem de Bruijn <willemdebruijn.kernel@...il.com>
To: David Miller <davem@...emloft.net>
Cc: Eric Dumazet <eric.dumazet@...il.com>,
DaeLyong Jeong <threeearcat@...il.com>,
Alexey Kuznetsov <kuznet@....inr.ac.ru>,
Hideaki YOSHIFUJI <yoshfuji@...ux-ipv6.org>,
Network Development <netdev@...r.kernel.org>,
LKML <linux-kernel@...r.kernel.org>,
Byoungyoung Lee <byoungyoung@...due.edu>,
Kyungtae Kim <kt0755@...il.com>, bammanag@...due.edu,
Willem de Bruijn <willemb@...gle.com>
Subject: Re: WARNING in ip_recv_error
On Fri, May 18, 2018 at 11:44 AM, David Miller <davem@...emloft.net> wrote:
> From: Eric Dumazet <eric.dumazet@...il.com>
> Date: Fri, 18 May 2018 08:30:43 -0700
>
>> We probably need to revert Willem patch (7ce875e5ecb8562fd44040f69bda96c999e38bbc)
>
> Is it really valid to reach ip_recv_err with an ipv6 socket?
I guess the issue is that setsockopt IPV6_ADDRFORM is not an
atomic operation, so that the socket is neither fully ipv4 nor fully
ipv6 by the time it reaches ip_recv_error.
sk->sk_socket->ops = &inet_dgram_ops;
< HERE >
sk->sk_family = PF_INET;
Even calling inet_recv_error to demux would not necessarily help.
Safest would be to look up by skb->protocol, similar to what
ipv6_recv_error does to handle v4-mapped-v6.
Or to make that function safe with PF_INET and swap the order
of the above two operations.
All sound needlessly complicated for this rare socket option, but
I don't have a better idea yet. Dropping on the floor is not nice,
either.
Powered by blists - more mailing lists