mirror of
https://github.com/opnsense/src.git
synced 2026-06-11 01:30:30 -04:00
Postpone multipath seed init till SI_SUB_LAST, as it is needed only after
some useland program installs multiple paths to the same destination. While here, make multipath init conditional. Discussed with: cem,ian
This commit is contained in:
parent
9897e357de
commit
1968b7eb21
1 changed files with 4 additions and 1 deletions
|
|
@ -40,6 +40,7 @@ __FBSDID("$FreeBSD$");
|
|||
|
||||
#include "opt_inet.h"
|
||||
#include "opt_inet6.h"
|
||||
#include "opt_mpath.h"
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
|
|
@ -298,11 +299,13 @@ rt_mpath_init_rnh(struct rib_head *rnh)
|
|||
rnh->rnh_multipath = 1;
|
||||
}
|
||||
|
||||
#ifdef RADIX_MPATH
|
||||
static void
|
||||
mpath_init(void)
|
||||
{
|
||||
|
||||
hashjitter = arc4random();
|
||||
}
|
||||
SYSINIT(mpath_init, SI_SUB_PROTO_DOMAIN, SI_ORDER_ANY, mpath_init, NULL);
|
||||
SYSINIT(mpath_init, SI_SUB_LAST, SI_ORDER_ANY, mpath_init, NULL);
|
||||
#endif
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue