diff options
author | Jun-ichiro itojun Hagino <itojun@cvs.openbsd.org> | 2000-06-18 07:30:46 +0000 |
---|---|---|
committer | Jun-ichiro itojun Hagino <itojun@cvs.openbsd.org> | 2000-06-18 07:30:46 +0000 |
commit | ffb1d8f45539a299520b0f1aed34914e7c300f7a (patch) | |
tree | 1e0d02fcb4190c34e286eeaeed64a8dc44f0111f /sys/netinet | |
parent | 2150d33fb6cf1dfe1016cbf7782271645f323685 (diff) |
sanity check: panic if AF_INET6 inpcb is passed to ip_output
Diffstat (limited to 'sys/netinet')
-rw-r--r-- | sys/netinet/ip_output.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/netinet/ip_output.c b/sys/netinet/ip_output.c index 11c1551e532..d3ffe059420 100644 --- a/sys/netinet/ip_output.c +++ b/sys/netinet/ip_output.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ip_output.c,v 1.74 2000/06/18 07:13:50 itojun Exp $ */ +/* $OpenBSD: ip_output.c,v 1.75 2000/06/18 07:30:45 itojun Exp $ */ /* $NetBSD: ip_output.c,v 1.28 1996/02/13 23:43:07 christos Exp $ */ /* @@ -143,6 +143,8 @@ ip_output(m0, va_alist) imo = va_arg(ap, struct ip_moptions *); #ifdef IPSEC inp = va_arg(ap, struct inpcb *); + if (inp && (inp->inp_flags & INP_IPV6) != 0) + panic("ip_output: IPv6 pcb is passed"); #endif /* IPSEC */ va_end(ap); |