Commit 1155c2df authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

- takes scope into account for NI_MAXNUMERICHOST

- accept 224.0.0.0 as a multicast address
parent 47a063c8
......@@ -421,7 +421,7 @@ VLC_EXPORT( int, __net_GetAddress, ( vlc_object_t *p_this, vlc_bool_t peer, int
# define NI_MAXHOST 1025
# define NI_MAXSERV 32
# endif
# define NI_MAXNUMERICHOST 48
# define NI_MAXNUMERICHOST 64
# ifndef NI_NUMERICHOST
# define NI_NUMERICHOST 0x01
......@@ -497,7 +497,7 @@ static inline vlc_bool_t net_AddressIsMulticast( vlc_object_t *p_object, char *p
{
#if !defined( SYS_BEOS )
struct sockaddr_in *v4 = (struct sockaddr_in *) res->ai_addr;
b_multicast = ( ntohl( v4->sin_addr.s_addr ) > 0xe1000000 && ntohl( v4->sin_addr.s_addr ) <= 0xEFFFFFFF );
b_multicast = ( ntohl( v4->sin_addr.s_addr ) >= 0xe1000000 && ntohl( v4->sin_addr.s_addr ) <= 0xEFFFFFFF );
#endif
}
else if( res->ai_family == AF_INET6 )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment