MCPcopy Create free account
hub / github.com/F-Stack/f-stack / nhop_can_multipath

Function nhop_can_multipath

freebsd/net/route/route_ctl.c:220–232  ·  view source on GitHub ↗

* Check is nhop is multipath-eligible. * Avoid nhops without gateways and redirects. * * Returns 1 for multipath-eligible nexthop, * 0 otherwise. */

Source from the content-addressed store, hash-verified

218 * 0 otherwise.
219 */
220bool
221nhop_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
235static int

Callers 1

add_routeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected