diff options
author | Angelos D. Keromytis <angelos@cvs.openbsd.org> | 2001-05-30 12:29:05 +0000 |
---|---|---|
committer | Angelos D. Keromytis <angelos@cvs.openbsd.org> | 2001-05-30 12:29:05 +0000 |
commit | 0c498213aaebf1d4bd58afb2abbc6793287e8835 (patch) | |
tree | 00a5ebe471f15abc17149eae4543a61f84c15f00 /sys | |
parent | ab00697c26b16b955dbba4c10ba65fdf9d3dc088 (diff) |
Update to match prototypes.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/netinet/ip_ah.c | 17 | ||||
-rw-r--r-- | sys/netinet/ip_esp.c | 17 | ||||
-rw-r--r-- | sys/netinet/ipsec_output.c | 21 |
3 files changed, 16 insertions, 39 deletions
diff --git a/sys/netinet/ip_ah.c b/sys/netinet/ip_ah.c index fc8cc4a92a8..36cf6c2cfd8 100644 --- a/sys/netinet/ip_ah.c +++ b/sys/netinet/ip_ah.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ip_ah.c,v 1.56 2001/05/30 12:13:59 angelos Exp $ */ +/* $OpenBSD: ip_ah.c,v 1.57 2001/05/30 12:29:03 angelos Exp $ */ /* * The authors of this code are John Ioannidis (ji@tla.org), @@ -897,7 +897,7 @@ ah_input_cb(void *op) */ int ah_output(struct mbuf *m, struct tdb *tdb, struct mbuf **mp, int skip, - int protoff, struct tdb *tdb2) + int protoff) { struct auth_hash *ahx = (struct auth_hash *) tdb->tdb_authalgxform; struct cryptodesc *crda; @@ -1181,13 +1181,6 @@ ah_output(struct mbuf *m, struct tdb *tdb, struct mbuf **mp, int skip, tc->tc_proto = tdb->tdb_sproto; bcopy(&tdb->tdb_dst, &tc->tc_dst, sizeof(union sockaddr_union)); - if (tdb2) - { - tc->tc_spi2 = tdb2->tdb_spi; - tc->tc_proto2 = tdb2->tdb_sproto; - bcopy(&tdb2->tdb_dst, &tc->tc_dst2, sizeof(union sockaddr_union)); - } - if ((tdb->tdb_flags & TDBF_SKIPCRYPTO) == 0) return crypto_dispatch(crp); else @@ -1200,10 +1193,10 @@ ah_output(struct mbuf *m, struct tdb *tdb, struct mbuf **mp, int skip, int ah_output_cb(void *op) { - struct tdb *tdb, *tdb2 = NULL; int skip, protoff, error; struct tdb_crypto *tc; struct cryptop *crp; + struct tdb *tdb; struct mbuf *m; caddr_t ptr; int err, s; @@ -1218,8 +1211,6 @@ ah_output_cb(void *op) s = spltdb(); tdb = gettdb(tc->tc_spi, &tc->tc_dst, tc->tc_proto); - if (tc->tc_spi2) - tdb2 = gettdb(tc->tc_spi2, &tc->tc_dst2, tc->tc_proto2); FREE(tc, M_XDATA); if (tdb == NULL) @@ -1263,7 +1254,7 @@ ah_output_cb(void *op) /* No longer needed */ crypto_freereq(crp); - err = ipsp_process_done(m, tdb, tdb2); + err = ipsp_process_done(m, tdb); splx(s); return err; diff --git a/sys/netinet/ip_esp.c b/sys/netinet/ip_esp.c index 7d9248cf33b..65d77943214 100644 --- a/sys/netinet/ip_esp.c +++ b/sys/netinet/ip_esp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ip_esp.c,v 1.61 2001/05/30 12:13:58 angelos Exp $ */ +/* $OpenBSD: ip_esp.c,v 1.62 2001/05/30 12:29:04 angelos Exp $ */ /* * The authors of this code are John Ioannidis (ji@tla.org), @@ -712,7 +712,7 @@ esp_input_cb(void *op) */ int esp_output(struct mbuf *m, struct tdb *tdb, struct mbuf **mp, int skip, - int protoff, struct tdb *tdb2) + int protoff) { struct enc_xform *espx = (struct enc_xform *) tdb->tdb_encalgxform; struct auth_hash *esph = (struct auth_hash *) tdb->tdb_authalgxform; @@ -981,13 +981,6 @@ esp_output(struct mbuf *m, struct tdb *tdb, struct mbuf **mp, int skip, tc->tc_proto = tdb->tdb_sproto; bcopy(&tdb->tdb_dst, &tc->tc_dst, sizeof(union sockaddr_union)); - if (tdb2) - { - tc->tc_spi2 = tdb2->tdb_spi; - tc->tc_proto2 = tdb2->tdb_sproto; - bcopy(&tdb2->tdb_dst, &tc->tc_dst2, sizeof(union sockaddr_union)); - } - /* Crypto operation descriptor */ crp->crp_ilen = m->m_pkthdr.len; /* Total input length */ crp->crp_flags = CRYPTO_F_IMBUF; @@ -1022,8 +1015,8 @@ int esp_output_cb(void *op) { struct cryptop *crp = (struct cryptop *) op; - struct tdb *tdb, *tdb2 = NULL; struct tdb_crypto *tc; + struct tdb *tdb; struct mbuf *m; int error, s; @@ -1033,8 +1026,6 @@ esp_output_cb(void *op) s = spltdb(); tdb = gettdb(tc->tc_spi, &tc->tc_dst, tc->tc_proto); - if (tc->tc_spi2) - tdb2 = gettdb(tc->tc_spi2, &tc->tc_dst2, tc->tc_proto2); FREE(tc, M_XDATA); if (tdb == NULL) @@ -1085,7 +1076,7 @@ esp_output_cb(void *op) tdb->tdb_iv); /* Call the IPsec input callback */ - error = ipsp_process_done(m, tdb, tdb2); + error = ipsp_process_done(m, tdb); splx(s); return error; diff --git a/sys/netinet/ipsec_output.c b/sys/netinet/ipsec_output.c index f613e32c475..604a8f8f06a 100644 --- a/sys/netinet/ipsec_output.c +++ b/sys/netinet/ipsec_output.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ipsec_output.c,v 1.12 2001/05/29 01:19:37 angelos Exp $ */ +/* $OpenBSD: ipsec_output.c,v 1.13 2001/05/30 12:29:04 angelos Exp $ */ /* * The author of this code is Angelos D. Keromytis (angelos@cis.upenn.edu) @@ -63,8 +63,7 @@ * place. */ int -ipsp_process_packet(struct mbuf *m, struct tdb *tdb, int af, int tunalready, - struct tdb *tdb2) +ipsp_process_packet(struct mbuf *m, struct tdb *tdb, int af, int tunalready) { int i, off, error; struct mbuf *mp; @@ -220,7 +219,7 @@ ipsp_process_packet(struct mbuf *m, struct tdb *tdb, int af, int tunalready, #endif /* INET6 */ /* Encapsulate -- the last two arguments are unused */ - error = ipip_output(m, tdb, &mp, 0, 0, NULL); + error = ipip_output(m, tdb, &mp, 0, 0); if ((mp == NULL) && (!error)) error = EFAULT; if (error) @@ -240,7 +239,7 @@ ipsp_process_packet(struct mbuf *m, struct tdb *tdb, int af, int tunalready, /* We may be done with this TDB */ if (tdb->tdb_xform->xf_type == XF_IP4) - return ipsp_process_done(m, tdb, tdb2); + return ipsp_process_done(m, tdb); } else { @@ -249,7 +248,7 @@ ipsp_process_packet(struct mbuf *m, struct tdb *tdb, int af, int tunalready, * encapsulation header, move on. */ if (tdb->tdb_xform->xf_type == XF_IP4) - return ipsp_process_done(m, tdb, tdb2); + return ipsp_process_done(m, tdb); } /* Extract some information off the headers */ @@ -273,7 +272,7 @@ ipsp_process_packet(struct mbuf *m, struct tdb *tdb, int af, int tunalready, } /* Invoke the IPsec transform */ - return (*(tdb->tdb_xform->xf_output))(m, tdb, NULL, i, off, tdb2); + return (*(tdb->tdb_xform->xf_output))(m, tdb, NULL, i, off); } /* @@ -281,7 +280,7 @@ ipsp_process_packet(struct mbuf *m, struct tdb *tdb, int af, int tunalready, * or do further processing, as necessary. */ int -ipsp_process_done(struct mbuf *m, struct tdb *tdb, struct tdb *tdb2) +ipsp_process_done(struct mbuf *m, struct tdb *tdb) { #ifdef INET struct ip *ip; @@ -365,11 +364,7 @@ ipsp_process_done(struct mbuf *m, struct tdb *tdb, struct tdb *tdb2) /* If there's another (bundled) TDB to apply, do so */ if (tdb->tdb_onext) return ipsp_process_packet(m, tdb->tdb_onext, tdb->tdb_dst.sa.sa_family, - 0, tdb2); - - /* Otherwise, if there's a secondary TDB to apply, do so */ - if (tdb2) - return ipsp_process_packet(m, tdb2, tdb->tdb_dst.sa.sa_family, 0, NULL); + 0); /* * We're done with IPsec processing, transmit the packet using the |