From b0a327b7a8fda0ebe936839235394de03b520f5e Mon Sep 17 00:00:00 2001 From: Pablo Neira Ayuso Date: Tue, 29 Jul 2008 16:01:41 +0200 Subject: filter: skip protocol state filtering if state not present Skip user-space the protocol state filter if the protocol state is not present in the event message. Signed-off-by: Pablo Neira Ayuso --- src/filter.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/filter.c') diff --git a/src/filter.c b/src/filter.c index 6e4d64a..eaf0a93 100644 --- a/src/filter.c +++ b/src/filter.c @@ -192,6 +192,9 @@ static int __ct_filter_test_state(struct ct_filter *f, struct nf_conntrack *ct) switch(protonum) { case IPPROTO_TCP: + if (!nfct_attr_is_set(ct, ATTR_TCP_STATE)) + return -1; + val = nfct_get_attr_u8(ct, ATTR_TCP_STATE); break; default: -- cgit v1.2.3