summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2009-02-21 16:38:57 +0100
committerPablo Neira Ayuso <pablo@netfilter.org>2009-02-21 16:38:57 +0100
commitabaa6410806e8a9a5d66243d56885d7be00ab524 (patch)
treed6e62184d2f033665f53d2b5b02029d7de1117a2
parentae94864dee8596fcaf19ffe5670d192a0efd5fd6 (diff)
downloadconntrack-tools-abaa6410806e8a9a5d66243d56885d7be00ab524.tar.gz
conntrack-tools-abaa6410806e8a9a5d66243d56885d7be00ab524.zip
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 <pablo@netfilter.org>
-rw-r--r--src/netlink.c2
1 files changed, 1 insertions, 1 deletions
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;
}