"route add <host> -iface <netif>" for a netif without an IPv4/IPv6 address
fails with EINVAL. Need to use a link-level ifaddr for gw if an ifaddr
for dst is not found as the rtsock-based implementation does.
Details
Details
- Reviewers
melifaro rcm - Group Reviewers
network - Commits
- rG7a4a122f9731: netlink: fix adding an interface route
rGf818559774cb: netlink: fix adding an interface route
ifconfig tun0 create
ifconfig tun0 up
route add 192.0.2.1 -iface tun0
Diff Detail
Diff Detail
- Lint
Lint Skipped - Unit
Tests Skipped
Event Timeline
Comment Actions
PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=275341
Fixes:
# ifconfig wg1 create # ifconfig wg1 up # route -n add 10.2.0.0/24 -interface wg1
Comment Actions
This looks good to me.
I have a separate patch that introduces v4 and v6 atf-sh test cases for sbin/route that I will land along with D41436 when it gets a v6 test case soon.