summaryrefslogtreecommitdiff
path: root/net/sctp
diff options
context:
space:
mode:
Diffstat (limited to 'net/sctp')
-rw-r--r--net/sctp/input.c3
-rw-r--r--net/sctp/output.c2
-rw-r--r--net/sctp/protocol.c2
3 files changed, 5 insertions, 2 deletions
diff --git a/net/sctp/input.c b/net/sctp/input.c
index 2e4a8646dbc3..693fd0804810 100644
--- a/net/sctp/input.c
+++ b/net/sctp/input.c
@@ -142,7 +142,8 @@ int sctp_rcv(struct sk_buff *skb)
__skb_pull(skb, skb_transport_offset(skb));
if (skb->len < sizeof(struct sctphdr))
goto discard_it;
- if (!skb_csum_unnecessary(skb) && sctp_rcv_checksum(skb) < 0)
+ if (!sctp_checksum_disable && !skb_csum_unnecessary(skb) &&
+ sctp_rcv_checksum(skb) < 0)
goto discard_it;
skb_pull(skb, sizeof(struct sctphdr));
diff --git a/net/sctp/output.c b/net/sctp/output.c
index 47bfba6c03ec..2d65b7a7330b 100644
--- a/net/sctp/output.c
+++ b/net/sctp/output.c
@@ -531,7 +531,7 @@ int sctp_packet_transmit(struct sctp_packet *packet)
* Note: Adler-32 is no longer applicable, as has been replaced
* by CRC32-C as described in <draft-ietf-tsvwg-sctpcsum-02.txt>.
*/
- if (!(dst->dev->features & NETIF_F_NO_CSUM)) {
+ if (!sctp_checksum_disable && !(dst->dev->features & NETIF_F_NO_CSUM)) {
crc32 = sctp_start_cksum((__u8 *)sh, cksum_buf_len);
crc32 = sctp_end_cksum(crc32);
} else
diff --git a/net/sctp/protocol.c b/net/sctp/protocol.c
index b78e3be69013..cc0b592698f9 100644
--- a/net/sctp/protocol.c
+++ b/net/sctp/protocol.c
@@ -1411,4 +1411,6 @@ MODULE_ALIAS("net-pf-" __stringify(PF_INET) "-proto-132");
MODULE_ALIAS("net-pf-" __stringify(PF_INET6) "-proto-132");
MODULE_AUTHOR("Linux Kernel SCTP developers <lksctp-developers@lists.sourceforge.net>");
MODULE_DESCRIPTION("Support for the SCTP protocol (RFC2960)");
+module_param_named(no_checksums, sctp_checksum_disable, bool, 0644);
+MODULE_PARM_DESC(no_checksums, "Disable checksums computing and verification");
MODULE_LICENSE("GPL");