]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Convert from network to host byte ordering before checking if an IP is a multicast...
authorMatthew Nicholson <mnicholson@digium.com>
Wed, 26 Jan 2011 21:00:15 +0000 (21:00 +0000)
committerMatthew Nicholson <mnicholson@digium.com>
Wed, 26 Jan 2011 21:00:15 +0000 (21:00 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@304247 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_sip.c

index c04e09e844372aa6a224673179aa36de7082cf7f..4f60e4369e014e72a9c3bfdc3439716b09ccdd2b 100644 (file)
@@ -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)