From 0e62797165399328ac37fa4d70426919e9e4f284 Mon Sep 17 00:00:00 2001 From: Matthew Nicholson Date: Wed, 26 Jan 2011 21:00:15 +0000 Subject: [PATCH] Convert from network to host byte ordering before checking if an IP is a multicast address. git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@304247 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- channels/chan_sip.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/channels/chan_sip.c b/channels/chan_sip.c index c04e09e844..4f60e4369e 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -5090,7 +5090,7 @@ static struct sip_via *parse_via(const char *header) */ static int addr_is_multicast(struct in_addr *addr) { - return ((addr->s_addr & 0xf0000000) == 0xe0000000); + return ((ntohl(addr->s_addr) & 0xf0000000) == 0xe0000000); } static int process_via(struct sip_pvt *p, const struct sip_request *req) -- 2.47.2