-/* $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 $ */
/*
/*
* 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;
#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];
#ifdef TCP_SIGNATURE
bad:
tdb_unref(tdb);
-#endif /* TCP_SIGNATURE */
+#endif
return (-1);
}
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;