[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CA+FuTSc3N1FdXe+88xBCAUjHT5DEhzeBhCXedqFFPO-8coV1CA@mail.gmail.com>
Date: Fri, 11 Jan 2019 16:29:02 -0500
From: Willem de Bruijn <willemdebruijn.kernel@...il.com>
To: Nicolas Dichtel <nicolas.dichtel@...nd.com>
Cc: David Miller <davem@...emloft.net>,
Network Development <netdev@...r.kernel.org>
Subject: Re: [PATCH net] af_packet: fix raw sockets over 6in4 tunnel
On Fri, Jan 11, 2019 at 9:44 AM Nicolas Dichtel
<nicolas.dichtel@...nd.com> wrote:
>
> Since commit cb9f1b783850, scapy (which uses an AF_PACKET socket in
> SOCK_RAW mode) is unable to send a basic icmp packet over a sit tunnel:
>
> Here is a example of the setup:
> $ ip link set ntfp2 up
> $ ip addr add 10.125.0.1/24 dev ntfp2
> $ ip tunnel add tun1 mode sit ttl 64 local 10.125.0.1 remote 10.125.0.2 dev ntfp2
> $ ip addr add fd00:cafe:cafe::1/128 dev tun1
> $ ip link set dev tun1 up
> $ ip route add fd00:200::/64 dev tun1
> $ scapy
> >>> p = []
> >>> p += IPv6(src='fd00:100::1', dst='fd00:200::1')/ICMPv6EchoRequest()
> >>> send(p, count=1, inter=0.1)
> >>> quit()
> $ ip -s link ls dev tun1 | grep -A1 "TX.*errors"
> TX: bytes packets errors dropped carrier collsns
> 0 0 1 0 0 0
>
> The problem is that the network offset is set to the hard_header_len of the
> output device (tun1, ie 14 + 20) and in our case, because the packet is
> small (48 bytes) the pskb_inet_may_pull() fails (it tries to pull 40 bytes
> (ipv6 header) starting from the network offset). Let's reset the network
> offset so that it points to the beginning of the L3 data, ie skb->data.
This only just landed in my inbox, sorry for the delay. So far I'm not
reproducing the issue, but I'm trying and am having a look.
Which pskb_inet_may_pull() is failing?
Powered by blists - more mailing lists