vrf: handle CONFIG_IPV6 not set for vrf_add_mac_header_if_unset()
authorAndrea Mayer <andrea.mayer@uniroma2.it>
Tue, 8 Dec 2020 17:52:10 +0000 (18:52 +0100)
committerJakub Kicinski <kuba@kernel.org>
Wed, 9 Dec 2020 20:00:40 +0000 (12:00 -0800)
commit9125abe7b9cb19f2d2b1c47a8c04dd81ce0d43b2
tree1a4ad50e88ecbe219b7b123c3585503cd8271ecf
parentafae3cc2da100ead3cd6ef4bb1fb8bc9d4b817c5
vrf: handle CONFIG_IPV6 not set for vrf_add_mac_header_if_unset()

The vrf_add_mac_header_if_unset() is defined within a conditional
compilation block which depends on the CONFIG_IPV6 macro.
However, the vrf_add_mac_header_if_unset() needs to be called also by IPv4
related code and when the CONFIG_IPV6 is not set, this function is missing.
As a consequence, the build process stops reporting the error:

 ERROR: implicit declaration of function 'vrf_add_mac_header_if_unset'

The problem is solved by *only* moving functions
vrf_add_mac_header_if_unset() and vrf_prepare_mac_header() out of the
conditional block.

Reported-by: kernel test robot <lkp@intel.com>
Fixes: 0489390882202 ("vrf: add mac header for tunneled packets when sniffer is attached")
Signed-off-by: Andrea Mayer <andrea.mayer@uniroma2.it>
Reviewed-by: David Ahern <dsahern@kernel.org>
Link: https://lore.kernel.org/r/20201208175210.8906-1-andrea.mayer@uniroma2.it
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/vrf.c