git: route(8): Fix routename() for AF_LINK addresses with sdl_index
Aaron LI
aly at crater.dragonflybsd.org
Fri Feb 14 05:56:00 PST 2025
commit b5d7cb4d56a96fce52976ab34f4de520c422f7df
Author: Aaron LI <aly at aaronly.me>
Date: Fri Feb 14 20:07:34 2025 +0800
route(8): Fix routename() for AF_LINK addresses with sdl_index
The link_ntoa() function is able to handle such link addresses with zero
lengths but only 'sdl_index', so route(8) would print an empty string
for some RTA_GATEWAY and RTA_IFP sockaddrs in the monitor output.
Fix routename() to correctly print such addresses by copying the code
from netstat(1).
Summary of changes:
sbin/route/route.c | 24 +++++++++++++++++++++++-
1 file changed, 23 insertions(+), 1 deletion(-)
http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/b5d7cb4d56a96fce52976ab34f4de520c422f7df
--
DragonFly BSD source repository
More information about the Commits
mailing list