* Check is nhop is multipath-eligible. * Avoid nhops without gateways and redirects. * * Returns 1 for multipath-eligible nexthop, * 0 otherwise. */
| 218 | * 0 otherwise. |
| 219 | */ |
| 220 | bool |
| 221 | nhop_can_multipath(const struct nhop_object *nh) |
| 222 | { |
| 223 | |
| 224 | if ((nh->nh_flags & NHF_MULTIPATH) != 0) |
| 225 | return (1); |
| 226 | if ((nh->nh_flags & NHF_GATEWAY) == 0) |
| 227 | return (0); |
| 228 | if ((nh->nh_flags & NHF_REDIRECT) != 0) |
| 229 | return (0); |
| 230 | |
| 231 | return (1); |
| 232 | } |
| 233 | #endif |
| 234 | |
| 235 | static int |