From e48d9cd4078b2e4ea1d1d65efef627a69574921f Mon Sep 17 00:00:00 2001 From: Claudio Jeker Date: Thu, 2 Feb 2006 13:59:46 +0000 Subject: Set rtm_index to the correct interface index for RTM_ADD and RTM_CHANGE. bgpd and ospfd use this information to track the availability of a route. Discussed with dlg@, OK henning@ --- sys/net/rtsock.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sys/net/rtsock.c b/sys/net/rtsock.c index e1299d77e0b..3b8e46653a7 100644 --- a/sys/net/rtsock.c +++ b/sys/net/rtsock.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rtsock.c,v 1.51 2005/11/29 02:59:42 jolan Exp $ */ +/* $OpenBSD: rtsock.c,v 1.52 2006/02/02 13:59:45 claudio Exp $ */ /* $NetBSD: rtsock.c,v 1.18 1996/03/29 00:32:10 cgd Exp $ */ /* @@ -250,6 +250,7 @@ route_output(struct mbuf *m, ...) &saved_nrt->rt_rmx); saved_nrt->rt_refcnt--; saved_nrt->rt_genmask = genmask; + rtm->rtm_index = saved_nrt->rt_ifp->if_index; } break; case RTM_DELETE: @@ -397,6 +398,7 @@ report: rt_setmetrics(rtm->rtm_inits, &rtm->rtm_rmx, &rt->rt_rmx); + rtm->rtm_index = rt->rt_ifp->if_index; if (rt->rt_ifa && rt->rt_ifa->ifa_rtrequest) rt->rt_ifa->ifa_rtrequest(RTM_ADD, rt, &info); if (genmask) -- cgit v1.2.3