HomeFreeBSD

netlink: fix adding an interface route

Description

netlink: fix adding an interface route

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.

PR: 275341
Reported by: Sean Cody <sean@tinfoilhat.ca>
Reviewed by: rcm
Tested by: rcm
Approved by: kp (mentor)
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D41330

Details

Provenance
takahiro.kurosawa_gmail.comAuthored on Nov 28 2023, 6:14 PM
rcmCommitted on Nov 28 2023, 9:11 PM
Reviewer
rcm
Differential Revision
D41330: netlink: fix adding an interface route
Parents
rG2276e53940c2: zfs: merge openzfs/zfs@688514e47
Branches
Unknown
Tags
Unknown