]> git.baikalelectronics.ru Git - kernel.git/commit
net: make ip6tunnel_xmit definition conditional
authorArnd Bergmann <arnd@arndb.de>
Fri, 1 Jan 2016 12:18:48 +0000 (13:18 +0100)
committerDavid S. Miller <davem@davemloft.net>
Tue, 5 Jan 2016 02:50:51 +0000 (21:50 -0500)
commita3c3da82950966ee6d83f43733594fe26e1d50a1
treeefd6236520e5ecffb0f9fa6ff723a3dc1f91f13f
parent4faf3073ec735d91aa8fb74d25522b8e4c40c33f
net: make ip6tunnel_xmit definition conditional

Moving the caller of iptunnel_xmit_stats causes a build error in
randconfig builds that disable CONFIG_INET:

In file included from ../net/xfrm/xfrm_input.c:17:0:
../include/net/ip6_tunnel.h: In function 'ip6tunnel_xmit':
../include/net/ip6_tunnel.h:93:2: error: implicit declaration of function 'iptunnel_xmit_stats' [-Werror=implicit-function-declaration]
  iptunnel_xmit_stats(dev, pkt_len);

The reason is that the iptunnel_xmit_stats definition is hidden
inside #ifdef CONFIG_INET but the caller is not. We can change
one or the other to fix it, and this patch adds a second #ifdef
around ip6tunnel_xmit() to avoid seeing the invalid call.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: 25e022fce93c ("ip_tunnel: Move stats update to iptunnel_xmit()")
Acked-by: Pravin B Shelar <pshelar@nicira.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/ip6_tunnel.h