summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorHenning Brauer <henning@cvs.openbsd.org>2006-11-16 15:56:27 +0000
committerHenning Brauer <henning@cvs.openbsd.org>2006-11-16 15:56:27 +0000
commitb83ae54fcd9786ffe00fba213a8390a2f7f1600c (patch)
tree0f1279115219bfd1d15756945f433a9ce1132e89 /usr.sbin
parent09f75b12fec1215df03993a63bbb7f3b7774f58c (diff)
ignore messages for alternate routing tables for now; from bgpd
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/ripd/kroute.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/usr.sbin/ripd/kroute.c b/usr.sbin/ripd/kroute.c
index 4ac29fa33b7..1b01d456519 100644
--- a/usr.sbin/ripd/kroute.c
+++ b/usr.sbin/ripd/kroute.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kroute.c,v 1.2 2006/10/24 16:37:48 david Exp $ */
+/* $OpenBSD: kroute.c,v 1.3 2006/11/16 15:56:26 henning Exp $ */
/*
* Copyright (c) 2004 Esben Norby <norby@openbsd.org>
@@ -773,7 +773,7 @@ int
fetchtable(void)
{
size_t len;
- int mib[6];
+ int mib[7];
char *buf, *next, *lim;
struct rt_msghdr *rtm;
struct sockaddr *sa, *rti_info[RTAX_MAX];
@@ -787,6 +787,7 @@ fetchtable(void)
mib[3] = AF_INET;
mib[4] = NET_RT_DUMP;
mib[5] = 0;
+ mib[6] = 0; /* rtableid */
if (sysctl(mib, 6, NULL, &len, NULL, 0) == -1) {
log_warn("sysctl");
@@ -996,6 +997,9 @@ dispatch_rtmsg(void)
flags = F_KERNEL;
nexthop.s_addr = 0;
+ if (rtm->rtm_tableid != 0)
+ continue;
+
if (rtm->rtm_type == RTM_ADD || rtm->rtm_type == RTM_CHANGE ||
rtm->rtm_type == RTM_DELETE) {
sa = (struct sockaddr *)(rtm + 1);