From cafa98a989bdc5623a0cb877a91e1a887f78649f Mon Sep 17 00:00:00 2001 From: Michael Tuexen Date: Sun, 14 Nov 2010 14:37:20 +0000 Subject: [PATCH] Simplify sctp_delayed_cksum() a bit. MFC after: 3 days. --- sys/netinet/sctp_crc32.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sys/netinet/sctp_crc32.c b/sys/netinet/sctp_crc32.c index 0ab8039ac064..b727ef9d4b93 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