diff options
author | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2024-08-26 13:55:15 +0000 |
---|---|---|
committer | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2024-08-26 13:55:15 +0000 |
commit | 838038e33231826b74e36c891b5dfa255330998b (patch) | |
tree | bcd850ac7f16cc91012c28c4d38fed340d2c8540 /sys/netinet | |
parent | 640b7b8f92b0134673db7a2ae005cc14b45ab5b0 (diff) |
Rearrange #ifdef TCP_SIGNATURE to keep braces balanced.
Diffstat (limited to 'sys/netinet')
-rw-r--r-- | sys/netinet/tcp_input.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c index 9ba66ae6d8e..0cd61cca6b0 100644 --- a/sys/netinet/tcp_input.c +++ b/sys/netinet/tcp_input.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tcp_input.c,v 1.406 2024/06/07 08:02:17 jsg Exp $ */ +/* $OpenBSD: tcp_input.c,v 1.407 2024/08/26 13:55:14 bluhm Exp $ */ /* $NetBSD: tcp_input.c,v 1.23 1996/02/13 23:43:44 christos Exp $ */ /* @@ -871,14 +871,15 @@ findpcb: /* * Process options. */ + if (optp #ifdef TCP_SIGNATURE - if (optp || (tp->t_flags & TF_SIGNATURE)) -#else - if (optp) + || (tp->t_flags & TF_SIGNATURE) #endif + ) { if (tcp_dooptions(tp, optp, optlen, th, m, iphlen, &opti, m->m_pkthdr.ph_rtableid, now)) goto drop; + } if (opti.ts_present && opti.ts_ecr) { int32_t rtt_test; @@ -2124,7 +2125,7 @@ tcp_dooptions(struct tcpcb *tp, u_char *cp, int cnt, struct tcphdr *th, #ifdef TCP_SIGNATURE caddr_t sigp = NULL; struct tdb *tdb = NULL; -#endif /* TCP_SIGNATURE */ +#endif for (; cp && cnt > 0; cnt -= optlen, cp += optlen) { opt = cp[0]; @@ -2289,7 +2290,7 @@ tcp_dooptions(struct tcpcb *tp, u_char *cp, int cnt, struct tcphdr *th, #ifdef TCP_SIGNATURE bad: tdb_unref(tdb); -#endif /* TCP_SIGNATURE */ +#endif return (-1); } @@ -3783,11 +3784,11 @@ syn_cache_add(struct sockaddr *src, struct sockaddr *dst, struct tcphdr *th, win = TCP_MAXWIN; bzero(&tb, sizeof(tb)); + if (optp #ifdef TCP_SIGNATURE - if (optp || (tp->t_flags & TF_SIGNATURE)) { -#else - if (optp) { + || (tp->t_flags & TF_SIGNATURE) #endif + ) { tb.pf = tp->pf; tb.sack_enable = tp->sack_enable; tb.t_flags = tcp_do_rfc1323 ? (TF_REQ_SCALE|TF_REQ_TSTMP) : 0; |