Index: sys/net/rtsock.c =================================================================== --- sys/net/rtsock.c +++ sys/net/rtsock.c @@ -725,8 +725,7 @@ RIB_RLOCK(rnh); - if (info.rti_info[RTAX_NETMASK] == NULL && - rtm->rtm_type == RTM_GET) { + if (info.rti_info[RTAX_NETMASK] == NULL) { /* * Provide longest prefix match for * address lookup (no mask). @@ -745,15 +744,11 @@ } #ifdef RADIX_MPATH /* - * for RTM_CHANGE/LOCK, if we got multipath routes, - * we require users to specify a matching RTAX_GATEWAY. - * - * for RTM_GET, gate is optional even with multipath. - * if gate == NULL the first match is returned. - * (no need to call rt_mpath_matchgate if gate == NULL) + * gate is optional even with multipath. if gate == NULL + * the first match is returned. (no need to call + * rt_mpath_matchgate if gate == NULL) */ - if (rt_mpath_capable(rnh) && - (rtm->rtm_type != RTM_GET || info.rti_info[RTAX_GATEWAY])) { + if (rt_mpath_capable(rnh) && info.rti_info[RTAX_GATEWAY]) { rt = rt_mpath_matchgate(rt, info.rti_info[RTAX_GATEWAY]); if (!rt) { RIB_RUNLOCK(rnh);