mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-16 10:20:30 +00:00
Bring in latest CSRG revisions to this file:
- Report destination address of a P2P link when servicing routing socket messages. - Report interface name, address, and destination address of a P2P link when servicing NET_RT_{DUMP,FLAGS} sysctls. Part of CSRG revision 8.6 coresponds to revision 1.12. CSRG revision 8.7 corresponds to revision 1.15.
This commit is contained in:
parent
4862bf8c0d
commit
28070a0efe
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=85053
@ -30,7 +30,7 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)rtsock.c 8.5 (Berkeley) 11/2/94
|
||||
* @(#)rtsock.c 8.7 (Berkeley) 10/12/95
|
||||
* $FreeBSD$
|
||||
*/
|
||||
|
||||
@ -385,6 +385,8 @@ route_output(m, so)
|
||||
if (ifp) {
|
||||
ifpaddr = TAILQ_FIRST(&ifp->if_addrhead)->ifa_addr;
|
||||
ifaaddr = rt->rt_ifa->ifa_addr;
|
||||
if (ifp->if_flags & IFF_POINTOPOINT)
|
||||
brdaddr = rt->rt_ifa->ifa_dstaddr;
|
||||
rtm->rtm_index = ifp->if_index;
|
||||
} else {
|
||||
ifpaddr = 0;
|
||||
@ -889,6 +891,12 @@ sysctl_dumpentry(rn, vw)
|
||||
gate = rt->rt_gateway;
|
||||
netmask = rt_mask(rt);
|
||||
genmask = rt->rt_genmask;
|
||||
if (rt->rt_ifp) {
|
||||
ifpaddr = TAILQ_FIRST(&rt->rt_ifp->if_addrhead)->ifa_addr;
|
||||
ifaaddr = rt->rt_ifa->ifa_addr;
|
||||
if (rt->rt_ifp->if_flags & IFF_POINTOPOINT)
|
||||
brdaddr = rt->rt_ifa->ifa_dstaddr;
|
||||
}
|
||||
size = rt_msg2(RTM_GET, &info, 0, w);
|
||||
if (w->w_req && w->w_tmem) {
|
||||
register struct rt_msghdr *rtm = (struct rt_msghdr *)w->w_tmem;
|
||||
|
Loading…
Reference in New Issue
Block a user