diff options
author | David S. Miller <davem@davemloft.net> | 2012-12-04 13:01:19 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-12-04 13:01:19 -0500 |
commit | e8ad1a8fab6f550aba1f1fe7ba26749ff5460751 (patch) | |
tree | df5ed3d6660f929ecd3194f93cc1e48d69f872c9 /include/net | |
parent | 099f7aa7400df0ffcc8d3c30dcde1ce0595d8a32 (diff) | |
parent | a0ecb85a2c3af73c63b6d44ce82aea52347ccf55 (diff) |
Merge branch 'master' of git://1984.lsi.us.es/nf-next
Pablo Neira Ayuso says:
====================
* Remove limitation in the maximum number of supported sets in ipset.
Now ipset automagically increments the number of slots in the array
of sets by 64 new spare slots, from Jozsef Kadlecsik.
* Partially remove the generic queue infrastructure now that ip_queue
is gone. Its only client is nfnetlink_queue now, from Florian
Westphal.
* Add missing attribute policy checkings in ctnetlink, from Florian
Westphal.
* Automagically kill conntrack entries that use the wrong output
interface for the masquerading case in case of routing changes,
from Jozsef Kadlecsik.
* Two patches two improve ct object traceability. Now ct objects are
always placed in any of the existing lists. This allows us to dump
the content of unconfirmed and dying conntracks via ctnetlink as
a way to provide more instrumentation in case you suspect leaks,
from myself.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net')
-rw-r--r-- | include/net/netfilter/nf_conntrack.h | 2 | ||||
-rw-r--r-- | include/net/netfilter/nf_nat.h | 15 | ||||
-rw-r--r-- | include/net/netfilter/nf_queue.h | 8 |
3 files changed, 18 insertions, 7 deletions
diff --git a/include/net/netfilter/nf_conntrack.h b/include/net/netfilter/nf_conntrack.h index f1494feba79f..caca0c4d6b4b 100644 --- a/include/net/netfilter/nf_conntrack.h +++ b/include/net/netfilter/nf_conntrack.h | |||
@@ -182,7 +182,7 @@ __nf_conntrack_find(struct net *net, u16 zone, | |||
182 | 182 | ||
183 | extern int nf_conntrack_hash_check_insert(struct nf_conn *ct); | 183 | extern int nf_conntrack_hash_check_insert(struct nf_conn *ct); |
184 | extern void nf_ct_delete_from_lists(struct nf_conn *ct); | 184 | extern void nf_ct_delete_from_lists(struct nf_conn *ct); |
185 | extern void nf_ct_insert_dying_list(struct nf_conn *ct); | 185 | extern void nf_ct_dying_timeout(struct nf_conn *ct); |
186 | 186 | ||
187 | extern void nf_conntrack_flush_report(struct net *net, u32 pid, int report); | 187 | extern void nf_conntrack_flush_report(struct net *net, u32 pid, int report); |
188 | 188 | ||
diff --git a/include/net/netfilter/nf_nat.h b/include/net/netfilter/nf_nat.h index bd8eea720f2e..ad14a799fd2e 100644 --- a/include/net/netfilter/nf_nat.h +++ b/include/net/netfilter/nf_nat.h | |||
@@ -68,4 +68,19 @@ static inline struct nf_conn_nat *nfct_nat(const struct nf_conn *ct) | |||
68 | #endif | 68 | #endif |
69 | } | 69 | } |
70 | 70 | ||
71 | static inline bool nf_nat_oif_changed(unsigned int hooknum, | ||
72 | enum ip_conntrack_info ctinfo, | ||
73 | struct nf_conn_nat *nat, | ||
74 | const struct net_device *out) | ||
75 | { | ||
76 | #if IS_ENABLED(CONFIG_IP_NF_TARGET_MASQUERADE) || \ | ||
77 | IS_ENABLED(CONFIG_IP6_NF_TARGET_MASQUERADE) | ||
78 | return nat->masq_index && hooknum == NF_INET_POST_ROUTING && | ||
79 | CTINFO2DIR(ctinfo) == IP_CT_DIR_ORIGINAL && | ||
80 | nat->masq_index != out->ifindex; | ||
81 | #else | ||
82 | return false; | ||
83 | #endif | ||
84 | } | ||
85 | |||
71 | #endif | 86 | #endif |
diff --git a/include/net/netfilter/nf_queue.h b/include/net/netfilter/nf_queue.h index 252fd1010b77..fb1c0be38b6d 100644 --- a/include/net/netfilter/nf_queue.h +++ b/include/net/netfilter/nf_queue.h | |||
@@ -21,14 +21,10 @@ struct nf_queue_entry { | |||
21 | struct nf_queue_handler { | 21 | struct nf_queue_handler { |
22 | int (*outfn)(struct nf_queue_entry *entry, | 22 | int (*outfn)(struct nf_queue_entry *entry, |
23 | unsigned int queuenum); | 23 | unsigned int queuenum); |
24 | char *name; | ||
25 | }; | 24 | }; |
26 | 25 | ||
27 | extern int nf_register_queue_handler(u_int8_t pf, | 26 | void nf_register_queue_handler(const struct nf_queue_handler *qh); |
28 | const struct nf_queue_handler *qh); | 27 | void nf_unregister_queue_handler(void); |
29 | extern int nf_unregister_queue_handler(u_int8_t pf, | ||
30 | const struct nf_queue_handler *qh); | ||
31 | extern void nf_unregister_queue_handlers(const struct nf_queue_handler *qh); | ||
32 | extern void nf_reinject(struct nf_queue_entry *entry, unsigned int verdict); | 28 | extern void nf_reinject(struct nf_queue_entry *entry, unsigned int verdict); |
33 | 29 | ||
34 | #endif /* _NF_QUEUE_H */ | 30 | #endif /* _NF_QUEUE_H */ |