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.150.4.2 retrieving revision 1.150.4.3 diff -u -p -r1.150.4.2 -r1.150.4.3 --- src/sys/netinet/ip_input.c 2002/11/12 14:44:11 1.150.4.2 +++ src/sys/netinet/ip_input.c 2003/06/17 11:55:53 1.150.4.3 @@ -1,4 +1,4 @@ -/* $NetBSD: ip_input.c,v 1.150.4.2 2002/11/12 14:44:11 tron Exp $ */ +/* $NetBSD: ip_input.c,v 1.150.4.3 2003/06/17 11:55:53 msaitoh Exp $ */ /* * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. @@ -102,7 +102,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ip_input.c,v 1.150.4.2 2002/11/12 14:44:11 tron Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ip_input.c,v 1.150.4.3 2003/06/17 11:55:53 msaitoh Exp $"); #include "opt_gateway.h" #include "opt_pfil_hooks.h" @@ -1804,13 +1804,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; @@ -1841,7 +1836,7 @@ ip_sysctl(name, namelen, oldp, oldlenp, case IPCTL_MTUDISCTIMEOUT: error = sysctl_int(oldp, oldlenp, newp, newlen, &ip_mtudisc_timeout); - if (ip_mtudisc_timeout_q != NULL) + if (error == 0) rt_timer_queue_change(ip_mtudisc_timeout_q, ip_mtudisc_timeout); return (error);