tcp_ctloutput: when called for a socket which is not AF_INET or AF_INET6,
panic rather than returning possibly leaking an mbuf.
This commit is contained in:
parent
22ffb8ee31
commit
d4d55c3dc9
@ -1,4 +1,4 @@
|
|||||||
/* $NetBSD: tcp_usrreq.c,v 1.128 2006/10/19 14:14:34 rpaulo Exp $ */
|
/* $NetBSD: tcp_usrreq.c,v 1.129 2006/11/10 13:19:16 yamt Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
|
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
|
||||||
@ -102,7 +102,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <sys/cdefs.h>
|
#include <sys/cdefs.h>
|
||||||
__KERNEL_RCSID(0, "$NetBSD: tcp_usrreq.c,v 1.128 2006/10/19 14:14:34 rpaulo Exp $");
|
__KERNEL_RCSID(0, "$NetBSD: tcp_usrreq.c,v 1.129 2006/11/10 13:19:16 yamt Exp $");
|
||||||
|
|
||||||
#include "opt_inet.h"
|
#include "opt_inet.h"
|
||||||
#include "opt_ipsec.h"
|
#include "opt_ipsec.h"
|
||||||
@ -648,7 +648,7 @@ tcp_ctloutput(int op, struct socket *so, int level, int optname,
|
|||||||
#endif
|
#endif
|
||||||
default:
|
default:
|
||||||
splx(s);
|
splx(s);
|
||||||
return EAFNOSUPPORT;
|
panic("%s: af %d", __func__, family);
|
||||||
}
|
}
|
||||||
#ifndef INET6
|
#ifndef INET6
|
||||||
if (inp == NULL)
|
if (inp == NULL)
|
||||||
|
Loading…
Reference in New Issue
Block a user