mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-15 10:17:20 +00:00
- include opt_random_ip_id.h
- we don't need to obtain microtime when using ip6_randomid.
This commit is contained in:
parent
8513854d16
commit
de27a78aca
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=120645
@ -30,6 +30,8 @@
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include "opt_random_ip_id.h"
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/malloc.h>
|
||||
@ -80,16 +82,18 @@ static MALLOC_DEFINE(M_FTABLE, "fragment", "fragment reassembly header");
|
||||
void
|
||||
frag6_init()
|
||||
{
|
||||
#ifndef RANDOM_IP_ID
|
||||
struct timeval tv;
|
||||
#endif
|
||||
|
||||
ip6_maxfragpackets = nmbclusters / 4;
|
||||
|
||||
#ifndef RANDOM_IP_ID
|
||||
/*
|
||||
* in many cases, random() here does NOT return random number
|
||||
* as initialization during bootstrap time occur in fixed order.
|
||||
*/
|
||||
microtime(&tv);
|
||||
#ifndef RANDOM_IP_ID
|
||||
ip6_id = random() ^ tv.tv_usec;
|
||||
#endif
|
||||
ip6q.ip6q_next = ip6q.ip6q_prev = &ip6q;
|
||||
|
@ -68,6 +68,7 @@
|
||||
#include "opt_inet.h"
|
||||
#include "opt_inet6.h"
|
||||
#include "opt_ipsec.h"
|
||||
#include "opt_random_ip_id.h"
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/socket.h>
|
||||
|
@ -37,6 +37,7 @@
|
||||
#include "opt_inet.h"
|
||||
#include "opt_inet6.h"
|
||||
#include "opt_ipsec.h"
|
||||
#include "opt_random_ip_id.h"
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
|
Loading…
Reference in New Issue
Block a user