Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/netinet ckout previous - doesn't compile



details:   https://anonhg.NetBSD.org/src/rev/47e340a0fbaf
branches:  trunk
changeset: 539254:47e340a0fbaf
user:      itojun <itojun%NetBSD.org@localhost>
date:      Tue Nov 12 01:57:07 2002 +0000

description:
ckout previous - doesn't compile

diffstat:

 sys/netinet/ip_input.c |  17 ++++++++++++-----
 1 files changed, 12 insertions(+), 5 deletions(-)

diffs (45 lines):

diff -r 871eeebe3c30 -r 47e340a0fbaf sys/netinet/ip_input.c
--- a/sys/netinet/ip_input.c    Tue Nov 12 01:38:09 2002 +0000
+++ b/sys/netinet/ip_input.c    Tue Nov 12 01:57:07 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ip_input.c,v 1.161 2002/11/12 01:38:09 itojun Exp $    */
+/*     $NetBSD: ip_input.c,v 1.162 2002/11/12 01:57:07 itojun Exp $    */
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -102,7 +102,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ip_input.c,v 1.161 2002/11/12 01:38:09 itojun Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ip_input.c,v 1.162 2002/11/12 01:57:07 itojun Exp $");
 
 #include "opt_gateway.h"
 #include "opt_pfil_hooks.h"
@@ -1826,8 +1826,13 @@
        case IPCTL_MTUDISC:
                error = sysctl_int(oldp, oldlenp, newp, newlen,
                    &ip_mtudisc);
-               if (ip_mtudisc == 0)
-                       rt_timer_queue_remove_all(ip_mtudisc_timeout_q, TRUE);
+               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;
+               }
                return error;
        case IPCTL_ANONPORTMIN:
                old = anonportmin;
@@ -1863,7 +1868,9 @@
                        ip_mtudisc_timeout = old;
                        return (EINVAL);
                }
-               rt_timer_queue_change(ip_mtudisc_timeout_q, ip_mtudisc_timeout);
+               if (ip_mtudisc_timeout_q != NULL)
+                       rt_timer_queue_change(ip_mtudisc_timeout_q,
+                                             ip_mtudisc_timeout);
                return (error);
 #ifdef GATEWAY
        case IPCTL_MAXFLOWS:



Home | Main Index | Thread Index | Old Index