diff options
| author | Patrick McHardy <kaber@trash.net> | 2010-02-03 07:51:51 -0500 |
|---|---|---|
| committer | Patrick McHardy <kaber@trash.net> | 2010-02-03 07:51:51 -0500 |
| commit | 0cebe4b4163b6373c9d24c1a192939777bc27e55 (patch) | |
| tree | 6a091112f27c17b7bbe8d2adcdbf45564312bba4 /include/linux | |
| parent | 858b31330054a9ad259feceea0ad1ce5385c47f0 (diff) | |
netfilter: ctnetlink: support selective event delivery
Add two masks for conntrack end expectation events to struct nf_conntrack_ecache
and use them to filter events. Their default value is "all events" when the
event sysctl is on and "no events" when it is off. A following patch will add
specific initializations. Expectation events depend on the ecache struct of
their master conntrack.
Signed-off-by: Patrick McHardy <kaber@trash.net>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/netfilter/nf_conntrack_common.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/include/linux/netfilter/nf_conntrack_common.h b/include/linux/netfilter/nf_conntrack_common.h index a374787ed9b..ebfed90733f 100644 --- a/include/linux/netfilter/nf_conntrack_common.h +++ b/include/linux/netfilter/nf_conntrack_common.h | |||
| @@ -74,6 +74,24 @@ enum ip_conntrack_status { | |||
| 74 | IPS_FIXED_TIMEOUT = (1 << IPS_FIXED_TIMEOUT_BIT), | 74 | IPS_FIXED_TIMEOUT = (1 << IPS_FIXED_TIMEOUT_BIT), |
| 75 | }; | 75 | }; |
| 76 | 76 | ||
| 77 | /* Connection tracking event types */ | ||
| 78 | enum ip_conntrack_events { | ||
| 79 | IPCT_NEW, /* new conntrack */ | ||
| 80 | IPCT_RELATED, /* related conntrack */ | ||
| 81 | IPCT_DESTROY, /* destroyed conntrack */ | ||
| 82 | IPCT_REPLY, /* connection has seen two-way traffic */ | ||
| 83 | IPCT_ASSURED, /* connection status has changed to assured */ | ||
| 84 | IPCT_PROTOINFO, /* protocol information has changed */ | ||
| 85 | IPCT_HELPER, /* new helper has been set */ | ||
| 86 | IPCT_MARK, /* new mark has been set */ | ||
| 87 | IPCT_NATSEQADJ, /* NAT is doing sequence adjustment */ | ||
| 88 | IPCT_SECMARK, /* new security mark has been set */ | ||
| 89 | }; | ||
| 90 | |||
| 91 | enum ip_conntrack_expect_events { | ||
| 92 | IPEXP_NEW, /* new expectation */ | ||
| 93 | }; | ||
| 94 | |||
| 77 | #ifdef __KERNEL__ | 95 | #ifdef __KERNEL__ |
| 78 | struct ip_conntrack_stat { | 96 | struct ip_conntrack_stat { |
| 79 | unsigned int searched; | 97 | unsigned int searched; |
