]> git.baikalelectronics.ru Git - kernel.git/commit
net: ip6_gre: Split up ip6gre_newlink()
authorPetr Machata <petrm@mellanox.com>
Thu, 17 May 2018 14:36:39 +0000 (16:36 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 17 May 2018 20:50:06 +0000 (16:50 -0400)
commit59f7ad5bbc0ef66d83c6ae123a5e3e00c78d1f64
tree6c3c5fb35d5631440cdb9b0d6a255e6b575824a7
parent41fce058abfc767e1e0471d30e88fa585de3e5d9
net: ip6_gre: Split up ip6gre_newlink()

Extract from ip6gre_newlink() a reusable function
ip6gre_newlink_common(). The ip6gre_tnl_link_config() call needs to be
made customizable for ERSPAN, thus reorder it with calls to
ip6_tnl_change_mtu() and dev_hold(), and extract the whole tail to the
caller, ip6gre_newlink(). Thus enable an ERSPAN-specific _newlink()
function without a lot of duplicity.

Fixes: 318c892820e0 ("ip6_gre: Add ERSPAN native tunnel support")
Signed-off-by: Petr Machata <petrm@mellanox.com>
Acked-by: William Tu <u9012063@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv6/ip6_gre.c