| 200 | } |
| 201 | |
| 202 | static int |
| 203 | check_urpf(struct nhop_object *nh, uint32_t flags, |
| 204 | const struct ifnet *src_if) |
| 205 | { |
| 206 | #ifdef ROUTE_MPATH |
| 207 | if (NH_IS_NHGRP(nh)) { |
| 208 | struct weightened_nhop *wn; |
| 209 | uint32_t num_nhops; |
| 210 | wn = nhgrp_get_nhops((struct nhgrp_object *)nh, &num_nhops); |
| 211 | for (int i = 0; i < num_nhops; i++) { |
| 212 | if (check_urpf_nhop(wn[i].nh, flags, src_if) != 0) |
| 213 | return (1); |
| 214 | } |
| 215 | return (0); |
| 216 | } else |
| 217 | #endif |
| 218 | return (check_urpf_nhop(nh, flags, src_if)); |
| 219 | } |
| 220 | |
| 221 | #ifndef FIB_ALGO |
| 222 | static struct nhop_object * |
no test coverage detected