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

Function can_export_rte

freebsd/net/rtsock.c:2100–2109  ·  view source on GitHub ↗

* Checks if rte can be exported v.r.t jails/vnets. * * Returns 1 if it can, 0 otherwise. */

Source from the content-addressed store, hash-verified

2098 * Returns 1 if it can, 0 otherwise.
2099 */
2100static bool
2101can_export_rte(struct ucred *td_ucred, bool rt_is_host,
2102 const struct sockaddr *rt_dst)
2103{
2104
2105 if ((!rt_is_host) ? jailed_without_vnet(td_ucred)
2106 : prison_if(td_ucred, rt_dst) != 0)
2107 return (false);
2108 return (true);
2109}
2110
2111
2112/*

Callers 2

route_outputFunction · 0.70
sysctl_dumpentryFunction · 0.70

Calls 2

jailed_without_vnetFunction · 0.50
prison_ifFunction · 0.50

Tested by

no test coverage detected