diff options
author | Yoshifumi Nishida <nishida@csl.sony.co.jp> | 2005-08-09 23:15:35 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2005-08-29 18:49:55 -0400 |
commit | 95b81ef794278c835b321f6376b0522cd5df59b7 (patch) | |
tree | c2163130b2a2e1bc8ced9ee70b4c87fcbe7cdf8e /net/dccp/output.c | |
parent | a019d6fe2b9da68ea4ba6cf3c4e86fc1dbf554c3 (diff) |
[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.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/net/dccp/output.c b/net/dccp/output.c index 22ca2910d4f2..4945eaa9d1a4 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) | |||
93 | break; | 93 | break; |
94 | } | 94 | } |
95 | 95 | ||
96 | dh->dccph_checksum = dccp_v4_checksum(skb); | 96 | dh->dccph_checksum = dccp_v4_checksum(skb, inet->saddr, |
97 | inet->daddr); | ||
97 | 98 | ||
98 | if (dcb->dccpd_type == DCCP_PKT_ACK || | 99 | if (dcb->dccpd_type == DCCP_PKT_ACK || |
99 | dcb->dccpd_type == DCCP_PKT_DATAACK) | 100 | dcb->dccpd_type == DCCP_PKT_DATAACK) |
@@ -193,7 +194,8 @@ struct sk_buff *dccp_make_response(struct sock *sk, struct dst_entry *dst, | |||
193 | dccp_hdr_set_seq(dh, dccp_rsk(req)->dreq_iss); | 194 | dccp_hdr_set_seq(dh, dccp_rsk(req)->dreq_iss); |
194 | dccp_hdr_set_ack(dccp_hdr_ack_bits(skb), dccp_rsk(req)->dreq_isr); | 195 | dccp_hdr_set_ack(dccp_hdr_ack_bits(skb), dccp_rsk(req)->dreq_isr); |
195 | 196 | ||
196 | dh->dccph_checksum = dccp_v4_checksum(skb); | 197 | dh->dccph_checksum = dccp_v4_checksum(skb, inet_rsk(req)->loc_addr, |
198 | inet_rsk(req)->rmt_addr); | ||
197 | 199 | ||
198 | DCCP_INC_STATS(DCCP_MIB_OUTSEGS); | 200 | DCCP_INC_STATS(DCCP_MIB_OUTSEGS); |
199 | return skb; | 201 | return skb; |
@@ -242,7 +244,8 @@ struct sk_buff *dccp_make_reset(struct sock *sk, struct dst_entry *dst, | |||
242 | 244 | ||
243 | dccp_hdr_reset(skb)->dccph_reset_code = code; | 245 | dccp_hdr_reset(skb)->dccph_reset_code = code; |
244 | 246 | ||
245 | dh->dccph_checksum = dccp_v4_checksum(skb); | 247 | dh->dccph_checksum = dccp_v4_checksum(skb, inet_sk(sk)->saddr, |
248 | inet_sk(sk)->daddr); | ||
246 | 249 | ||
247 | DCCP_INC_STATS(DCCP_MIB_OUTSEGS); | 250 | DCCP_INC_STATS(DCCP_MIB_OUTSEGS); |
248 | return skb; | 251 | return skb; |