else
return EADDRINUSE;
}
+ if ((inp->inp_laddr.s_addr == INADDR_ANY ? ifaddr->sin_addr.s_addr :
+ inp->inp_laddr.s_addr) == sin->sin_addr.s_addr &&
+ inp->inp_lport == sin->sin_port)
+ return EINVAL;
if (inp->inp_laddr.s_addr == INADDR_ANY)
inp->inp_laddr = ifaddr->sin_addr;
inp->inp_faddr = sin->sin_addr;
tcpstat.tcps_connattempt++;
tp->t_state = TCPS_SYN_SENT;
tp->t_timer[TCPT_KEEP] = tcp_keepinit;
- tp->iss = tcp_iss; tcp_iss += TCP_ISSINCR/2;
+#ifdef TCP_COMPAT_42
+ tp->iss = tcp_iss;
+ tcp_iss =+ TCP_ISSINCR/2;
+#else /* TCP_COMPAT_42 */
+ tp->iss = tcp_rndiss_next();
+#endif /* !TCP_COMPAT_42 */
+
tcp_sendseqinit(tp);
/*
tcpstat.tcps_connattempt++;
tp->t_state = TCPS_SYN_SENT;
tp->t_timer[TCPT_KEEP] = tcp_keepinit;
+#ifdef TCP_COMPAT_42
tp->iss = tcp_iss; tcp_iss += TCP_ISSINCR/2;
+#else
+ tp->iss = tcp_rndiss_next();
+#endif /* TCP_COMPAT_42 */
tcp_sendseqinit(tp);
/*