| 314 | } |
| 315 | |
| 316 | struct nhop_object * |
| 317 | fib4_lookup_debugnet(uint32_t fibnum, struct in_addr dst, uint32_t scopeid, |
| 318 | uint32_t flags) |
| 319 | { |
| 320 | struct rtentry *rt; |
| 321 | struct route_nhop_data rnd; |
| 322 | |
| 323 | rt = fib4_lookup_rt(fibnum, dst, scopeid, NHR_UNLOCKED, &rnd); |
| 324 | if (rt != NULL) { |
| 325 | struct nhop_object *nh = nhop_select(rnd.rnd_nhop, 0); |
| 326 | /* Ensure route & ifp is UP */ |
| 327 | if (RT_LINK_IS_UP(nh->nh_ifp)) |
| 328 | return (nh); |
| 329 | } |
| 330 | |
| 331 | return (NULL); |
| 332 | } |
| 333 | |
| 334 | #endif |
no test coverage detected