netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Willem de Bruijn <willemb@google.com>
To: "Jason A. Donenfeld" <Jason@zx2c4.com>
Cc: Network Development <netdev@vger.kernel.org>,
	David Miller <davem@davemloft.net>, Hans Wippel <ndev@hwipl.net>
Subject: Re: [PATCH net v2 2/8] net: ipip: implement header_ops->parse_protocol for AF_PACKET
Date: Tue, 30 Jun 2020 12:02:01 -0400	[thread overview]
Message-ID: <CA+FuTScmNarsVr7htyyJPoyn1pn-Bjn=oX89domPDro5sT2qqA@mail.gmail.com> (raw)
In-Reply-To: <20200630010625.469202-3-Jason@zx2c4.com>

On Mon, Jun 29, 2020 at 9:06 PM Jason A. Donenfeld <Jason@zx2c4.com> wrote:
>
> Ipip uses skb->protocol to determine packet type, and bails out if it's
> not set. For AF_PACKET injection, we need to support its call chain of:
>
>     packet_sendmsg -> packet_snd -> packet_parse_headers ->
>       dev_parse_header_protocol -> parse_protocol
>
> Without a valid parse_protocol, this returns zero, and ipip rejects the
> skb. So, this wires up the ip_tunnel handler for layer 3 packets for
> that case.
>
> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>

Acked-by: Willem de Bruijn <willemb@google.com>

For all protocols, really. But it probably doesn't add much to repeat
this in each patch.

  reply	other threads:[~2020-06-30 16:02 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-30  1:06 [PATCH net v2 0/8] support AF_PACKET for layer 3 devices Jason A. Donenfeld
2020-06-30  1:06 ` [PATCH net v2 1/8] net: ip_tunnel: add header_ops " Jason A. Donenfeld
2020-06-30 15:40   ` Willem de Bruijn
2020-06-30  1:06 ` [PATCH net v2 2/8] net: ipip: implement header_ops->parse_protocol for AF_PACKET Jason A. Donenfeld
2020-06-30 16:02   ` Willem de Bruijn [this message]
2020-06-30  1:06 ` [PATCH net v2 3/8] wireguard: " Jason A. Donenfeld
2020-06-30  1:06 ` [PATCH net v2 4/8] wireguard: queueing: make use of ip_tunnel_parse_protocol Jason A. Donenfeld
2020-06-30  1:06 ` [PATCH net v2 5/8] tun: implement header_ops->parse_protocol for AF_PACKET Jason A. Donenfeld
2020-06-30  1:06 ` [PATCH net v2 6/8] net: vti: " Jason A. Donenfeld
2020-06-30  1:06 ` [PATCH net v2 7/8] net: sit: " Jason A. Donenfeld
2020-06-30  1:06 ` [PATCH net v2 8/8] net: xfrmi: " Jason A. Donenfeld
2020-06-30 19:30 ` [PATCH net v2 0/8] support AF_PACKET for layer 3 devices David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CA+FuTScmNarsVr7htyyJPoyn1pn-Bjn=oX89domPDro5sT2qqA@mail.gmail.com' \
    --to=willemb@google.com \
    --cc=Jason@zx2c4.com \
    --cc=davem@davemloft.net \
    --cc=ndev@hwipl.net \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).