diff options
author | /C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org </C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org> | 2008-02-09 20:07:36 +0000 |
---|---|---|
committer | /C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org </C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org> | 2008-02-09 20:07:36 +0000 |
commit | 7784ef33db4361269afe9b302fa9dbb4a65aaf35 (patch) | |
tree | ab49008b2ece72bf0b9bb122b3d40bfc17119855 /src/parse.c | |
parent | 2da4ea01c1913622669e6f638f06483c257797f7 (diff) | |
download | conntrack-tools-7784ef33db4361269afe9b302fa9dbb4a65aaf35.tar.gz conntrack-tools-7784ef33db4361269afe9b302fa9dbb4a65aaf35.zip |
o add IPv6 information to synchronization messages
o add support for NAT sequence adjustment (requires Linux kernel >= 2.6.25)
o remove TODO file from release tarballs
Diffstat (limited to 'src/parse.c')
-rw-r--r-- | src/parse.c | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/src/parse.c b/src/parse.c index 5bc71ef..8ef2e8d 100644 --- a/src/parse.c +++ b/src/parse.c @@ -38,11 +38,18 @@ static void parse_u32(struct nf_conntrack *ct, int attr, void *data) nfct_set_attr_u32(ct, attr, ntohl(*value)); } +static void parse_pointer_be(struct nf_conntrack *ct, int attr, void *data) +{ + nfct_set_attr(ct, attr, data); +} + typedef void (*parse)(struct nf_conntrack *ct, int attr, void *data); static parse h[ATTR_MAX] = { - [ATTR_IPV4_SRC] = parse_u32, - [ATTR_IPV4_DST] = parse_u32, + [ATTR_IPV4_SRC] = parse_pointer_be, + [ATTR_IPV4_DST] = parse_pointer_be, + [ATTR_IPV6_SRC] = parse_pointer_be, + [ATTR_IPV6_DST] = parse_pointer_be, [ATTR_L3PROTO] = parse_u8, [ATTR_PORT_SRC] = parse_u16, [ATTR_PORT_DST] = parse_u16, @@ -61,7 +68,13 @@ static parse h[ATTR_MAX] = { [ATTR_MASTER_L3PROTO] = parse_u8, [ATTR_MASTER_PORT_SRC] = parse_u16, [ATTR_MASTER_PORT_DST] = parse_u16, - [ATTR_MASTER_L4PROTO] = parse_u8 + [ATTR_MASTER_L4PROTO] = parse_u8, + [ATTR_ORIG_NAT_SEQ_CORRECTION_POS] = parse_u32, + [ATTR_ORIG_NAT_SEQ_OFFSET_BEFORE] = parse_u32, + [ATTR_ORIG_NAT_SEQ_OFFSET_AFTER] = parse_u32, + [ATTR_REPL_NAT_SEQ_CORRECTION_POS] = parse_u32, + [ATTR_REPL_NAT_SEQ_OFFSET_BEFORE] = parse_u32, + [ATTR_REPL_NAT_SEQ_OFFSET_AFTER] = parse_u32, }; void parse_netpld(struct nf_conntrack *ct, struct netpld *pld, int *query) |