diff options
author | 2001-03-04 20:34:00 +0000 | |
---|---|---|
committer | 2001-03-04 20:34:00 +0000 | |
commit | f472c2af5ecd5f96b4f73d02f534e85570cc10e2 (patch) | |
tree | 71dfa0eeddacf8956bc47080c988c0a87f628b48 | |
parent | Revert to our old traceback code, with heuristic argument printout. (diff) | |
download | wireguard-openbsd-f472c2af5ecd5f96b4f73d02f534e85570cc10e2.tar.xz wireguard-openbsd-f472c2af5ecd5f96b4f73d02f534e85570cc10e2.zip |
Store peer's credentials in TDB.
-rw-r--r-- | sys/netinet/ip_ipsp.c | 8 | ||||
-rw-r--r-- | sys/netinet/ip_ipsp.h | 7 |
2 files changed, 12 insertions, 3 deletions
diff --git a/sys/netinet/ip_ipsp.c b/sys/netinet/ip_ipsp.c index 12402f5f875..0108e960816 100644 --- a/sys/netinet/ip_ipsp.c +++ b/sys/netinet/ip_ipsp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ip_ipsp.c,v 1.106 2001/02/28 04:16:57 angelos Exp $ */ +/* $OpenBSD: ip_ipsp.c,v 1.107 2001/03/04 20:34:00 angelos Exp $ */ /* * The authors of this code are John Ioannidis (ji@tla.org), @@ -910,6 +910,12 @@ tdb_delete(struct tdb *tdbp, int expflags) tdbp->tdb_dstid = NULL; } + if (tdbp->tdb_credentials) + { + FREE(tdbp->tdb_credentials, M_XDATA); + tdbp->tdb_credentials = NULL; + } + if ((tdbp->tdb_onext) && (tdbp->tdb_onext->tdb_inext == tdbp)) tdbp->tdb_onext->tdb_inext = NULL; diff --git a/sys/netinet/ip_ipsp.h b/sys/netinet/ip_ipsp.h index bdd08a5d1cc..e37f5a8828c 100644 --- a/sys/netinet/ip_ipsp.h +++ b/sys/netinet/ip_ipsp.h @@ -1,4 +1,4 @@ -/* $OpenBSD: ip_ipsp.h,v 1.78 2001/02/28 04:16:57 angelos Exp $ */ +/* $OpenBSD: ip_ipsp.h,v 1.79 2001/03/04 20:34:00 angelos Exp $ */ /* * The authors of this code are John Ioannidis (ji@tla.org), @@ -292,10 +292,12 @@ struct tdb /* tunnel descriptor block */ u_int16_t tdb_amxkeylen; /* Raw authentication key length */ u_int16_t tdb_emxkeylen; /* Raw encryption key length */ u_int16_t tdb_ivlen; /* IV length */ + u_int16_t tdb_cred_len; /* size of tdb_credentials */ u_int8_t tdb_sproto; /* IPsec protocol */ u_int8_t tdb_wnd; /* Replay window */ u_int8_t tdb_satype; /* SA type (RFC2367, PF_KEY) */ - + u_int8_t tdb_cred_type; /* type of tdb_credentials */ + union sockaddr_union tdb_dst; /* Destination address for this SA */ union sockaddr_union tdb_src; /* Source address for this SA */ union sockaddr_union tdb_proxy; @@ -318,6 +320,7 @@ struct tdb /* tunnel descriptor block */ u_int8_t tdb_iv[4]; /* Used for HALF-IV ESP */ caddr_t tdb_interface; + caddr_t tdb_credentials; TAILQ_HEAD(tdb_inp_head, inpcb) tdb_inp; TAILQ_HEAD(tdb_policy_head, ipsec_policy) tdb_policy_head; |