From 97eb32fd8d89cafdbf76f349f5d634af803dbc6a Mon Sep 17 00:00:00 2001 From: harti Date: Thu, 9 Jun 2005 12:20:50 +0000 Subject: When returing an RTM_GET message through the routing socket fill in the rtm_index field whenever we have an interface pointer. This is consistent with the RTM_GET messages returned by sysctl(). --- sys/net/rtsock.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'sys/net/rtsock.c') diff --git a/sys/net/rtsock.c b/sys/net/rtsock.c index 93408fd..9c13a07 100644 --- a/sys/net/rtsock.c +++ b/sys/net/rtsock.c @@ -467,6 +467,8 @@ route_output(struct mbuf *m, struct socket *so) info.rti_info[RTAX_IFP] = NULL; info.rti_info[RTAX_IFA] = NULL; } + } else if ((ifp = rt->rt_ifp) != NULL) { + rtm->rtm_index = ifp->if_index; } len = rt_msg2(rtm->rtm_type, &info, NULL, NULL); if (len > rtm->rtm_msglen) { -- cgit v1.1