Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 172149
b: refs/heads/master
c: 76ac894
h: refs/heads/master
i:
  172147: 61a7171
v: v3
  • Loading branch information
Hannes Eder authored and Patrick McHardy committed Nov 5, 2009
1 parent d1bc261 commit 3133d84
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 14 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5ae27aa2b16478a84d833ab4065798e752941c5a
refs/heads/master: 76ac894080019c6619d3c3bf615db42a43a77f32
22 changes: 9 additions & 13 deletions trunk/net/ipv4/netfilter/nf_nat_helper.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,18 +41,14 @@ adjust_tcp_sequence(u32 seq,
struct nf_conn *ct,
enum ip_conntrack_info ctinfo)
{
int dir;
struct nf_nat_seq *this_way, *other_way;
enum ip_conntrack_dir dir = CTINFO2DIR(ctinfo);
struct nf_conn_nat *nat = nfct_nat(ct);
struct nf_nat_seq *this_way = &nat->seq[dir];

pr_debug("adjust_tcp_sequence: seq = %u, sizediff = %d\n", seq, seq);

dir = CTINFO2DIR(ctinfo);

this_way = &nat->seq[dir];
other_way = &nat->seq[!dir];
pr_debug("adjust_tcp_sequence: seq = %u, sizediff = %d\n",
seq, sizediff);

pr_debug("nf_nat_resize_packet: Seq_offset before: ");
pr_debug("adjust_tcp_sequence: Seq_offset before: ");
DUMP_OFFSET(this_way);

spin_lock_bh(&nf_nat_seqofs_lock);
Expand All @@ -63,13 +59,13 @@ adjust_tcp_sequence(u32 seq,
* retransmit */
if (this_way->offset_before == this_way->offset_after ||
before(this_way->correction_pos, seq)) {
this_way->correction_pos = seq;
this_way->offset_before = this_way->offset_after;
this_way->offset_after += sizediff;
this_way->correction_pos = seq;
this_way->offset_before = this_way->offset_after;
this_way->offset_after += sizediff;
}
spin_unlock_bh(&nf_nat_seqofs_lock);

pr_debug("nf_nat_resize_packet: Seq_offset after: ");
pr_debug("adjust_tcp_sequence: Seq_offset after: ");
DUMP_OFFSET(this_way);
}

Expand Down

0 comments on commit 3133d84

Please sign in to comment.