Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. =================================================================== RCS file: /ftp/cvs/cvsroot/src/sys/netinet/ip_input.c,v retrieving revision 1.155 retrieving revision 1.156 diff -u -p -r1.155 -r1.156 --- src/sys/netinet/ip_input.c 2002/08/14 00:23:31 1.155 +++ src/sys/netinet/ip_input.c 2002/09/11 02:41:19 1.156 @@ -1,4 +1,4 @@ -/* $NetBSD: ip_input.c,v 1.155 2002/08/14 00:23:31 itojun Exp $ */ +/* $NetBSD: ip_input.c,v 1.156 2002/09/11 02:41:19 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.155 2002/08/14 00:23:31 itojun Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ip_input.c,v 1.156 2002/09/11 02:41:19 itojun Exp $"); #include "opt_gateway.h" #include "opt_pfil_hooks.h" @@ -192,7 +192,7 @@ int ip_forwsrcrt = IPFORWSRCRT; int ip_directedbcast = IPDIRECTEDBCAST; int ip_allowsrcrt = IPALLOWSRCRT; int ip_mtudisc = IPMTUDISC; -u_int ip_mtudisc_timeout = IPMTUDISCTIMEOUT; +int ip_mtudisc_timeout = IPMTUDISCTIMEOUT; #ifdef DIAGNOSTIC int ipprintfs = 0; #endif @@ -1865,6 +1865,8 @@ ip_sysctl(name, namelen, oldp, oldlenp, case IPCTL_MTUDISCTIMEOUT: error = sysctl_int(oldp, oldlenp, newp, newlen, &ip_mtudisc_timeout); + if (ip_mtudisc_timeout < 0) + return (EINVAL); if (ip_mtudisc_timeout_q != NULL) rt_timer_queue_change(ip_mtudisc_timeout_q, ip_mtudisc_timeout);