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

Function ip6_randomflowlabel

freebsd/netinet6/ip6_id.c:258–274  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

256}
257
258u_int32_t
259ip6_randomflowlabel(void)
260{
261#ifndef FSTACK
262 /*
263 * It's ok to emit zero flow labels early, before random is available
264 * (seeded). RFC 6437:
265 *
266 * "A Flow Label of zero is used to indicate packets that have not been
267 * labeled."
268 */
269 if (__predict_false(!is_random_seeded()))
270 return (0);
271#endif
272
273 return randomid(&randomtab_20) & 0xfffff;
274}

Callers 3

sctp_send_resp_msgFunction · 0.85
syncache_addFunction · 0.85
in6_pcbconnect_mbufFunction · 0.85

Calls 1

randomidFunction · 0.85

Tested by

no test coverage detected