diff options
author | Angelos D. Keromytis <angelos@cvs.openbsd.org> | 1997-02-28 04:03:49 +0000 |
---|---|---|
committer | Angelos D. Keromytis <angelos@cvs.openbsd.org> | 1997-02-28 04:03:49 +0000 |
commit | 48ace743dd4d81e2b1c4e2c47b0070e7ed61689e (patch) | |
tree | 43b6fb4eab30a9dba67c920da7723cf9be809609 /sys/netinet/in_pcb.c | |
parent | 49f58e78e8868b6b26ffef64c386021815e88a04 (diff) |
Moved IPsec socket state to the PCB.
Diffstat (limited to 'sys/netinet/in_pcb.c')
-rw-r--r-- | sys/netinet/in_pcb.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/sys/netinet/in_pcb.c b/sys/netinet/in_pcb.c index ff1f639563c..595ab8e311a 100644 --- a/sys/netinet/in_pcb.c +++ b/sys/netinet/in_pcb.c @@ -1,4 +1,4 @@ -/* $OpenBSD: in_pcb.c,v 1.14 1997/02/05 15:48:23 deraadt Exp $ */ +/* $OpenBSD: in_pcb.c,v 1.15 1997/02/28 04:03:47 angelos Exp $ */ /* $NetBSD: in_pcb.c,v 1.25 1996/02/13 23:41:53 christos Exp $ */ /* @@ -61,6 +61,10 @@ struct in_addr zeroin_addr; +extern u_char ipsec_auth_default_level; +extern u_char ipsec_esp_trans_default_level; +extern u_char ipsec_esp_network_default_level; + /* * These configure the range of local port addresses assigned to * "unspecified" outgoing connections/packets/whatever. @@ -99,6 +103,9 @@ in_pcballoc(so, v) bzero((caddr_t)inp, sizeof(*inp)); inp->inp_table = table; inp->inp_socket = so; + inp->inp_seclevel[SL_AUTH] = ipsec_auth_default_level; + inp->inp_seclevel[SL_ESP_TRANS] = ipsec_esp_trans_default_level; + inp->inp_seclevel[SL_ESP_NETWORK] = ipsec_esp_network_default_level; s = splnet(); CIRCLEQ_INSERT_HEAD(&table->inpt_queue, inp, inp_queue); LIST_INSERT_HEAD(INPCBHASH(table, &inp->inp_faddr, inp->inp_fport, @@ -419,6 +426,9 @@ in_pcbdetach(v) if (inp->inp_route.ro_rt) rtfree(inp->inp_route.ro_rt); ip_freemoptions(inp->inp_moptions); +#ifdef IPSEC + /* XXX IPsec cleanup here */ +#endif s = splnet(); LIST_REMOVE(inp, inp_hash); CIRCLEQ_REMOVE(&inp->inp_table->inpt_queue, inp, inp_queue); |