Source-Changes-HG archive

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

[src/netbsd-1-4]: src/sys/net pull up rev 1.28 from trunk (requested by erh):



details:   https://anonhg.NetBSD.org/src/rev/dcdc984dbf4c
branches:  netbsd-1-4
changeset: 469552:dcdc984dbf4c
user:      cgd <cgd%NetBSD.org@localhost>
date:      Sun Oct 10 20:22:17 1999 +0000

description:
pull up rev 1.28 from trunk (requested by erh):
  Avoid duplicate free() calls if a route's gateway points to itself,
  by marking a route down (~RTF_UP) _after_ calling RTFREE on its
  gateway.  Partial fix for PR#4561 and PR#4827 (the looped route can
  still occur, but it won't cause a panic).

diffstat:

 sys/net/route.c |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (22 lines):

diff -r 09a091fa4d8f -r dcdc984dbf4c sys/net/route.c
--- a/sys/net/route.c   Sun Oct 10 20:13:54 1999 +0000
+++ b/sys/net/route.c   Sun Oct 10 20:22:17 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: route.c,v 1.24 1998/12/27 18:27:48 thorpej Exp $       */
+/*     $NetBSD: route.c,v 1.24.2.1 1999/10/10 20:22:17 cgd Exp $       */
 
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -398,11 +398,11 @@
                if (rn->rn_flags & (RNF_ACTIVE | RNF_ROOT))
                        panic ("rtrequest delete");
                rt = (struct rtentry *)rn;
-               rt->rt_flags &= ~RTF_UP;
                if (rt->rt_gwroute) {
                        rt = rt->rt_gwroute; RTFREE(rt);
                        (rt = (struct rtentry *)rn)->rt_gwroute = 0;
                }
+               rt->rt_flags &= ~RTF_UP;
                if ((ifa = rt->rt_ifa) && ifa->ifa_rtrequest)
                        ifa->ifa_rtrequest(RTM_DELETE, rt, SA(0));
                rttrash++;



Home | Main Index | Thread Index | Old Index