From 08b5a4ecb8b8722b9554cba7ed3767f2f6d1956e Mon Sep 17 00:00:00 2001 From: thorpej Date: Mon, 1 Jun 1998 00:39:37 +0000 Subject: [PATCH] Protect the ipflow_reap() call with splsoftnet. --- sys/netinet/ip_input.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/sys/netinet/ip_input.c b/sys/netinet/ip_input.c index 8d3bc200e091..8263f098c595 100644 --- a/sys/netinet/ip_input.c +++ b/sys/netinet/ip_input.c @@ -1,4 +1,4 @@ -/* $NetBSD: ip_input.c,v 1.66 1998/05/24 20:14:53 thorpej Exp $ */ +/* $NetBSD: ip_input.c,v 1.67 1998/06/01 00:39:37 thorpej Exp $ */ /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -1400,10 +1400,16 @@ ip_sysctl(name, namelen, oldp, oldlenp, newp, newlen) return (error); #ifdef GATEWAY case IPCTL_MAXFLOWS: + { + int s; + error = sysctl_int(oldp, oldlenp, newp, newlen, &ip_maxflows); + s = splsoftnet(); ipflow_reap(0); + splx(s); return (error); + } #endif default: return (EOPNOTSUPP);