summaryrefslogtreecommitdiffstats
path: root/sys/netinet
diff options
context:
space:
mode:
authortuexen <tuexen@FreeBSD.org>2010-11-14 14:37:20 +0000
committertuexen <tuexen@FreeBSD.org>2010-11-14 14:37:20 +0000
commit46d16d30f250ee1a0f6c356def0f6a2360fe0046 (patch)
tree341b23f946a5c2611b8100e151c59e3f68703933 /sys/netinet
parent2cc8d62e9456aba6371a0711b5f25683c11dd22b (diff)
downloadFreeBSD-src-46d16d30f250ee1a0f6c356def0f6a2360fe0046.zip
FreeBSD-src-46d16d30f250ee1a0f6c356def0f6a2360fe0046.tar.gz
Simplify sctp_delayed_cksum() a bit.
MFC after: 3 days.
Diffstat (limited to 'sys/netinet')
-rw-r--r--sys/netinet/sctp_crc32.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/sys/netinet/sctp_crc32.c b/sys/netinet/sctp_crc32.c
index 0ab8039..b727ef9 100644
--- a/sys/netinet/sctp_crc32.c
+++ b/sys/netinet/sctp_crc32.c
@@ -124,18 +124,16 @@ sctp_delayed_cksum(struct mbuf *m, uint32_t offset)
#if defined(SCTP_WITH_NO_CSUM)
panic("sctp_delayed_cksum() called when using no SCTP CRC.");
#else
- struct ip *ip;
uint32_t checksum;
- ip = mtod(m, struct ip *);
checksum = sctp_calculate_cksum(m, offset);
SCTP_STAT_DECR(sctps_sendhwcrc);
SCTP_STAT_INCR(sctps_sendswcrc);
offset += offsetof(struct sctphdr, checksum);
if (offset + sizeof(uint32_t) > (uint32_t) (m->m_len)) {
- printf("delayed m_pullup, m->len: %d off: %d p: %d\n",
- (uint32_t) m->m_len, offset, ip->ip_p);
+ printf("sctp_delayed_cksum(): m->len: %d, off: %d.\n",
+ (uint32_t) m->m_len, offset);
/*
* XXX this shouldn't happen, but if it does, the correct
* behavior may be to insert the checksum in the appropriate
OpenPOWER on IntegriCloud