diff options
author | Jun-ichiro itojun Hagino <itojun@cvs.openbsd.org> | 2000-04-11 12:02:31 +0000 |
---|---|---|
committer | Jun-ichiro itojun Hagino <itojun@cvs.openbsd.org> | 2000-04-11 12:02:31 +0000 |
commit | d4a9a375cf4f06bdf4670231c63bbe2961dedac9 (patch) | |
tree | 8a3c6b5ae118293a2b9cf70da71d7d466205742c /usr.sbin/route6d/route6d.c | |
parent | cb69dc9e8b0e1474d93f289c65342e876e741adf (diff) |
ignore routing messages for interfaces that route6d does not care.
do not advertise blackhole/reject static routes.
Diffstat (limited to 'usr.sbin/route6d/route6d.c')
-rw-r--r-- | usr.sbin/route6d/route6d.c | 16 |
1 files 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 <stdio.h> @@ -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; |