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 rcsdiff: /ftp/cvs/cvsroot/src/sys/netinet/ip_input.c,v: warning: Unknown phrases like `commitid ...;' are present. retrieving revision 1.130.2.15 retrieving revision 1.130.2.16 diff -u -p -r1.130.2.15 -r1.130.2.16 --- src/sys/netinet/ip_input.c 2002/11/11 22:15:23 1.130.2.15 +++ src/sys/netinet/ip_input.c 2002/12/11 06:46:37 1.130.2.16 @@ -1,4 +1,4 @@ -/* $NetBSD: ip_input.c,v 1.130.2.15 2002/11/11 22:15:23 nathanw Exp $ */ +/* $NetBSD: ip_input.c,v 1.130.2.16 2002/12/11 06:46:37 thorpej Exp $ */ /* * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. @@ -102,7 +102,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ip_input.c,v 1.130.2.15 2002/11/11 22:15:23 nathanw Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ip_input.c,v 1.130.2.16 2002/12/11 06:46:37 thorpej Exp $"); #include "opt_gateway.h" #include "opt_pfil_hooks.h" @@ -1826,13 +1826,8 @@ ip_sysctl(name, namelen, oldp, oldlenp, case IPCTL_MTUDISC: error = sysctl_int(oldp, oldlenp, newp, newlen, &ip_mtudisc); - if (ip_mtudisc != 0 && ip_mtudisc_timeout_q == NULL) { - ip_mtudisc_timeout_q = - rt_timer_queue_create(ip_mtudisc_timeout); - } else if (ip_mtudisc == 0 && ip_mtudisc_timeout_q != NULL) { - rt_timer_queue_destroy(ip_mtudisc_timeout_q, TRUE); - ip_mtudisc_timeout_q = NULL; - } + if (error == 0 && ip_mtudisc == 0) + rt_timer_queue_remove_all(ip_mtudisc_timeout_q, TRUE); return error; case IPCTL_ANONPORTMIN: old = anonportmin; @@ -1868,7 +1863,7 @@ ip_sysctl(name, namelen, oldp, oldlenp, ip_mtudisc_timeout = old; return (EINVAL); } - if (ip_mtudisc_timeout_q != NULL) + if (error == 0) rt_timer_queue_change(ip_mtudisc_timeout_q, ip_mtudisc_timeout); return (error);