summaryrefslogtreecommitdiff
path: root/sbin/routed/table.c
diff options
context:
space:
mode:
authorHenning Brauer <henning@cvs.openbsd.org>2004-09-08 16:18:13 +0000
committerHenning Brauer <henning@cvs.openbsd.org>2004-09-08 16:18:13 +0000
commita249be3b9be1a8da3b7783f2cff8794899223a3c (patch)
treee4ca76366a6a49103abecf6d346b5e0edd02fc8f /sbin/routed/table.c
parent133ea1ca855d8be409a217de9f45639c4479d60b (diff)
routed assumes it alone controls the routing table and tinkers with
routes it is not supposed to touch trying to aggregate them, which has unwanted effects when other routing daemons (bgpd) are running. note that bgpd behaves and only touches its own routes. workaround by ignoring routes with RTF_PROTO1 set, which bgpd sets for its routes. from a discussion with Arvid Grotting <arvidg@netfonds.no>, who tested a diff of same functionality (basically only formatting and comment different). ok deraadt
Diffstat (limited to 'sbin/routed/table.c')
-rw-r--r--sbin/routed/table.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/sbin/routed/table.c b/sbin/routed/table.c
index 82bbf1b0efc..c70578d9051 100644
--- a/sbin/routed/table.c
+++ b/sbin/routed/table.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: table.c,v 1.15 2004/04/25 15:50:35 markus Exp $ */
+/* $OpenBSD: table.c,v 1.16 2004/09/08 16:18:12 henning Exp $ */
/*
* Copyright (c) 1983, 1988, 1993
@@ -1054,6 +1054,10 @@ read_rt(void)
continue;
}
+ /* ignore routes from bgpd */
+ if (m.r.rtm.rtm_flags & RTF_PROTO1)
+ continue;
+
if (m.r.rtm.rtm_type == RTM_IFINFO
|| m.r.rtm.rtm_type == RTM_NEWADDR
|| m.r.rtm.rtm_type == RTM_DELADDR) {