diff options
author | Angelos D. Keromytis <angelos@cvs.openbsd.org> | 1997-09-24 00:05:35 +0000 |
---|---|---|
committer | Angelos D. Keromytis <angelos@cvs.openbsd.org> | 1997-09-24 00:05:35 +0000 |
commit | 6fa11333a0bdcd97d736f530f59baff7bb2bf5f3 (patch) | |
tree | 570ff7fbdc8c9f6ddd7d7d5271f1597f6dd6c79f /sys | |
parent | fe410492ca5bd5442e2cfacba8f79b8b0d44ec36 (diff) |
Cosmetic changes.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/netinet/ip_esp_new.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/sys/netinet/ip_esp_new.c b/sys/netinet/ip_esp_new.c index 04d6fc0d243..60ce4b4ba9c 100644 --- a/sys/netinet/ip_esp_new.c +++ b/sys/netinet/ip_esp_new.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ip_esp_new.c,v 1.3 1997/09/23 21:42:21 angelos Exp $ */ +/* $OpenBSD: ip_esp_new.c,v 1.4 1997/09/24 00:05:34 angelos Exp $ */ /* * The author of this code is John Ioannidis, ji@tla.org, @@ -180,7 +180,6 @@ esp_new_init(struct tdb *tdbp, struct xformsw *xsp, struct mbuf *m) } enc_keylen = 8; - break; case ALG_ENC_3DES: @@ -199,7 +198,6 @@ esp_new_init(struct tdb *tdbp, struct xformsw *xsp, struct mbuf *m) } enc_keylen = 24; - break; } @@ -495,7 +493,7 @@ esp_new_input(struct mbuf *m, struct tdb *tdb) /* Skip the IP header, IP options, SPI, SN and IV and minus Auth Data*/ plen = m->m_pkthdr.len - (ip->ip_hl << 2) - 2 * sizeof (u_int32_t) - xd->edx_ivlen - alen; - if (plen & (blks -1)) + if (plen & (blks - 1)) { #ifdef ENCDEBUG if (encdebug) @@ -511,7 +509,7 @@ esp_new_input(struct mbuf *m, struct tdb *tdb) switch (xd->edx_hash_algorithm) { case ALG_AUTH_MD5: - md5ctx = xd->edx_md5_ictx;; + md5ctx = xd->edx_md5_ictx; break; case ALG_AUTH_SHA1: @@ -592,7 +590,6 @@ esp_new_input(struct mbuf *m, struct tdb *tdb) break; } - if (bcmp(buf2, buf, AH_HMAC_HASHLEN)) { log(LOG_ALERT, @@ -695,7 +692,6 @@ esp_new_input(struct mbuf *m, struct tdb *tdb) } i = 0; - } plen--; @@ -948,6 +944,7 @@ esp_new_output(struct mbuf *m, struct sockaddr_encap *gw, struct tdb *tdb, MD5Update(&md5ctx, (unsigned char *) &espo, 2 * sizeof(u_int32_t) + xd->edx_ivlen); break; + case ALG_AUTH_SHA1: sha1ctx = xd->edx_sha1_ictx; SHA1Update(&sha1ctx, (unsigned char *) &espo, @@ -1139,7 +1136,8 @@ esp_new_output(struct mbuf *m, struct sockaddr_encap *gw, struct tdb *tdb, * return 3 for packet within current window but already received */ int -checkreplaywindow32(u_int32_t seq, u_int32_t initial, u_int32_t *lastseq, u_int32_t window, u_int32_t *bitmap) +checkreplaywindow32(u_int32_t seq, u_int32_t initial, u_int32_t *lastseq, + u_int32_t window, u_int32_t *bitmap) { u_int32_t diff; |