diff options
author | Pablo Neira Ayuso <pablo@netfilter.org> | 2012-06-20 14:52:31 -0400 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2012-06-21 20:49:52 -0400 |
commit | d584a61a931e6cbfef0dd811c4ae0250ec5987f4 (patch) | |
tree | af8f5ff1ace6bc0034f5f351bca12d09e9c5f42e /net/netfilter | |
parent | 5a05fae5ca7cd5279567747fc34d60413b504cd6 (diff) |
netfilter: nfnetlink_queue: fix compilation with CONFIG_NF_NAT=m and CONFIG_NF_CT_NETLINK=y
LD init/built-in.o
net/built-in.o:(.data+0x4408): undefined reference to `nf_nat_tcp_seq_adjust'
make: *** [vmlinux] Error 1
This patch adds a new pointer hook (nfq_ct_nat_hook) similar to other existing
in Netfilter to solve our complicated configuration dependencies.
Reported-by: Valdis Kletnieks <valdis.kletnieks@vt.edu>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'net/netfilter')
-rw-r--r-- | net/netfilter/core.c | 3 | ||||
-rw-r--r-- | net/netfilter/nf_conntrack_netlink.c | 3 | ||||
-rw-r--r-- | net/netfilter/nfnetlink_queue_ct.c | 8 |
3 files changed, 7 insertions, 7 deletions
diff --git a/net/netfilter/core.c b/net/netfilter/core.c index 4cd10ed2d6e6..0bc6b60db4df 100644 --- a/net/netfilter/core.c +++ b/net/netfilter/core.c | |||
@@ -268,6 +268,9 @@ EXPORT_SYMBOL(nf_conntrack_destroy); | |||
268 | struct nfq_ct_hook __rcu *nfq_ct_hook __read_mostly; | 268 | struct nfq_ct_hook __rcu *nfq_ct_hook __read_mostly; |
269 | EXPORT_SYMBOL_GPL(nfq_ct_hook); | 269 | EXPORT_SYMBOL_GPL(nfq_ct_hook); |
270 | 270 | ||
271 | struct nfq_ct_nat_hook __rcu *nfq_ct_nat_hook __read_mostly; | ||
272 | EXPORT_SYMBOL_GPL(nfq_ct_nat_hook); | ||
273 | |||
271 | #endif /* CONFIG_NF_CONNTRACK */ | 274 | #endif /* CONFIG_NF_CONNTRACK */ |
272 | 275 | ||
273 | #ifdef CONFIG_PROC_FS | 276 | #ifdef CONFIG_PROC_FS |
diff --git a/net/netfilter/nf_conntrack_netlink.c b/net/netfilter/nf_conntrack_netlink.c index 31d1d8f3a6ce..8bb47339b770 100644 --- a/net/netfilter/nf_conntrack_netlink.c +++ b/net/netfilter/nf_conntrack_netlink.c | |||
@@ -1757,9 +1757,6 @@ static struct nfq_ct_hook ctnetlink_nfqueue_hook = { | |||
1757 | .build_size = ctnetlink_nfqueue_build_size, | 1757 | .build_size = ctnetlink_nfqueue_build_size, |
1758 | .build = ctnetlink_nfqueue_build, | 1758 | .build = ctnetlink_nfqueue_build, |
1759 | .parse = ctnetlink_nfqueue_parse, | 1759 | .parse = ctnetlink_nfqueue_parse, |
1760 | #ifdef CONFIG_NF_NAT_NEEDED | ||
1761 | .seq_adjust = nf_nat_tcp_seq_adjust, | ||
1762 | #endif | ||
1763 | }; | 1760 | }; |
1764 | #endif /* CONFIG_NETFILTER_NETLINK_QUEUE_CT */ | 1761 | #endif /* CONFIG_NETFILTER_NETLINK_QUEUE_CT */ |
1765 | 1762 | ||
diff --git a/net/netfilter/nfnetlink_queue_ct.c b/net/netfilter/nfnetlink_queue_ct.c index 68ef550066f5..01247b730e66 100644 --- a/net/netfilter/nfnetlink_queue_ct.c +++ b/net/netfilter/nfnetlink_queue_ct.c | |||
@@ -86,12 +86,12 @@ nla_put_failure: | |||
86 | void nfqnl_ct_seq_adjust(struct sk_buff *skb, struct nf_conn *ct, | 86 | void nfqnl_ct_seq_adjust(struct sk_buff *skb, struct nf_conn *ct, |
87 | enum ip_conntrack_info ctinfo, int diff) | 87 | enum ip_conntrack_info ctinfo, int diff) |
88 | { | 88 | { |
89 | struct nfq_ct_hook *nfq_ct; | 89 | struct nfq_ct_nat_hook *nfq_nat_ct; |
90 | 90 | ||
91 | nfq_ct = rcu_dereference(nfq_ct_hook); | 91 | nfq_nat_ct = rcu_dereference(nfq_ct_nat_hook); |
92 | if (nfq_ct == NULL) | 92 | if (nfq_nat_ct == NULL) |
93 | return; | 93 | return; |
94 | 94 | ||
95 | if ((ct->status & IPS_NAT_MASK) && diff) | 95 | if ((ct->status & IPS_NAT_MASK) && diff) |
96 | nfq_ct->seq_adjust(skb, ct, ctinfo, diff); | 96 | nfq_nat_ct->seq_adjust(skb, ct, ctinfo, diff); |
97 | } | 97 | } |