From 47e16e40ae56ead956b3f281aec68da185dbeed5 Mon Sep 17 00:00:00 2001 From: itojun Date: Tue, 11 Apr 2000 12:02:30 +0000 Subject: [PATCH] ignore routing messages for interfaces that route6d does not care. do not advertise blackhole/reject static routes. --- usr.sbin/route6d/route6d.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/usr.sbin/route6d/route6d.c b/usr.sbin/route6d/route6d.c index cbbe28de9f2..dbcfbc8c652 100644 --- a/usr.sbin/route6d/route6d.c +++ b/usr.sbin/route6d/route6d.c @@ -1,5 +1,5 @@ -/* $OpenBSD: route6d.c,v 1.4 2000/02/25 10:28:25 itojun Exp $ */ -/* $KAME: route6d.c,v 1.14 2000/02/25 06:15:57 itojun Exp $ */ +/* $OpenBSD: route6d.c,v 1.5 2000/04/11 12:02:30 itojun Exp $ */ +/* $KAME: route6d.c,v 1.16 2000/03/22 17:33:43 itojun Exp $ */ /* * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. @@ -31,7 +31,7 @@ */ #ifndef lint -static char _rcsid[] = "$KAME: route6d.c,v 1.14 2000/02/25 06:15:57 itojun Exp $"; +static char _rcsid[] = "$KAME: route6d.c,v 1.16 2000/03/22 17:33:43 itojun Exp $"; #endif #include @@ -793,6 +793,10 @@ tobeadv(rrt, ifcp) /* Special care for static routes */ if (rrt->rrt_flags & RTF_STATIC) { + /* XXX don't advertise reject/blackhole routes */ + if (rrt->rrt_flags & (RTF_REJECT | RTF_BLACKHOLE)) + return 0; + if (Sflag) /* Yes, advertise it anyway */ return 1; if (sflag && rrt->rrt_index != ifcp->ifc_index) @@ -2192,8 +2196,10 @@ rt_entry(rtm, again) s = rtm->rtm_index; if (s < nindex2ifc && index2ifc[s]) ifname = index2ifc[s]->ifc_name; - else - fatal("Unknown interface %d", s); + else { + trace(1, " not configured\n"); + return; + } trace(1, " if %s sock %d\n", ifname, s); rrt->rrt_index = s; -- 2.20.1