diff options
Diffstat (limited to 'freebsd/sys/netinet/sctp_crc32.c')
-rw-r--r-- | freebsd/sys/netinet/sctp_crc32.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/freebsd/sys/netinet/sctp_crc32.c b/freebsd/sys/netinet/sctp_crc32.c index 3d07f505..bf6da201 100644 --- a/freebsd/sys/netinet/sctp_crc32.c +++ b/freebsd/sys/netinet/sctp_crc32.c @@ -2,6 +2,8 @@ /*- * Copyright (c) 2001-2007, by Cisco Systems, Inc. All rights reserved. + * Copyright (c) 2008-2012, by Randall Stewart. All rights reserved. + * Copyright (c) 2008-2012, by Michael Tuexen. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: @@ -30,9 +32,6 @@ * THE POSSIBILITY OF SUCH DAMAGE. */ -/* $KAME: sctp_crc32.c,v 1.12 2005/03/06 16:04:17 itojun Exp $ */ - - #include <sys/cdefs.h> __FBSDID("$FreeBSD$"); @@ -124,7 +123,9 @@ void sctp_delayed_cksum(struct mbuf *m, uint32_t offset) { #if defined(SCTP_WITH_NO_CSUM) +#ifdef INVARIANTS panic("sctp_delayed_cksum() called when using no SCTP CRC."); +#endif #else uint32_t checksum; @@ -134,7 +135,7 @@ sctp_delayed_cksum(struct mbuf *m, uint32_t offset) offset += offsetof(struct sctphdr, checksum); if (offset + sizeof(uint32_t) > (uint32_t) (m->m_len)) { - printf("sctp_delayed_cksum(): m->len: %d, off: %d.\n", + SCTP_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 |