Added missing ntohl()'s that are needed before calling IN_MULTICAST in

a couple of places.
Submitted by:	Johannes Helander
This commit is contained in:
dg 1994-05-26 09:51:33 +00:00
parent b644edeb7c
commit 28839c3795
2 changed files with 4 additions and 4 deletions

View File

@ -547,7 +547,7 @@ findpcb:
* packet with M_BCAST not set. * packet with M_BCAST not set.
*/ */
if (m->m_flags & (M_BCAST|M_MCAST) || if (m->m_flags & (M_BCAST|M_MCAST) ||
IN_MULTICAST(ti->ti_dst.s_addr)) IN_MULTICAST(ntohl(ti->ti_dst.s_addr)))
goto drop; goto drop;
am = m_get(M_DONTWAIT, MT_SONAME); /* XXX */ am = m_get(M_DONTWAIT, MT_SONAME); /* XXX */
if (am == NULL) if (am == NULL)
@ -1289,7 +1289,7 @@ dropwithreset:
* Don't bother to respond if destination was broadcast/multicast. * Don't bother to respond if destination was broadcast/multicast.
*/ */
if ((tiflags & TH_RST) || m->m_flags & (M_BCAST|M_MCAST) || if ((tiflags & TH_RST) || m->m_flags & (M_BCAST|M_MCAST) ||
IN_MULTICAST(ti->ti_dst.s_addr)) IN_MULTICAST(ntohl(ti->ti_dst.s_addr)))
goto drop; goto drop;
if (tiflags & TH_ACK) if (tiflags & TH_ACK)
tcp_respond(tp, ti, m, (tcp_seq)0, ti->ti_ack, TH_RST); tcp_respond(tp, ti, m, (tcp_seq)0, ti->ti_ack, TH_RST);

View File

@ -547,7 +547,7 @@ findpcb:
* packet with M_BCAST not set. * packet with M_BCAST not set.
*/ */
if (m->m_flags & (M_BCAST|M_MCAST) || if (m->m_flags & (M_BCAST|M_MCAST) ||
IN_MULTICAST(ti->ti_dst.s_addr)) IN_MULTICAST(ntohl(ti->ti_dst.s_addr)))
goto drop; goto drop;
am = m_get(M_DONTWAIT, MT_SONAME); /* XXX */ am = m_get(M_DONTWAIT, MT_SONAME); /* XXX */
if (am == NULL) if (am == NULL)
@ -1289,7 +1289,7 @@ dropwithreset:
* Don't bother to respond if destination was broadcast/multicast. * Don't bother to respond if destination was broadcast/multicast.
*/ */
if ((tiflags & TH_RST) || m->m_flags & (M_BCAST|M_MCAST) || if ((tiflags & TH_RST) || m->m_flags & (M_BCAST|M_MCAST) ||
IN_MULTICAST(ti->ti_dst.s_addr)) IN_MULTICAST(ntohl(ti->ti_dst.s_addr)))
goto drop; goto drop;
if (tiflags & TH_ACK) if (tiflags & TH_ACK)
tcp_respond(tp, ti, m, (tcp_seq)0, ti->ti_ack, TH_RST); tcp_respond(tp, ti, m, (tcp_seq)0, ti->ti_ack, TH_RST);