diff options
author | Angelos D. Keromytis <angelos@cvs.openbsd.org> | 2001-06-24 23:45:17 +0000 |
---|---|---|
committer | Angelos D. Keromytis <angelos@cvs.openbsd.org> | 2001-06-24 23:45:17 +0000 |
commit | 97434121c1da2481d4290e26a1541f2eb5ce3ac9 (patch) | |
tree | 140c704cc99b6abbf315dfed8a0ca9cdad9b2bdb /sys | |
parent | 703b38ceca0d463d953eb2443d2ab72b8e841387 (diff) |
More descriptive panic messages, sync with NetBSD
Diffstat (limited to 'sys')
-rw-r--r-- | sys/netinet/in4_cksum.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/netinet/in4_cksum.c b/sys/netinet/in4_cksum.c index 8ec10ab9f4a..ff2b23783e8 100644 --- a/sys/netinet/in4_cksum.c +++ b/sys/netinet/in4_cksum.c @@ -1,4 +1,4 @@ -/* $OpenBSD: in4_cksum.c,v 1.3 2001/06/24 23:38:47 angelos Exp $ */ +/* $OpenBSD: in4_cksum.c,v 1.4 2001/06/24 23:45:16 angelos Exp $ */ /* $NetBSD: in_cksum.c,v 1.13 1996/10/13 02:03:03 christos Exp $ */ @@ -114,7 +114,9 @@ in4_cksum(m, nxt, off, len) if (nxt != 0) { /* pseudo header */ if (off < sizeof(struct ipovly)) - panic("offset too short"); + panic("in4_cksum: offset too short"); + if (m->m_len < sizeof(struct ip)) + panic("in4_cksum: bad mbuf chain"); bzero(&ipov, sizeof(ipov)); ipov.ih_len = htons(len); ipov.ih_pr = nxt; |