Don't call ip*flow_reap if we're just looking up maxflows
This commit is contained in:
parent
c553649c20
commit
ac43382f1f
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: ip_input.c,v 1.246 2007/03/12 18:18:36 ad Exp $ */
|
||||
/* $NetBSD: ip_input.c,v 1.247 2007/03/24 00:27:58 liamjfoy Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
|
||||
@ -98,7 +98,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: ip_input.c,v 1.246 2007/03/12 18:18:36 ad Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: ip_input.c,v 1.247 2007/03/24 00:27:58 liamjfoy Exp $");
|
||||
|
||||
#include "opt_inet.h"
|
||||
#include "opt_gateway.h"
|
||||
@ -2160,8 +2160,7 @@ sysctl_net_inet_ip_pmtudto(SYSCTLFN_ARGS)
|
||||
|
||||
#ifdef GATEWAY
|
||||
/*
|
||||
* sysctl helper routine for net.inet.ip.maxflows. apparently if
|
||||
* maxflows is even looked up, we "reap flows".
|
||||
* sysctl helper routine for net.inet.ip.maxflows.
|
||||
*/
|
||||
static int
|
||||
sysctl_net_inet_ip_maxflows(SYSCTLFN_ARGS)
|
||||
@ -2169,7 +2168,7 @@ sysctl_net_inet_ip_maxflows(SYSCTLFN_ARGS)
|
||||
int s;
|
||||
|
||||
s = sysctl_lookup(SYSCTLFN_CALL(rnode));
|
||||
if (s)
|
||||
if (s || newp == NULL)
|
||||
return (s);
|
||||
|
||||
s = splsoftnet();
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: ip6_input.c,v 1.99 2007/03/23 14:24:22 liamjfoy Exp $ */
|
||||
/* $NetBSD: ip6_input.c,v 1.100 2007/03/24 00:27:58 liamjfoy Exp $ */
|
||||
/* $KAME: ip6_input.c,v 1.188 2001/03/29 05:34:31 itojun Exp $ */
|
||||
|
||||
/*
|
||||
@ -62,7 +62,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: ip6_input.c,v 1.99 2007/03/23 14:24:22 liamjfoy Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: ip6_input.c,v 1.100 2007/03/24 00:27:58 liamjfoy Exp $");
|
||||
|
||||
#include "opt_inet.h"
|
||||
#include "opt_inet6.h"
|
||||
@ -1616,7 +1616,7 @@ sysctl_net_inet_ip6_maxflows(SYSCTLFN_ARGS)
|
||||
int s;
|
||||
|
||||
s = sysctl_lookup(SYSCTLFN_CALL(rnode));
|
||||
if (s)
|
||||
if (s || newp == NULL)
|
||||
return (s);
|
||||
|
||||
s = splsoftnet();
|
||||
|
Loading…
Reference in New Issue
Block a user