]> git.baikalelectronics.ru Git - kernel.git/commit
ipvlan: decouple l3s mode dependencies from other modes
authorDaniel Borkmann <daniel@iogearbox.net>
Fri, 8 Feb 2019 12:55:31 +0000 (13:55 +0100)
committerDavid S. Miller <davem@davemloft.net>
Fri, 8 Feb 2019 19:16:48 +0000 (11:16 -0800)
commit59a4e9c06fe1ba1b09f9a90109f1c00859f5196c
tree89d60212e3566eb1d81de4ba55b78c9264ae9403
parent065de4c16abeb7dfc9394edda08127ffe52cd0df
ipvlan: decouple l3s mode dependencies from other modes

Right now ipvlan has a hard dependency on CONFIG_NETFILTER and
otherwise it cannot be built. However, the only ipvlan operation
mode that actually depends on netfilter is l3s, everything else
is independent of it. Break this hard dependency such that users
are able to use ipvlan l3 mode on systems where netfilter is not
compiled in.

Therefore, this adds a hidden CONFIG_IPVLAN_L3S bool which is
defaulting to y when CONFIG_NETFILTER is set in order to retain
existing behavior for l3s. All l3s related code is refactored
into ipvlan_l3s.c that is compiled in when enabled.

Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Cc: Mahesh Bandewar <maheshb@google.com>
Cc: Florian Westphal <fw@strlen.de>
Cc: Martynas Pumputis <m@lambda.lt>
Acked-by: Florian Westphal <fw@strlen.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/Kconfig
drivers/net/ipvlan/Makefile
drivers/net/ipvlan/ipvlan.h
drivers/net/ipvlan/ipvlan_core.c
drivers/net/ipvlan/ipvlan_l3s.c [new file with mode: 0644]
drivers/net/ipvlan/ipvlan_main.c