summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorClaudio Jeker <claudio@cvs.openbsd.org>2006-02-02 13:59:46 +0000
committerClaudio Jeker <claudio@cvs.openbsd.org>2006-02-02 13:59:46 +0000
commite48d9cd4078b2e4ea1d1d65efef627a69574921f (patch)
tree5a17bfd6df3103199daa80de98002eefbd295feb /sys
parent61f8fd2d25505b9b6a750a3260026a538a30c6c1 (diff)
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@
Diffstat (limited to 'sys')
-rw-r--r--sys/net/rtsock.c4
1 files changed, 3 insertions, 1 deletions
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)