From fb17dccd91ba9448c2adaca2dcf0f9d665e1e8a4 Mon Sep 17 00:00:00 2001 From: "Ayuso/emailAddress=pablo@netfilter.org" Date: Fri, 21 Dec 2007 18:35:10 +0000 Subject: o add support for related conntracks (requires Linux kernel >= 2.6.22) o update leftover references to `persistent' and `nack' modes --- src/build.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/build.c') diff --git a/src/build.c b/src/build.c index 109b26e..5fdc83f 100644 --- a/src/build.c +++ b/src/build.c @@ -102,6 +102,20 @@ void build_netpld(struct nf_conntrack *ct, struct netpld *pld, int query) if (nfct_attr_is_set(ct, ATTR_STATUS)) __build_u32(ct, pld, ATTR_STATUS); + /* setup the master conntrack */ + if (nfct_attr_is_set(ct, ATTR_MASTER_IPV4_SRC)) + __build_u32(ct, pld, ATTR_MASTER_IPV4_SRC); + if (nfct_attr_is_set(ct, ATTR_MASTER_IPV4_DST)) + __build_u32(ct, pld, ATTR_MASTER_IPV4_DST); + if (nfct_attr_is_set(ct, ATTR_MASTER_L3PROTO)) + __build_u8(ct, pld, ATTR_MASTER_L3PROTO); + if (nfct_attr_is_set(ct, ATTR_MASTER_PORT_SRC)) + __build_u16(ct, pld, ATTR_MASTER_PORT_SRC); + if (nfct_attr_is_set(ct, ATTR_MASTER_PORT_DST)) + __build_u16(ct, pld, ATTR_MASTER_PORT_DST); + if (nfct_attr_is_set(ct, ATTR_MASTER_L4PROTO)) + __build_u8(ct, pld, ATTR_MASTER_L4PROTO); + /* NAT */ if (nfct_getobjopt(ct, NFCT_GOPT_IS_SNAT)) { u_int32_t data = nfct_get_attr_u32(ct, ATTR_REPL_IPV4_DST); -- cgit v1.2.3