net: ip_tunnel: add header_ops for layer 3 devices
authorJason A. Donenfeld <Jason@zx2c4.com>
Tue, 30 Jun 2020 01:06:18 +0000 (19:06 -0600)
committerDavid S. Miller <davem@davemloft.net>
Tue, 30 Jun 2020 19:29:39 +0000 (12:29 -0700)
commit2606aff916854b61234bf85001be9777bab2d5f8
tree333affa90c05bb0a59116ca6304f3b7321e767aa
parentbf64ff4c2aac65d680dc639a511c781cf6b6ec08
net: ip_tunnel: add header_ops for layer 3 devices

Some devices that take straight up layer 3 packets benefit from having a
shared header_ops so that AF_PACKET sockets can inject packets that are
recognized. This shared infrastructure will be used by other drivers
that currently can't inject packets using AF_PACKET. It also exposes the
parser function, as it is useful in standalone form too.

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Acked-by: Willem de Bruijn <willemb@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/ip_tunnels.h
net/ipv4/ip_tunnel_core.c