From a78a3c2559d7086ac1cfd00deb5725464fbfbc70 Mon Sep 17 00:00:00 2001 From: bluhm Date: Wed, 7 Jul 2021 18:03:46 +0000 Subject: [PATCH] Fix whitespaces in IPsec code. --- sys/netinet/ip_esp.c | 4 ++-- sys/netinet/ip_ipip.c | 8 ++++---- sys/netinet/ip_ipsp.h | 16 ++++++++-------- sys/netinet/ipsec_output.c | 4 ++-- 4 files changed, 16 insertions(+), 16 deletions(-) diff --git a/sys/netinet/ip_esp.c b/sys/netinet/ip_esp.c index 40c3a0147b1..0d11b45b4e7 100644 --- a/sys/netinet/ip_esp.c +++ b/sys/netinet/ip_esp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ip_esp.c,v 1.163 2021/06/18 15:34:21 bluhm Exp $ */ +/* $OpenBSD: ip_esp.c,v 1.164 2021/07/07 18:03:46 bluhm Exp $ */ /* * The authors of this code are John Ioannidis (ji@tla.org), * Angelos D. Keromytis (kermit@csd.uch.gr) and @@ -689,7 +689,7 @@ esp_input_cb(struct tdb *tdb, struct tdb_crypto *tc, struct mbuf *m, int clen) * overlapping copy of the remainder of the mbuf over the ESP * header. */ - memmove(mtod(m1, u_char *) + roff, + memmove(mtod(m1, u_char *) + roff, mtod(m1, u_char *) + roff + hlen, m1->m_len - (roff + hlen)); m1->m_len -= hlen; diff --git a/sys/netinet/ip_ipip.c b/sys/netinet/ip_ipip.c index d6f6da856fe..831c3e4e666 100644 --- a/sys/netinet/ip_ipip.c +++ b/sys/netinet/ip_ipip.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ip_ipip.c,v 1.90 2021/01/09 20:59:44 gnezdo Exp $ */ +/* $OpenBSD: ip_ipip.c,v 1.91 2021/07/07 18:03:46 bluhm Exp $ */ /* * The authors of this code are John Ioannidis (ji@tla.org), * Angelos D. Keromytis (kermit@csd.uch.gr) and @@ -228,7 +228,7 @@ ipip_input_if(struct mbuf **mp, int *offp, int proto, int oaf, /* Some sanity checks in the inner IP header */ switch (proto) { - case IPPROTO_IPV4: + case IPPROTO_IPV4: iaf = AF_INET; ip = mtod(m, struct ip *); hlen = ip->ip_hl << 2; @@ -249,7 +249,7 @@ ipip_input_if(struct mbuf **mp, int *offp, int proto, int oaf, ip_tos_patch(ip, itos); break; #ifdef INET6 - case IPPROTO_IPV6: + case IPPROTO_IPV6: iaf = AF_INET6; ip6 = mtod(m, struct ip6_hdr *); itos = (ntohl(ip6->ip6_flow) >> 20) & 0xff; @@ -289,7 +289,7 @@ ipip_input_if(struct mbuf **mp, int *offp, int proto, int oaf, ipipstat_inc(ipips_spoof); rtfree(rt); goto bad; - } + } rtfree(rt); } diff --git a/sys/netinet/ip_ipsp.h b/sys/netinet/ip_ipsp.h index e048fe7a422..bf71c019c03 100644 --- a/sys/netinet/ip_ipsp.h +++ b/sys/netinet/ip_ipsp.h @@ -1,4 +1,4 @@ -/* $OpenBSD: ip_ipsp.h,v 1.197 2021/05/04 09:28:04 mvs Exp $ */ +/* $OpenBSD: ip_ipsp.h,v 1.198 2021/07/07 18:03:46 bluhm Exp $ */ /* * The authors of this code are John Ioannidis (ji@tla.org), * Angelos D. Keromytis (kermit@csd.uch.gr), @@ -62,7 +62,7 @@ union sockaddr_union { #define AH_SHA2_256_ALEN 32 #define AH_SHA2_384_ALEN 48 #define AH_SHA2_512_ALEN 64 -#define AH_ALEN_MAX 64 /* Keep updated */ +#define AH_ALEN_MAX 64 /* Keep updated */ /* Reserved SPI numbers */ #define SPI_LOCAL_USE 0 @@ -262,7 +262,7 @@ struct ipsec_policy { union sockaddr_union ipo_dst; /* Remote gateway -- if it's zeroed: * - on output, we try to * contact the remote host - * directly (if needed). + * directly (if needed). * - on input, we accept on if * the inner source is the * same as the outer source @@ -494,7 +494,7 @@ extern int ipsec_exp_bytes; /* num of bytes/SA before it expires */ extern int ipsec_soft_timeout; /* seconds/SA before renegotiation */ extern int ipsec_exp_timeout; /* seconds/SA before it expires */ extern int ipsec_soft_first_use; /* seconds between 1st asso & renego */ -extern int ipsec_exp_first_use; /* seconds between 1st asso & expire */ +extern int ipsec_exp_first_use; /* seconds between 1st asso & expire */ /* * Names for IPsec sysctl objects @@ -575,9 +575,9 @@ int ipe4_zeroize(struct tdb *); int ipe4_input(struct mbuf *, struct tdb *, int, int); /* XF_AH */ -int ah_attach(void); -int ah_init(struct tdb *, struct xformsw *, struct ipsecinit *); -int ah_zeroize(struct tdb *); +int ah_attach(void); +int ah_init(struct tdb *, struct xformsw *, struct ipsecinit *); +int ah_zeroize(struct tdb *); int ah_input(struct mbuf *, struct tdb *, int, int); int ah_input_cb(struct tdb *, struct tdb_crypto *, struct mbuf *, int); int ah_output(struct mbuf *, struct tdb *, struct mbuf **, int, int); @@ -608,7 +608,7 @@ int esp4_input(struct mbuf **, int *, int, int); void esp4_ctlinput(int, struct sockaddr *, u_int, void *); #ifdef INET6 -int esp6_input(struct mbuf **, int *, int, int); +int esp6_input(struct mbuf **, int *, int, int); #endif /* INET6 */ /* XF_IPCOMP */ diff --git a/sys/netinet/ipsec_output.c b/sys/netinet/ipsec_output.c index f72dba28944..dcae758d3c0 100644 --- a/sys/netinet/ipsec_output.c +++ b/sys/netinet/ipsec_output.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ipsec_output.c,v 1.80 2021/06/18 15:34:21 bluhm Exp $ */ +/* $OpenBSD: ipsec_output.c,v 1.81 2021/07/07 18:03:46 bluhm Exp $ */ /* * The author of this code is Angelos D. Keromytis (angelos@cis.upenn.edu) * @@ -453,7 +453,7 @@ ipsec_output_cb(struct cryptop *crp) baddone: NET_UNLOCK(); droponly: - if (tdb != NULL) + if (tdb != NULL) tdb->tdb_odrops++; m_freem(m); free(tc, M_XDATA, 0); -- 2.20.1