summaryrefslogtreecommitdiff
path: root/sys/netinet
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1998-06-27 02:42:42 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1998-06-27 02:42:42 +0000
commitef742d6195ff198e82ea8c4c0208aed15efd11b0 (patch)
tree46a19bd832b68c546001ba9346f8113e7a91b126 /sys/netinet
parent36fddfe11f156304c1dd0fd4b934774ec4763eb0 (diff)
indent
Diffstat (limited to 'sys/netinet')
-rw-r--r--sys/netinet/tcp_input.c19
-rw-r--r--sys/netinet/tcp_usrreq.c6
2 files changed, 14 insertions, 11 deletions
diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c
index e6d4a443d89..d8de1608d26 100644
--- a/sys/netinet/tcp_input.c
+++ b/sys/netinet/tcp_input.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tcp_input.c,v 1.18 1998/03/18 02:37:47 angelos Exp $ */
+/* $OpenBSD: tcp_input.c,v 1.19 1998/06/27 02:42:40 deraadt Exp $ */
/* $NetBSD: tcp_input.c,v 1.23 1996/02/13 23:43:44 christos Exp $ */
/*
@@ -155,7 +155,8 @@ tck_addfriend(struct in_addr f)
*/
static u_int32_t
-tck_makecookie(struct in_addr f)
+tck_makecookie(f)
+ struct in_addr f;
{
static MD5_CTX ctx;
u_int8_t buf[16];
@@ -175,13 +176,15 @@ tck_makecookie(struct in_addr f)
}
static int
-tck_chkcookie(struct tcpiphdr *ti)
+tck_chkcookie(ti)
+ struct tcpiphdr *ti;
{
#ifdef DEBUG_TCPCOOKIE
printf("tck_chkcookie: src = 0x%08x, cookie = 0x%08x, seq = 0x%08x, ack = 0x%08x\n", ntohl(ti->ti_src.s_addr), tck_makecookie(ti->ti_src), ti->ti_seq, ti->ti_ack);
#endif /* DEBUG_TCPCOOKIE */
- if (tck_makecookie(ti->ti_src) == ti->ti_seq) { /* seq in host order */
+ if (tck_makecookie(ti->ti_src) == ti->ti_seq) {
+ /* seq in host order */
tck_addfriend(ti->ti_src);
return 1;
}
@@ -770,15 +773,15 @@ findpcb:
* try to obtain a cookie and drop the frame.
*/
- if (!tck_isafriend(ti->ti_src))
- {
- u_long acookie;
+ if (!tck_isafriend(ti->ti_src)) {
+ u_int32_t acookie;
+
acookie = tck_makecookie(ti->ti_src);
ti->ti_dport = htons(TCK_PORT);
tcp_respond(tp, ti, m, acookie, acookie, TH_ACK);
/* destroy temporarily created socket */
if (dropsocket)
- (void) soabort(so);
+ (void) soabort(so);
return;
}
#endif /* TCPCOOKIE */
diff --git a/sys/netinet/tcp_usrreq.c b/sys/netinet/tcp_usrreq.c
index 6bd92c73008..880b21ec5e0 100644
--- a/sys/netinet/tcp_usrreq.c
+++ b/sys/netinet/tcp_usrreq.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tcp_usrreq.c,v 1.27 1998/06/27 02:31:58 deraadt Exp $ */
+/* $OpenBSD: tcp_usrreq.c,v 1.28 1998/06/27 02:42:41 deraadt Exp $ */
/* $NetBSD: tcp_usrreq.c,v 1.20 1996/02/13 23:44:16 christos Exp $ */
/*
@@ -70,7 +70,7 @@
#include <dev/rndvar.h>
#ifdef IPSEC
-extern int check_ipsec_policy __P((struct inpcb *, u_int32_t));
+extern int check_ipsec_policy __P((struct inpcb *, u_int32_t));
#endif
/*
@@ -680,7 +680,7 @@ tcp_sysctl(name, namelen, oldp, oldlenp, newp, newlen)
case TCPCTL_SENDSPACE:
return (sysctl_int(oldp, oldlenp, newp, newlen,&tcp_sendspace));
case TCPCTL_IDENT:
- return (tcp_ident(oldp, oldlenp, newp, newlen));
+ return (tcp_ident(oldp, oldlenp, newp, newlen));
default:
return (ENOPROTOOPT);
}