From: Matthew Nicholson Date: Wed, 26 Jan 2011 21:00:15 +0000 (+0000) Subject: Convert from network to host byte ordering before checking if an IP is a multicast... X-Git-Tag: 1.4.41-rc1~26 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0e62797165399328ac37fa4d70426919e9e4f284;p=thirdparty%2Fasterisk.git 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 --- 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)