SCCS-vsn: sys/netinet/tcp_input.c 6.15
* All rights reserved. The Berkeley software License Agreement
* specifies the terms and conditions for redistribution.
*
* All rights reserved. The Berkeley software License Agreement
* specifies the terms and conditions for redistribution.
*
- * @(#)tcp_input.c 6.14 (Berkeley) %G%
+ * @(#)tcp_input.c 6.15 (Berkeley) %G%
* If the state is LISTEN then ignore segment if it contains an RST.
* If the segment contains an ACK then it is bad and send a RST.
* If it does not contain a SYN then it is not interesting; drop it.
* If the state is LISTEN then ignore segment if it contains an RST.
* If the segment contains an ACK then it is bad and send a RST.
* If it does not contain a SYN then it is not interesting; drop it.
+ * Don't bother responding if the destination was a broadcast.
* Otherwise initialize tp->rcv_nxt, and tp->irs, select an initial
* tp->iss, and send a segment:
* <SEQ=ISS><ACK=RCV_NXT><CTL=SYN,ACK>
* Otherwise initialize tp->rcv_nxt, and tp->irs, select an initial
* tp->iss, and send a segment:
* <SEQ=ISS><ACK=RCV_NXT><CTL=SYN,ACK>
goto dropwithreset;
if ((tiflags & TH_SYN) == 0)
goto drop;
goto dropwithreset;
if ((tiflags & TH_SYN) == 0)
goto drop;
+ if (in_broadcast(ti->ti_dst))
+ goto drop;
am = m_get(M_DONTWAIT, MT_SONAME);
if (am == NULL)
goto drop;
am = m_get(M_DONTWAIT, MT_SONAME);
if (am == NULL)
goto drop;
/*
* Generate a RST, dropping incoming segment.
* Make ACK acceptable to originator of segment.
/*
* Generate a RST, dropping incoming segment.
* Make ACK acceptable to originator of segment.
+ * Don't bother to respond if destination was broadcast.
+ if ((tiflags & TH_RST) || in_broadcast(ti->ti_dst))
goto drop;
if (tiflags & TH_ACK)
tcp_respond(tp, ti, (tcp_seq)0, ti->ti_ack, TH_RST);
goto drop;
if (tiflags & TH_ACK)
tcp_respond(tp, ti, (tcp_seq)0, ti->ti_ack, TH_RST);