summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorarr <arr@FreeBSD.org>2002-05-20 22:05:13 +0000
committerarr <arr@FreeBSD.org>2002-05-20 22:05:13 +0000
commitf20545d47c5fccce9e5cfe9ab6ec571bb10b36e5 (patch)
tree85a1bd3ff27bb2bed4d5ab9cad5376a55e3c58f7
parent56aea61cc918b4c5a9bfed9b0f210f57b7f2f8b3 (diff)
downloadFreeBSD-src-f20545d47c5fccce9e5cfe9ab6ec571bb10b36e5.zip
FreeBSD-src-f20545d47c5fccce9e5cfe9ab6ec571bb10b36e5.tar.gz
- Turn a few DIAGNOSTIC into INVARIANTS since they are really sanity
checks.
-rw-r--r--sys/netinet/ip_output.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/netinet/ip_output.c b/sys/netinet/ip_output.c
index d9d2145..818bd94 100644
--- a/sys/netinet/ip_output.c
+++ b/sys/netinet/ip_output.c
@@ -186,7 +186,7 @@ ip_output(m0, opt, ro, flags, imo)
(void)ipsec_setsocket(m, NULL);
#endif
-#ifdef DIAGNOSTIC
+#ifdef INVARIANTS
if ((m->m_flags & M_PKTHDR) == 0)
panic("ip_output no HDR");
if (!ro)
@@ -1111,12 +1111,12 @@ ip_optcopy(ip, jp)
optlen = 1;
continue;
}
-#ifdef DIAGNOSTIC
+#ifdef INVARIANTS
if (cnt < IPOPT_OLEN + sizeof(*cp))
panic("malformed IPv4 option passed to ip_optcopy");
#endif
optlen = cp[IPOPT_OLEN];
-#ifdef DIAGNOSTIC
+#ifdef INVARIANTS
if (optlen < IPOPT_OLEN + sizeof(*cp) || optlen > cnt)
panic("malformed IPv4 option passed to ip_optcopy");
#endif
OpenPOWER on IntegriCloud