diff options
author | harti <harti@FreeBSD.org> | 2005-06-09 12:20:50 +0000 |
---|---|---|
committer | harti <harti@FreeBSD.org> | 2005-06-09 12:20:50 +0000 |
commit | 97eb32fd8d89cafdbf76f349f5d634af803dbc6a (patch) | |
tree | 9c5308886e05def4532b07da5a0ef1002f26d51b | |
parent | f14330733815c1aa5faa1d8cc4e7aeafe1695e28 (diff) | |
download | FreeBSD-src-97eb32fd8d89cafdbf76f349f5d634af803dbc6a.zip FreeBSD-src-97eb32fd8d89cafdbf76f349f5d634af803dbc6a.tar.gz |
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().
-rw-r--r-- | sys/net/rtsock.c | 2 |
1 files changed, 2 insertions, 0 deletions
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) { |