From: angelos Date: Fri, 28 Feb 1997 02:56:50 +0000 (+0000) Subject: IPsec socket API additions. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=0c7e4f75993404961a2fe5804e62edbbefdddd0b;p=openbsd IPsec socket API additions. --- diff --git a/sys/kern/uipc_socket.c b/sys/kern/uipc_socket.c index c6650e48c29..831d42da53f 100644 --- a/sys/kern/uipc_socket.c +++ b/sys/kern/uipc_socket.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uipc_socket.c,v 1.8 1996/12/16 14:30:17 deraadt Exp $ */ +/* $OpenBSD: uipc_socket.c,v 1.9 1997/02/28 02:56:50 angelos Exp $ */ /* $NetBSD: uipc_socket.c,v 1.21 1996/02/04 02:17:52 christos Exp $ */ /* @@ -91,6 +91,9 @@ socreate(dom, aso, type, proto) so->so_state = SS_PRIV; so->so_uid = p->p_ucred->cr_uid; so->so_proto = prp; + so->so_seclevel[SL_AUTH] = IPSEC_AUTH_LEVEL_DEFAULT; + so->so_seclevel[SL_ESP_TRANS] = IPSEC_ESP_TRANS_LEVEL_DEFAULT; + so->so_seclevel[SL_ESP_NETWORK] = IPSEC_ESP_NETWORK_LEVEL_DEFAULT; error = (*prp->pr_usrreq)(so, PRU_ATTACH, NULL, (struct mbuf *)(long)proto, NULL); @@ -158,6 +161,9 @@ sofree(so) panic("sofree dq"); so->so_head = 0; } +#ifdef IPSEC + /* XXX Free TDBs/routing entries if necessary */ +#endif sbrelease(&so->so_snd); sorflush(so); FREE(so, M_SOCKET);