summaryrefslogtreecommitdiffstats
path: root/net/dccp/output.c
diff options
context:
space:
mode:
authorYoshifumi Nishida <nishida@csl.sony.co.jp>2005-08-09 20:15:35 -0700
committerDavid S. Miller <davem@sunset.davemloft.net>2005-08-29 15:49:55 -0700
commit95b81ef794278c835b321f6376b0522cd5df59b7 (patch)
treec2163130b2a2e1bc8ced9ee70b4c87fcbe7cdf8e /net/dccp/output.c
parenta019d6fe2b9da68ea4ba6cf3c4e86fc1dbf554c3 (diff)
downloadop-kernel-dev-95b81ef794278c835b321f6376b0522cd5df59b7.zip
op-kernel-dev-95b81ef794278c835b321f6376b0522cd5df59b7.tar.gz
[DCCP]: Fix checksum routines
Signed-off-by: Yoshifumi Nishida <nishida@csl.sony.co.jp> Signed-off-by: Arnaldo Carvalho de Melo <acme@ghostprotocols.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/dccp/output.c')
-rw-r--r--net/dccp/output.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/net/dccp/output.c b/net/dccp/output.c
index 22ca291..4945eaa 100644
--- a/net/dccp/output.c
+++ b/net/dccp/output.c
@@ -93,7 +93,8 @@ int dccp_transmit_skb(struct sock *sk, struct sk_buff *skb)
break;
}
- dh->dccph_checksum = dccp_v4_checksum(skb);
+ dh->dccph_checksum = dccp_v4_checksum(skb, inet->saddr,
+ inet->daddr);
if (dcb->dccpd_type == DCCP_PKT_ACK ||
dcb->dccpd_type == DCCP_PKT_DATAACK)
@@ -193,7 +194,8 @@ struct sk_buff *dccp_make_response(struct sock *sk, struct dst_entry *dst,
dccp_hdr_set_seq(dh, dccp_rsk(req)->dreq_iss);
dccp_hdr_set_ack(dccp_hdr_ack_bits(skb), dccp_rsk(req)->dreq_isr);
- dh->dccph_checksum = dccp_v4_checksum(skb);
+ dh->dccph_checksum = dccp_v4_checksum(skb, inet_rsk(req)->loc_addr,
+ inet_rsk(req)->rmt_addr);
DCCP_INC_STATS(DCCP_MIB_OUTSEGS);
return skb;
@@ -242,7 +244,8 @@ struct sk_buff *dccp_make_reset(struct sock *sk, struct dst_entry *dst,
dccp_hdr_reset(skb)->dccph_reset_code = code;
- dh->dccph_checksum = dccp_v4_checksum(skb);
+ dh->dccph_checksum = dccp_v4_checksum(skb, inet_sk(sk)->saddr,
+ inet_sk(sk)->daddr);
DCCP_INC_STATS(DCCP_MIB_OUTSEGS);
return skb;
OpenPOWER on IntegriCloud