| 182 | #endif |
| 183 | |
| 184 | inline static int |
| 185 | check_urpf_nhop(const struct nhop_object *nh, uint32_t flags, |
| 186 | const struct ifnet *src_if) |
| 187 | { |
| 188 | |
| 189 | if (src_if != NULL && nh->nh_aifp == src_if) { |
| 190 | return (1); |
| 191 | } |
| 192 | if (src_if == NULL) { |
| 193 | if ((flags & NHR_NODEFAULT) == 0) |
| 194 | return (1); |
| 195 | else if ((nh->nh_flags & NHF_DEFAULT) == 0) |
| 196 | return (1); |
| 197 | } |
| 198 | |
| 199 | return (0); |
| 200 | } |
| 201 | |
| 202 | static int |
| 203 | check_urpf(struct nhop_object *nh, uint32_t flags, |