summaryrefslogtreecommitdiff
path: root/net/ipv4/netfilter/ipt_REJECT.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2010-08-02 22:07:58 (GMT)
committerDavid S. Miller <davem@davemloft.net>2010-08-02 22:07:58 (GMT)
commit83bf2e4089bebc2c7fd14a79de5954b26fe8d4af (patch)
treeab2cb1f229ba4c2d7236406c997e41a223daf74d /net/ipv4/netfilter/ipt_REJECT.c
parentde38483010bae523f533bb6bf9f7b7353772f6eb (diff)
parent6661481d5a8975657742c7ed40ae16bdaa7d0a6e (diff)
downloadlinux-fsl-qoriq-83bf2e4089bebc2c7fd14a79de5954b26fe8d4af.tar.xz
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/kaber/nf-next-2.6
Diffstat (limited to 'net/ipv4/netfilter/ipt_REJECT.c')
-rw-r--r--net/ipv4/netfilter/ipt_REJECT.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/net/ipv4/netfilter/ipt_REJECT.c b/net/ipv4/netfilter/ipt_REJECT.c
index bbbd273..b254daf 100644
--- a/net/ipv4/netfilter/ipt_REJECT.c
+++ b/net/ipv4/netfilter/ipt_REJECT.c
@@ -95,10 +95,11 @@ static void send_reset(struct sk_buff *oldskb, int hook)
}
tcph->rst = 1;
- tcph->check = tcp_v4_check(sizeof(struct tcphdr),
- niph->saddr, niph->daddr,
- csum_partial(tcph,
- sizeof(struct tcphdr), 0));
+ tcph->check = ~tcp_v4_check(sizeof(struct tcphdr), niph->saddr,
+ niph->daddr, 0);
+ nskb->ip_summed = CHECKSUM_PARTIAL;
+ nskb->csum_start = (unsigned char *)tcph - nskb->head;
+ nskb->csum_offset = offsetof(struct tcphdr, check);
addr_type = RTN_UNSPEC;
if (hook != NF_INET_FORWARD
@@ -115,7 +116,6 @@ static void send_reset(struct sk_buff *oldskb, int hook)
goto free_nskb;
niph->ttl = dst_metric(skb_dst(nskb), RTAX_HOPLIMIT);
- nskb->ip_summed = CHECKSUM_NONE;
/* "Never happens" */
if (nskb->len > dst_mtu(skb_dst(nskb)))