| 173 | #endif |
| 174 | |
| 175 | inline static int |
| 176 | check_urpf_nhop(const struct nhop_object *nh, uint32_t flags, |
| 177 | const struct ifnet *src_if) |
| 178 | { |
| 179 | |
| 180 | if (src_if != NULL && nh->nh_aifp == src_if) { |
| 181 | return (1); |
| 182 | } |
| 183 | if (src_if == NULL) { |
| 184 | if ((flags & NHR_NODEFAULT) == 0) |
| 185 | return (1); |
| 186 | else if ((nh->nh_flags & NHF_DEFAULT) == 0) |
| 187 | return (1); |
| 188 | } |
| 189 | |
| 190 | return (0); |
| 191 | } |
| 192 | |
| 193 | static int |
| 194 | check_urpf(struct nhop_object *nh, uint32_t flags, |