* Runs exact prefix match based on dst/netmask from @info. * Assumes RIB lock is held. * Returns matched @rtentry if found or NULL. * If rtentry was found, saves nexthop / weight value into @rnd. */
| 518 | * If rtentry was found, saves nexthop / weight value into @rnd. |
| 519 | */ |
| 520 | struct rtentry * |
| 521 | lookup_prefix(struct rib_head *rnh, const struct rt_addrinfo *info, |
| 522 | struct route_nhop_data *rnd) |
| 523 | { |
| 524 | struct rtentry *rt; |
| 525 | |
| 526 | rt = lookup_prefix_bysa(rnh, info->rti_info[RTAX_DST], |
| 527 | info->rti_info[RTAX_NETMASK], rnd); |
| 528 | |
| 529 | return (rt); |
| 530 | } |
| 531 | |
| 532 | /* |
| 533 | * Adds route defined by @info into the kernel table specified by @fibnum and |
no test coverage detected