* Performs reverse path forwarding lookup. * If @src_if is non-zero, verifies that at least 1 path goes via * this interface. * If @src_if is zero, verifies that route exist. * if @flags contains NHR_NOTDEFAULT, do not consider default route. * * Returns 1 if route matching conditions is found, 0 otherwise. */
| 264 | * Returns 1 if route matching conditions is found, 0 otherwise. |
| 265 | */ |
| 266 | int |
| 267 | fib6_check_urpf(uint32_t fibnum, const struct in6_addr *dst6, |
| 268 | uint32_t scopeid, uint32_t flags, const struct ifnet *src_if) |
| 269 | { |
| 270 | struct nhop_object *nh; |
| 271 | #ifdef FIB_ALGO |
| 272 | struct fib_dp *dp = &V_inet6_dp[fibnum]; |
| 273 | struct flm_lookup_key key = {.addr6 = dst6 }; |
| 274 | |
| 275 | nh = dp->f(dp->arg, key, scopeid); |
| 276 | #else |
| 277 | nh = lookup_nhop(fibnum, dst6, scopeid); |
| 278 | #endif |
| 279 | if (nh != NULL) |
| 280 | return (check_urpf(nh, flags, src_if)); |
| 281 | return (0); |
| 282 | } |
| 283 | |
| 284 | /* |
| 285 | * Function returning prefix match data along with the nexthop data. |
no test coverage detected