From: Pablo Neira Ayuso <pablo@netfilter.org>
To: netdev@vger.kernel.org
Cc: netfilter-devel@vger.kernel.org, roopa@cumulusnetworks.com,
amir@vadai.me, pshelar@ovn.org, u9012063@gmail.com
Subject: [PATCH RFC,net-next 0/3] ip_tunnel: specify tunnel type via template
Date: Thu, 4 Oct 2018 02:03:42 +0200 [thread overview]
Message-ID: <20181004000345.2380-1-pablo@netfilter.org> (raw)
Hi,
The following patchset adds a new field to the tunnel metadata template
to restrict the configuration to a given tunnel driver. Currently, a
misconfiguration may result in packets going to the wrong tunnel driver.
Although we have the tunnel option flags, they are not mandatory for
some tunnel drivers, eg. vxlan, which may use it or not; and gre which
does not use them.
This patch updates tc's tunnel action and netfilter's tunnel extension
to use this new field. OVS netlink interface has been left unset, although they
could be updated to use this.
By extending the existing tc action to support the IP_TUNNEL_INFO_BRIDGE
mode, I think it should be possible to expose IP_TUNNEL_TYPE_VLAN too,
although this patchset doesn't address this scenario.
The field is initialized to zero, which maps to IP_TUNNEL_TYPE_UNSPEC to
retain the existing behaviour, so the existing flexibility is still in
place while this new feature is added.
Cc'ing people that git annotate show as dealing with these bits more
recently.
Compile tested only.
Comments welcome, thanks.
Pablo Neira Ayuso (3):
ip_tunnel: add type field to struct ip_tunnel_info
net: act_tunnel_key: support for tunnel type
netfilter: nft_tunnel: support for tunnel type
drivers/net/geneve.c | 3 ++-
drivers/net/vxlan.c | 13 +++++++------
include/net/dst_metadata.h | 1 +
include/net/ip_tunnels.h | 16 ++++++++++++++++
include/uapi/linux/netfilter/nf_tables.h | 10 ++++++++++
include/uapi/linux/tc_act/tc_tunnel_key.h | 10 ++++++++++
net/ipv4/ip_gre.c | 2 ++
net/ipv6/ip6_gre.c | 2 ++
net/netfilter/nft_tunnel.c | 9 ++++++++-
net/openvswitch/flow_netlink.c | 1 +
net/sched/act_tunnel_key.c | 9 +++++++++
11 files changed, 68 insertions(+), 8 deletions(-)
next reply other threads:[~2018-10-04 0:03 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-04 0:03 Pablo Neira Ayuso [this message]
2018-10-04 0:03 ` [PATCH RFC,net-next 1/3] ip_tunnel: add type field to struct ip_tunnel_info Pablo Neira Ayuso
2018-10-04 9:25 ` Daniel Borkmann
2018-10-04 10:56 ` Pablo Neira Ayuso
2018-10-04 12:00 ` Daniel Borkmann
2018-10-04 0:03 ` [PATCH RFC,net-next 2/3] net: act_tunnel_key: support for tunnel type Pablo Neira Ayuso
2018-10-04 0:03 ` [PATCH RFC,net-next 3/3] netfilter: nft_tunnel: " Pablo Neira Ayuso
2018-10-04 19:13 ` [PATCH RFC,net-next 0/3] ip_tunnel: specify tunnel type via template Jakub Kicinski
2018-10-04 21:58 ` Pablo Neira Ayuso
2018-10-14 6:42 ` Or Gerlitz
2018-10-14 9:24 ` Pablo Neira Ayuso
2018-10-14 11:24 ` Or Gerlitz
2018-10-14 17:59 ` Pablo Neira Ayuso
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=20181004000345.2380-1-pablo@netfilter.org \
--to=pablo@netfilter.org \
--cc=amir@vadai.me \
--cc=netdev@vger.kernel.org \
--cc=netfilter-devel@vger.kernel.org \
--cc=pshelar@ovn.org \
--cc=roopa@cumulusnetworks.com \
--cc=u9012063@gmail.com \
/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).