Network input problem

Cyril Deguet cyril at
Wed Nov 21 17:01:57 CET 2001

Ok I think I have found the problem, and in my case it has nothing to do   
with linux, nor glibc (nor vlc ;-) !

When vlc calls "network_BuildLocalAddr", it tries to get local
hostname when a broadcast address isn't specified, with a
        gethostname(psz_hostname, sizeof(psz_hostname).
Then the name is converted to an IP address with
        p_socket->sin_addr.s_addr = inet_addr( psz_hostname )
I had a look in my /etc/hosts, and the first line was
" localhost sphinx", so inet_addr returns, and
the "connect" fails, because linux kernel forbids connecting a socket
on when server host isn't too.
When I remove "sphinx" from /etc/hosts, everything works fine.


More information about the vlc-devel mailing list