summaryrefslogtreecommitdiffstats
path: root/net/packet
diff options
context:
space:
mode:
authorPetr Machata <petrm@mellanox.com>2020-03-13 13:39:36 +0200
committerDavid S. Miller <davem@davemloft.net>2020-03-15 00:14:08 -0700
commite1f8f78ffe9854308b9e12a73ebe4e909074fc33 (patch)
tree89cd80a7eb60df2e1eb7c134f0cf9f73fb817679 /net/packet
parent46ea929b2b3f66e6a9bc91adbb9ca2157065f9b2 (diff)
downloadlinux-e1f8f78ffe9854308b9e12a73ebe4e909074fc33.tar.gz
linux-e1f8f78ffe9854308b9e12a73ebe4e909074fc33.tar.bz2
linux-e1f8f78ffe9854308b9e12a73ebe4e909074fc33.zip
net: ip_gre: Separate ERSPAN newlink / changelink callbacks
ERSPAN shares most of the code path with GRE and gretap code. While that helps keep the code compact, it is also error prone. Currently a broken userspace can turn a gretap tunnel into a de facto ERSPAN one by passing IFLA_GRE_ERSPAN_VER. There has been a similar issue in ip6gretap in the past. To prevent these problems in future, split the newlink and changelink code paths. Split the ERSPAN code out of ipgre_netlink_parms() into a new function erspan_netlink_parms(). Extract a piece of common logic from ipgre_newlink() and ipgre_changelink() into ipgre_newlink_encap_setup(). Add erspan_newlink() and erspan_changelink(). Fixes: 84e54fe0a5ea ("gre: introduce native tunnel support for ERSPAN") Signed-off-by: Petr Machata <petrm@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/packet')
0 files changed, 0 insertions, 0 deletions