summaryrefslogtreecommitdiff
path: root/src/build.c
diff options
context:
space:
mode:
authorAyuso/emailAddress=pablo@netfilter.org <Ayuso/emailAddress=pablo@netfilter.org>2007-12-21 18:35:10 +0000
committerYasuyuki Kozakai <yasuyuki.kozakai@toshiba.co.jp>2007-12-23 03:14:53 +0900
commitfb17dccd91ba9448c2adaca2dcf0f9d665e1e8a4 (patch)
tree21fadc55e2bda77809b9bd55da8c8634c4c7ddfc /src/build.c
parent735a6fc681809beb52c160b09507aa0999fbc6ba (diff)
downloadconntrack-tools-fb17dccd91ba9448c2adaca2dcf0f9d665e1e8a4.tar.gz
conntrack-tools-fb17dccd91ba9448c2adaca2dcf0f9d665e1e8a4.zip
o add support for related conntracks (requires Linux kernel >= 2.6.22)
o update leftover references to `persistent' and `nack' modes
Diffstat (limited to 'src/build.c')
-rw-r--r--src/build.c14
1 files changed, 14 insertions, 0 deletions
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);