Source-Changes-HG archive

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

[src/trunk]: src/usr.sbin/route6d do not advertise dynamic/cloned routes



details:   https://anonhg.NetBSD.org/src/rev/f250498e747d
branches:  trunk
changeset: 499085:f250498e747d
user:      itojun <itojun%NetBSD.org@localhost>
date:      Fri Nov 10 18:15:57 2000 +0000

description:
do not advertise dynamic/cloned routes

diffstat:

 usr.sbin/route6d/route6d.c |  33 ++++++++++++++++++++++++++++++---
 1 files changed, 30 insertions(+), 3 deletions(-)

diffs (65 lines):

diff -r c53e099cf4cb -r f250498e747d usr.sbin/route6d/route6d.c
--- a/usr.sbin/route6d/route6d.c        Fri Nov 10 17:47:55 2000 +0000
+++ b/usr.sbin/route6d/route6d.c        Fri Nov 10 18:15:57 2000 +0000
@@ -1,5 +1,5 @@
-/*     $NetBSD: route6d.c,v 1.19 2000/10/10 13:03:27 itojun Exp $      */
-/*     $KAME: route6d.c,v 1.37 2000/10/10 13:02:30 itojun Exp $        */
+/*     $NetBSD: route6d.c,v 1.20 2000/11/10 18:15:57 itojun Exp $      */
+/*     $KAME: route6d.c,v 1.39 2000/11/07 16:39:34 itojun Exp $        */
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -32,7 +32,7 @@
 
 #include <sys/cdefs.h>
 #ifndef        lint
-__RCSID("$NetBSD: route6d.c,v 1.19 2000/10/10 13:03:27 itojun Exp $");
+__RCSID("$NetBSD: route6d.c,v 1.20 2000/11/10 18:15:57 itojun Exp $");
 #endif
 
 #include <stdio.h>
@@ -2136,10 +2136,22 @@
        RTFLAG("m", RTF_MASK);
 #endif
        RTFLAG("C", RTF_CLONING);
+#ifdef RTF_CLONED
+       RTFLAG("c", RTF_CLONED);
+#endif
+#ifdef RTF_PRCLONING
+       RTFLAG("c", RTF_PRCLONING);
+#endif
+#ifdef RTF_WASCLONED
+       RTFLAG("W", RTF_WASCLONED);
+#endif
        RTFLAG("X", RTF_XRESOLVE);
        RTFLAG("L", RTF_LLINFO);
        RTFLAG("S", RTF_STATIC);
        RTFLAG("B", RTF_BLACKHOLE);
+#ifdef RTF_PROTO3
+       RTFLAG("3", RTF_PROTO3);
+#endif
        RTFLAG("2", RTF_PROTO2);
        RTFLAG("1", RTF_PROTO1);
 #undef RTFLAG
@@ -2251,6 +2263,21 @@
                (RTF_CLONING|RTF_XRESOLVE|RTF_LLINFO|RTF_BLACKHOLE)) {
                return;         /* not interested in the link route */
        }
+       /* do not look at cloned routes */
+#ifdef RTF_WASCLONED
+       if (rtm->rtm_flags & RTF_WASCLONED)
+               return;
+#endif
+#ifdef RTF_CLONED
+       if (rtm->rtm_flags & RTF_CLONED)
+               return;
+#endif
+       /*
+        * do not look at dynamic routes.
+        * netbsd/openbsd cloned routes have UGHD.
+        */
+       if (rtm->rtm_flags & RTF_DYNAMIC)
+               return;
        rtmp = (char *)(rtm + 1);
        /* Destination */
        if ((rtm->rtm_addrs & RTA_DST) == 0)



Home | Main Index | Thread Index | Old Index