From 4d30a13146156ec27ba9e296f9f70c7f5ae4e290 Mon Sep 17 00:00:00 2001 From: tuexen Date: Wed, 1 Sep 2010 16:11:26 +0000 Subject: Fix a bug which results in peer IPv4 addresses a.b.c.d with 224<=d<=239 incorrectly being detected as multicast addresses on little endian systems. MFC after: 2 weeks --- sys/netinet/sctp_pcb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sys') diff --git a/sys/netinet/sctp_pcb.c b/sys/netinet/sctp_pcb.c index 846f55d..dd469cb 100644 --- a/sys/netinet/sctp_pcb.c +++ b/sys/netinet/sctp_pcb.c @@ -5988,7 +5988,7 @@ sctp_load_addresses_from_init(struct sctp_tcb *stcb, struct mbuf *m, } p4 = (struct sctp_ipv4addr_param *)phdr; sin.sin_addr.s_addr = p4->addr; - if (IN_MULTICAST(sin.sin_addr.s_addr)) { + if (IN_MULTICAST(ntohl(sin.sin_addr.s_addr))) { /* Skip multi-cast addresses */ goto next_param; } -- cgit v1.1