diff options
author | Patrick McHardy <kaber@trash.net> | 2011-02-02 23:50:01 +0100 |
---|---|---|
committer | Patrick McHardy <kaber@trash.net> | 2011-02-02 23:50:01 +0100 |
commit | 724bab476bcac9f7d0b5204cb06e346216d42166 (patch) | |
tree | ac4aa027d85a801ca2e3eb75678124434e1ba30d /include/linux/netfilter/ipset/ip_set_getport.h | |
parent | 316ed388802533bcfd3dffb38d2ba29ac5428456 (diff) | |
download | op-kernel-dev-724bab476bcac9f7d0b5204cb06e346216d42166.zip op-kernel-dev-724bab476bcac9f7d0b5204cb06e346216d42166.tar.gz |
netfilter: ipset: fix linking with CONFIG_IPV6=n
Add a dummy ip_set_get_ip6_port function that unconditionally
returns false for CONFIG_IPV6=n and convert the real function
to ipv6_skip_exthdr() to avoid pulling in the ip6_tables module
when loading ipset.
Signed-off-by: Patrick McHardy <kaber@trash.net>
Diffstat (limited to 'include/linux/netfilter/ipset/ip_set_getport.h')
-rw-r--r-- | include/linux/netfilter/ipset/ip_set_getport.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/linux/netfilter/ipset/ip_set_getport.h b/include/linux/netfilter/ipset/ip_set_getport.h index 694c433..3882a81 100644 --- a/include/linux/netfilter/ipset/ip_set_getport.h +++ b/include/linux/netfilter/ipset/ip_set_getport.h @@ -3,8 +3,18 @@ extern bool ip_set_get_ip4_port(const struct sk_buff *skb, bool src, __be16 *port, u8 *proto); + +#if defined(CONFIG_IP6_NF_IPTABLES) || defined(CONFIG_IP6_NF_IPTABLES_MODULE) extern bool ip_set_get_ip6_port(const struct sk_buff *skb, bool src, __be16 *port, u8 *proto); +#else +static inline bool ip_set_get_ip6_port(const struct sk_buff *skb, bool src, + __be16 *port, u8 *proto) +{ + return false; +} +#endif + extern bool ip_set_get_ip_port(const struct sk_buff *skb, u8 pf, bool src, __be16 *port); |