summaryrefslogtreecommitdiff
path: root/src/parse.c
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2010-07-13 11:30:08 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2010-07-13 11:30:08 +0200
commit1f3c6df4f8984fce347718cca09dd0e2fa138ce1 (patch)
treea5b4eb33580ff58d7d3a182ec43e4dd4d6177527 /src/parse.c
parent2e4b408ab7dd76bfaefd6cb5ea69fdff381a4b76 (diff)
downloadconntrack-tools-1f3c6df4f8984fce347718cca09dd0e2fa138ce1.tar.gz
conntrack-tools-1f3c6df4f8984fce347718cca09dd0e2fa138ce1.zip
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 <pablo@netfilter.org>
Diffstat (limited to 'src/parse.c')
-rw-r--r--src/parse.c10
1 files changed, 5 insertions, 5 deletions
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)