From 38e6856368bb2bca86a6b8f03ed4fe599b768f15 Mon Sep 17 00:00:00 2001 From: itojun Date: Mon, 23 Sep 2002 13:43:27 +0000 Subject: [PATCH] revert mtudisc_timeout value to the old one if update falis --- sys/netinet/ip_input.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/sys/netinet/ip_input.c b/sys/netinet/ip_input.c index 4f9b5ea8b398..c6030233e947 100644 --- a/sys/netinet/ip_input.c +++ b/sys/netinet/ip_input.c @@ -1,4 +1,4 @@ -/* $NetBSD: ip_input.c,v 1.157 2002/09/11 02:46:43 itojun Exp $ */ +/* $NetBSD: ip_input.c,v 1.158 2002/09/23 13:43:27 itojun Exp $ */ /* * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. @@ -102,7 +102,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ip_input.c,v 1.157 2002/09/11 02:46:43 itojun Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ip_input.c,v 1.158 2002/09/23 13:43:27 itojun Exp $"); #include "opt_gateway.h" #include "opt_pfil_hooks.h" @@ -1863,10 +1863,13 @@ ip_sysctl(name, namelen, oldp, oldlenp, newp, newlen) } return (error); case IPCTL_MTUDISCTIMEOUT: + old = ip_mtudisc_timeout; error = sysctl_int(oldp, oldlenp, newp, newlen, &ip_mtudisc_timeout); - if (ip_mtudisc_timeout < 0) + if (ip_mtudisc_timeout < 0) { + ip_mtudisc_timeout = old; return (EINVAL); + } if (ip_mtudisc_timeout_q != NULL) rt_timer_queue_change(ip_mtudisc_timeout_q, ip_mtudisc_timeout);