From patchwork Wed May 25 14:50:45 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 102306 Delivered-To: patch@linaro.org Received: by 10.140.92.199 with SMTP id b65csp1259047qge; Wed, 25 May 2016 07:52:01 -0700 (PDT) X-Received: by 10.66.118.106 with SMTP id kl10mr6382458pab.78.1464187921693; Wed, 25 May 2016 07:52:01 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q9si13111661pap.136.2016.05.25.07.52.01; Wed, 25 May 2016 07:52:01 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of netdev-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of netdev-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=netdev-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754772AbcEYOvc (ORCPT + 4 others); Wed, 25 May 2016 10:51:32 -0400 Received: from mout.kundenserver.de ([212.227.126.187]:65076 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754551AbcEYOv3 (ORCPT ); Wed, 25 May 2016 10:51:29 -0400 Received: from wuerfel.lan. ([78.42.132.4]) by mrelayeu.kundenserver.de (mreue005) with ESMTPA (Nemesis) id 0MWfMN-1b3f7m2KgF-00Xwsm; Wed, 25 May 2016 16:51:17 +0200 From: Arnd Bergmann To: Tom Herbert , "David S. Miller" Cc: Arnd Bergmann , Alexey Kuznetsov , James Morris , Hideaki YOSHIFUJI , Patrick McHardy , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/2] ipv6: hide ip6_encap_hlen/ip6_tnl_encap definitions Date: Wed, 25 May 2016 16:50:45 +0200 Message-Id: <1464187873-219087-1-git-send-email-arnd@arndb.de> X-Mailer: git-send-email 2.7.0 X-Provags-ID: V03:K0:HSEYSQDPyipaiHUx8R/1LfETie/LuEmRnsnXUtxaEvoEYIC4b4e 39vR+jjnNULo4eOmEjnIy1PxBBIkrDOWItcmW7YZVtDWn8P/9bavVUYkH8/HBdx4Pjv2r9M hlT57aGr58xDojdQIxxSH5KuieG7vCewqu5/TsCGG6kzc5+3r+O/gMIG5nkXfzntGMjrcMf p9TCOo3Sjg1iK5KT+Qb8Q== X-UI-Out-Filterresults: notjunk:1; V01:K0:XI58BZE4jAQ=:5i8Ht/nMl7P8IqaUUhdyef WKu7V5ks6/bERs6RIEF3sv4m7Ag6UK1odYDhhAzT8XTK6bq2WL0kK0gD6aLFU34LRLTO06m3n 1TXS0wec1YtSfcQHhq28cfO27APsX8svIxQv71F0vjZmhmbcsYcVMjgEieo4uH2aWEgO3ZNK8 T96hwZpataA1zY0z+m/2iuw17aRUujlyuYDuudoVn3f+vLmrpZ3RTgDw6xGYgwOSEjuMkd5KR 1u6/PF7woWYmxToeyyE+Nbr1v5Us+3sLpfm87IU0QukmPETmlVmrMUeqcpBJ8Y1dgF0SEYQBw 7iCjlwthLMguMZC69ZJLwh7nMYerPtO/KXkbRGD0zFlKJVk21vQOEAQ7bsXiiY71oKRn28eKW g6MZ8t+/jF2tPSsUrwAOL7wfHl3rz0I9SpVEWEtLCHbHeVFOkc/2ZmmpJAb79BofY5OimHZSd +qufYeBiU4T07GfsS7n3IMcIudA0bfJmTSU3puHuws2b7GTvrHPInvkIdym5pUNAUcFIxcuV0 gtRw1EbpR6izRLSoQlTKW7GYumxAOcf/RDnYvFwe+YY/bt9R1TGjy025aHB0tZbi1n3+r5sB1 TykJLWTDoHRWNhOVvQyDY3WClZGGY9BN6LfkgO4nyKqthQuQ6woiZkO73gCBkClsYL+tjW33w 8xwzUzAnVh60pnjiqqKpm5zroDvSlxHpkqvVv0MQoTieSIh6f0abSVooQEff0UKpZkZI= Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org A recent cleanup moved MAX_IPTUN_ENCAP_OPS along with some other definitions, but it is now invisible when CONFIG_INET is not defined, but still referenced from ip6_tunnel.h: In file included from net/xfrm/xfrm_input.c:17:0: include/net/ip6_tunnel.h:67:17: error: 'MAX_IPTUN_ENCAP_OPS' undeclared here (not in a function) ip6tun_encaps[MAX_IPTUN_ENCAP_OPS]; ^~~~~~~~~~~~~~~~~~~ This hides the ip6_encap_hlen and ip6_tnl_encap functions inside of CONFIG_INET so we don't run into the the problem. Alternatively we could move the macro out of the #ifdef again to restore the previous behavior Signed-off-by: Arnd Bergmann Fixes: 55c2bc143224 ("net: Cleanup encap items in ip_tunnels.h") --- include/net/ip6_tunnel.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- 2.7.0 diff --git a/include/net/ip6_tunnel.h b/include/net/ip6_tunnel.h index d325c81332e3..43a5a0e4524c 100644 --- a/include/net/ip6_tunnel.h +++ b/include/net/ip6_tunnel.h @@ -63,6 +63,8 @@ struct ip6_tnl_encap_ops { u8 *protocol, struct flowi6 *fl6); }; +#ifdef CONFIG_INET + extern const struct ip6_tnl_encap_ops __rcu * ip6tun_encaps[MAX_IPTUN_ENCAP_OPS]; @@ -138,7 +140,6 @@ struct net *ip6_tnl_get_link_net(const struct net_device *dev); int ip6_tnl_get_iflink(const struct net_device *dev); int ip6_tnl_change_mtu(struct net_device *dev, int new_mtu); -#ifdef CONFIG_INET static inline void ip6tunnel_xmit(struct sock *sk, struct sk_buff *skb, struct net_device *dev) {