summaryrefslogtreecommitdiff
path: root/src/build.c
diff options
context:
space:
mode:
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 d6c8837..6363458 100644
--- a/src/build.c
+++ b/src/build.c
@@ -146,6 +146,20 @@ void build_netpld(struct nf_conntrack *ct, struct netpld *pld, int query)
__nat_build_u16(data, pld, ATTR_DNAT_PORT);
}
+ /* NAT sequence adjustment */
+ if (nfct_attr_is_set(ct, ATTR_ORIG_NAT_SEQ_CORRECTION_POS))
+ __build_u32(ct, pld, ATTR_ORIG_NAT_SEQ_CORRECTION_POS);
+ if (nfct_attr_is_set(ct, ATTR_ORIG_NAT_SEQ_OFFSET_BEFORE))
+ __build_u32(ct, pld, ATTR_ORIG_NAT_SEQ_OFFSET_BEFORE);
+ if (nfct_attr_is_set(ct, ATTR_ORIG_NAT_SEQ_OFFSET_AFTER))
+ __build_u32(ct, pld, ATTR_ORIG_NAT_SEQ_OFFSET_AFTER);
+ if (nfct_attr_is_set(ct, ATTR_REPL_NAT_SEQ_CORRECTION_POS))
+ __build_u32(ct, pld, ATTR_REPL_NAT_SEQ_CORRECTION_POS);
+ if (nfct_attr_is_set(ct, ATTR_REPL_NAT_SEQ_OFFSET_BEFORE))
+ __build_u32(ct, pld, ATTR_REPL_NAT_SEQ_OFFSET_BEFORE);
+ if (nfct_attr_is_set(ct, ATTR_REPL_NAT_SEQ_OFFSET_AFTER))
+ __build_u32(ct, pld, ATTR_REPL_NAT_SEQ_OFFSET_AFTER);
+
pld->query = query;
PLD_HOST2NETWORK(pld);