diff options
author | David S. Miller <davem@davemloft.net> | 2011-07-21 16:38:42 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-07-21 16:38:42 -0400 |
commit | 033b1142f4bd44a116d1356fe4a0510437ceddf9 (patch) | |
tree | d2a971a7dc9f3a1af8035e38419c4c4ad8c22632 /net/sctp | |
parent | f5caadbb3d8fc0b71533e880c684b2230bdb76ac (diff) | |
parent | e6625fa48e6580a74b7e700efd7e6463e282810b (diff) |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts:
net/bluetooth/l2cap_core.c
Diffstat (limited to 'net/sctp')
-rw-r--r-- | net/sctp/output.c | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/net/sctp/output.c b/net/sctp/output.c index b4f3cf06d8da..08b3cead6503 100644 --- a/net/sctp/output.c +++ b/net/sctp/output.c | |||
@@ -500,23 +500,20 @@ int sctp_packet_transmit(struct sctp_packet *packet) | |||
500 | * Note: Adler-32 is no longer applicable, as has been replaced | 500 | * Note: Adler-32 is no longer applicable, as has been replaced |
501 | * by CRC32-C as described in <draft-ietf-tsvwg-sctpcsum-02.txt>. | 501 | * by CRC32-C as described in <draft-ietf-tsvwg-sctpcsum-02.txt>. |
502 | */ | 502 | */ |
503 | if (!sctp_checksum_disable && | 503 | if (!sctp_checksum_disable) { |
504 | !(dst->dev->features & (NETIF_F_NO_CSUM | NETIF_F_SCTP_CSUM))) { | 504 | if (!(dst->dev->features & NETIF_F_SCTP_CSUM)) { |
505 | __u32 crc32 = sctp_start_cksum((__u8 *)sh, cksum_buf_len); | 505 | __u32 crc32 = sctp_start_cksum((__u8 *)sh, cksum_buf_len); |
506 | 506 | ||
507 | /* 3) Put the resultant value into the checksum field in the | 507 | /* 3) Put the resultant value into the checksum field in the |
508 | * common header, and leave the rest of the bits unchanged. | 508 | * common header, and leave the rest of the bits unchanged. |
509 | */ | 509 | */ |
510 | sh->checksum = sctp_end_cksum(crc32); | 510 | sh->checksum = sctp_end_cksum(crc32); |
511 | } else { | 511 | } else { |
512 | if (dst->dev->features & NETIF_F_SCTP_CSUM) { | ||
513 | /* no need to seed pseudo checksum for SCTP */ | 512 | /* no need to seed pseudo checksum for SCTP */ |
514 | nskb->ip_summed = CHECKSUM_PARTIAL; | 513 | nskb->ip_summed = CHECKSUM_PARTIAL; |
515 | nskb->csum_start = (skb_transport_header(nskb) - | 514 | nskb->csum_start = (skb_transport_header(nskb) - |
516 | nskb->head); | 515 | nskb->head); |
517 | nskb->csum_offset = offsetof(struct sctphdr, checksum); | 516 | nskb->csum_offset = offsetof(struct sctphdr, checksum); |
518 | } else { | ||
519 | nskb->ip_summed = CHECKSUM_UNNECESSARY; | ||
520 | } | 517 | } |
521 | } | 518 | } |
522 | 519 | ||