diff options
| author | Sam Leffler <sam@FreeBSD.org> | 2004-01-27 17:45:28 +0000 |
|---|---|---|
| committer | Sam Leffler <sam@FreeBSD.org> | 2004-01-27 17:45:28 +0000 |
| commit | 8381996e5d22c06ddf26ed29ed1872a11eed3052 (patch) | |
| tree | 4a3589516be81cbc05fc6cd5c1a0dbfc5d78c1c4 /sys/netipsec | |
| parent | 8976be94650c5e007202f7e524c02fa7ddc2beb2 (diff) | |
Notes
Diffstat (limited to 'sys/netipsec')
| -rw-r--r-- | sys/netipsec/ipsec.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/sys/netipsec/ipsec.c b/sys/netipsec/ipsec.c index c250e603ecda2..24c99bfccfa0f 100644 --- a/sys/netipsec/ipsec.c +++ b/sys/netipsec/ipsec.c @@ -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; |
