diff --git a/sys/netlink/route/rt.c b/sys/netlink/route/rt.c --- a/sys/netlink/route/rt.c +++ b/sys/netlink/route/rt.c @@ -750,9 +750,14 @@ struct ifaddr *ifa = ifaof_ifpforaddr(gw_sa, nh->nh_ifp); if (ifa == NULL) { - NL_LOG(LOG_DEBUG, "Unable to determine ifa, skipping"); - *perror = EINVAL; - return (NULL); + /* Try link-level ifa. */ + gw_sa = &nh->gw_sa; + ifa = ifaof_ifpforaddr(gw_sa, nh->nh_ifp); + if (ifa == NULL) { + NL_LOG(LOG_DEBUG, "Unable to determine ifa, skipping"); + *perror = EINVAL; + return (NULL); + } } nhop_set_src(nh, ifa); }