diff options
author | Jesper Dangaard Brouer <brouer@redhat.com> | 2012-10-22 15:22:45 -0400 |
---|---|---|
committer | Simon Horman <horms@verge.net.au> | 2012-10-22 20:23:40 -0400 |
commit | 54d83efa44aac87983f973abb42c508a25a2b554 (patch) | |
tree | 25496f5736c6b08d49682376396c41b745d1ac0f /include | |
parent | bcc58c4d9141160d6448e4589acbd46e5c647518 (diff) |
ipvs: fix build errors related to config option combinations
Fix two build error introduced by commit 63dca2c0:
"ipvs: Fix faulty IPv6 extension header handling in IPVS"
First build error was fairly trivial and can occur, when
CONFIG_IP_VS_IPV6 is disabled.
The second build error was tricky, and can occur when deselecting
both all Netfilter and IPVS, but selecting CONFIG_IPV6. This is
caused by "kernel/sysctl_binary.c" including "net/ip_vs.h", which
includes "linux/netfilter_ipv6/ip6_tables.h" causing include
of "include/linux/netfilter/x_tables.h" which then cannot find
the typedef nf_hookfn.
Fix this by only including "linux/netfilter_ipv6/ip6_tables.h" in
case of CONFIG_IP_VS_IPV6 as its already used to guard the usage
of ipv6_find_hdr().
Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Reported-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
Diffstat (limited to 'include')
-rw-r--r-- | include/net/ip_vs.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/include/net/ip_vs.h b/include/net/ip_vs.h index a681ad65b735..68c69d54d392 100644 --- a/include/net/ip_vs.h +++ b/include/net/ip_vs.h | |||
@@ -22,7 +22,7 @@ | |||
22 | #include <linux/ip.h> | 22 | #include <linux/ip.h> |
23 | #include <linux/ipv6.h> /* for struct ipv6hdr */ | 23 | #include <linux/ipv6.h> /* for struct ipv6hdr */ |
24 | #include <net/ipv6.h> | 24 | #include <net/ipv6.h> |
25 | #if IS_ENABLED(CONFIG_IPV6) | 25 | #if IS_ENABLED(CONFIG_IP_VS_IPV6) |
26 | #include <linux/netfilter_ipv6/ip6_tables.h> | 26 | #include <linux/netfilter_ipv6/ip6_tables.h> |
27 | #endif | 27 | #endif |
28 | #if IS_ENABLED(CONFIG_NF_CONNTRACK) | 28 | #if IS_ENABLED(CONFIG_NF_CONNTRACK) |
@@ -212,8 +212,9 @@ ip_vs_fill_iph_addr_only(int af, const struct sk_buff *skb, | |||
212 | (struct ipv6hdr *)skb_network_header(skb); | 212 | (struct ipv6hdr *)skb_network_header(skb); |
213 | iphdr->saddr.in6 = iph->saddr; | 213 | iphdr->saddr.in6 = iph->saddr; |
214 | iphdr->daddr.in6 = iph->daddr; | 214 | iphdr->daddr.in6 = iph->daddr; |
215 | } else { | 215 | } else |
216 | #endif | 216 | #endif |
217 | { | ||
217 | const struct iphdr *iph = | 218 | const struct iphdr *iph = |
218 | (struct iphdr *)skb_network_header(skb); | 219 | (struct iphdr *)skb_network_header(skb); |
219 | iphdr->saddr.ip = iph->saddr; | 220 | iphdr->saddr.ip = iph->saddr; |