From 1f3c6df4f8984fce347718cca09dd0e2fa138ce1 Mon Sep 17 00:00:00 2001 From: Pablo Neira Ayuso Date: Tue, 13 Jul 2010 11:30:08 +0200 Subject: conntrackd: fix parsing of NAT sequence adjustment in synchronization messages This patch fixes a bug that results in an incorrect parsing of the NAT sequence adjustment in synchronization messages. Spotted by Adam Gundy in the following message that was sent to the netfilter ML: http://marc.info/?l=netfilter&m=127894708222913&w=2 Signed-off-by: Pablo Neira Ayuso --- src/parse.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/parse.c') diff --git a/src/parse.c b/src/parse.c index 3eb7f44..7e60597 100644 --- a/src/parse.c +++ b/src/parse.c @@ -207,15 +207,15 @@ parse_nat_seq_adj(struct nf_conntrack *ct, int attr, void *data) nfct_set_attr_u32(ct, ATTR_ORIG_NAT_SEQ_CORRECTION_POS, ntohl(this->orig_seq_correction_pos)); nfct_set_attr_u32(ct, ATTR_ORIG_NAT_SEQ_OFFSET_BEFORE, - ntohl(this->orig_seq_correction_pos)); + ntohl(this->orig_seq_offset_before)); nfct_set_attr_u32(ct, ATTR_ORIG_NAT_SEQ_OFFSET_AFTER, - ntohl(this->orig_seq_correction_pos)); + ntohl(this->orig_seq_offset_after)); nfct_set_attr_u32(ct, ATTR_REPL_NAT_SEQ_CORRECTION_POS, - ntohl(this->orig_seq_correction_pos)); + ntohl(this->repl_seq_correction_pos)); nfct_set_attr_u32(ct, ATTR_REPL_NAT_SEQ_OFFSET_BEFORE, - ntohl(this->orig_seq_correction_pos)); + ntohl(this->repl_seq_offset_before)); nfct_set_attr_u32(ct, ATTR_REPL_NAT_SEQ_OFFSET_AFTER, - ntohl(this->orig_seq_correction_pos)); + ntohl(this->repl_seq_offset_after)); } int parse_payload(struct nf_conntrack *ct, struct nethdr *net, size_t remain) -- cgit v1.2.3