diff options
author | ume <ume@FreeBSD.org> | 2003-10-01 21:24:28 +0000 |
---|---|---|
committer | ume <ume@FreeBSD.org> | 2003-10-01 21:24:28 +0000 |
commit | dff1ad31d578de8652ddb2af57b20afeef17161b (patch) | |
tree | 40cbf0f17e6e447a893c3c70e1a6ee492c6a779e /sys/netinet6/ip6_id.c | |
parent | 1510816eb2189f841fa0c9d83a1491b4e9228642 (diff) | |
download | FreeBSD-src-dff1ad31d578de8652ddb2af57b20afeef17161b.zip FreeBSD-src-dff1ad31d578de8652ddb2af57b20afeef17161b.tar.gz |
randomize IPv6 flowlabel when RANDOM_IP_ID is defined.
Obtained from: KAME
Diffstat (limited to 'sys/netinet6/ip6_id.c')
-rw-r--r-- | sys/netinet6/ip6_id.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sys/netinet6/ip6_id.c b/sys/netinet6/ip6_id.c index 8ed0b8d..cd2ae2d 100644 --- a/sys/netinet6/ip6_id.c +++ b/sys/netinet6/ip6_id.c @@ -250,4 +250,11 @@ ip6_randomid(void) return randomid(&randomtab_32); } +u_int32_t +ip6_randomflowlabel(void) +{ + + return randomid(&randomtab_20) & 0xfffff; +} + #endif /* RANDOM_IP_ID */ |