From b83ae54fcd9786ffe00fba213a8390a2f7f1600c Mon Sep 17 00:00:00 2001 From: Henning Brauer Date: Thu, 16 Nov 2006 15:56:27 +0000 Subject: ignore messages for alternate routing tables for now; from bgpd --- usr.sbin/ripd/kroute.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'usr.sbin') 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 @@ -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); -- cgit v1.2.3