Skip to content

Commit

Permalink
udp_tunnel: Only build ip6_udp_tunnel.c when IPV6 is selected
Browse files Browse the repository at this point in the history
Functions supplied in ip6_udp_tunnel.c are only needed when IPV6 is
selected. When IPV6 is not selected, those functions are stubbed out
in udp_tunnel.h.

==================================================================
 net/ipv6/ip6_udp_tunnel.c:15:5: error: redefinition of 'udp_sock_create6'
     int udp_sock_create6(struct net *net, struct udp_port_cfg *cfg,
 In file included from net/ipv6/ip6_udp_tunnel.c:9:0:
      include/net/udp_tunnel.h:36:19: note: previous definition of 'udp_sock_create6' was here
       static inline int udp_sock_create6(struct net *net, struct udp_port_cfg *cfg,
==================================================================

Fixes:  fd38441 udp_tunnel: Seperate ipv6 functions into its own file
Reported-by: kbuild test robot <[email protected]>
Signed-off-by: Andy Zhou <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
azhou-nicira authored and davem330 committed Sep 20, 2014
1 parent 6c62f60 commit 6d967f8
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion net/ipv6/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ obj-$(CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION) += xfrm6_mode_ro.o
obj-$(CONFIG_INET6_XFRM_MODE_BEET) += xfrm6_mode_beet.o
obj-$(CONFIG_IPV6_MIP6) += mip6.o
obj-$(CONFIG_NETFILTER) += netfilter/
obj-$(CONFIG_NET_UDP_TUNNEL) += ip6_udp_tunnel.o

obj-$(CONFIG_IPV6_VTI) += ip6_vti.o
obj-$(CONFIG_IPV6_SIT) += sit.o
Expand All @@ -46,3 +45,7 @@ obj-y += addrconf_core.o exthdrs_core.o ip6_checksum.o ip6_icmp.o
obj-$(CONFIG_INET) += output_core.o protocol.o $(ipv6-offload)

obj-$(subst m,y,$(CONFIG_IPV6)) += inet6_hashtables.o

ifneq ($(CONFIG_IPV6),)
obj-$(CONFIG_NET_UDP_TUNNEL) += ip6_udp_tunnel.o
endif

0 comments on commit 6d967f8

Please sign in to comment.