mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-29 16:44:03 +00:00
o add missing break
o remove extraneous bzero o add SYSINIT to properly initialize ip4_def_policy Submitted by: "Bjoern A. Zeeb" <bzeeb+freebsd@zabbadoz.net> Submitted by: gnn@neville-neil.com
This commit is contained in:
parent
8976be9465
commit
8381996e5d
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=125100
@ -403,7 +403,6 @@ ipsec_getpolicybyaddr(m, dir, flag, error)
|
||||
if (*error != 0) {
|
||||
DPRINTF(("%s: setpidx failed, dir %u flag %u\n",
|
||||
__func__, dir, flag));
|
||||
bzero(&spidx, sizeof (spidx));
|
||||
return NULL;
|
||||
}
|
||||
spidx.dir = dir;
|
||||
@ -1298,6 +1297,7 @@ ipsec_get_reqlevel(isr)
|
||||
level = ah_net_deflev;
|
||||
else
|
||||
level = ah_trans_deflev;
|
||||
break;
|
||||
case IPPROTO_IPCOMP:
|
||||
/*
|
||||
* we don't really care, as IPcomp document says that
|
||||
@ -1891,6 +1891,15 @@ ipsec_dumpmbuf(m)
|
||||
printf("---\n");
|
||||
}
|
||||
|
||||
static void
|
||||
ipsec_attach(void)
|
||||
{
|
||||
SECPOLICY_LOCK_INIT(&ip4_def_policy);
|
||||
ip4_def_policy.refcnt = 1; /* NB: disallow free */
|
||||
}
|
||||
SYSINIT(ipsec, SI_SUB_PROTO_DOMAIN, SI_ORDER_FIRST, ipsec_attach, NULL)
|
||||
|
||||
|
||||
/* XXX this stuff doesn't belong here... */
|
||||
|
||||
static struct xformsw* xforms = NULL;
|
||||
|
Loading…
Reference in New Issue
Block a user