[asterisk-commits] mnicholson: branch 1.4 r304247 - /branches/1.4/channels/chan_sip.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Jan 26 15:00:21 CST 2011


Author: mnicholson
Date: Wed Jan 26 15:00:15 2011
New Revision: 304247

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=304247
Log:
Convert from network to host byte ordering before checking if an IP is a multicast address.

Modified:
    branches/1.4/channels/chan_sip.c

Modified: branches/1.4/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.4/channels/chan_sip.c?view=diff&rev=304247&r1=304246&r2=304247
==============================================================================
--- branches/1.4/channels/chan_sip.c (original)
+++ branches/1.4/channels/chan_sip.c Wed Jan 26 15:00:15 2011
@@ -5090,7 +5090,7 @@
  */
 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)




More information about the asterisk-commits mailing list