From abaa6410806e8a9a5d66243d56885d7be00ab524 Mon Sep 17 00:00:00 2001 From: Pablo Neira Ayuso Date: Sat, 21 Feb 2009 16:38:57 +0100 Subject: netlink: use u8 getter for TCP states This patch replace nfct_get_attr_u32 by nfct_get_attr_u8 which is the correct size of a TCP state. Set also the CLOSE_INIT flag for CLOSE TCP state (as nf_conntrack_proto_tcp allows). Signed-off-by: Pablo Neira Ayuso --- src/netlink.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/netlink.c b/src/netlink.c index ef729c1..cca6f3a 100644 --- a/src/netlink.c +++ b/src/netlink.c @@ -192,7 +192,7 @@ int nl_create_conntrack(struct nfct_handle *h, IP_CT_TCP_FLAG_SACK_PERM; /* FIXME: workaround, we should send TCP flags in updates */ - if (nfct_get_attr_u32(ct, ATTR_TCP_STATE) == + if (nfct_get_attr_u8(ct, ATTR_TCP_STATE) >= TCP_CONNTRACK_TIME_WAIT) { flags |= IP_CT_TCP_FLAG_CLOSE_INIT; } -- cgit v1.2.3