Date: Mon, 26 Jan 2004 16:45:33 +0000 From: Ilya Varlashkin <ilya@samara.net> To: freebsd-sparc64@freebsd.org Subject: bind() to interface ip addr fails Message-ID: <20040126164533.GA21737@CITADEL.NOBULUS.COM>
next in thread | raw e-mail | index | archive | help
Hi I've noticed that some programs that try to bind() to specific ip address (as opposite to INADDR_ANY) fail to start. I've made simple test (http://citadel.nobulus.com/~ilya/daemon.c) and can observe that if I try to bind() to INADDR_ANY or to 127.0.0.1 then everything is fine. But if I specify ip address of my ethernet interface, then I get "can't bind() - Can't assign requested address (errno=49)". I thought that perhaps it's "big-endian" problem in inet_addr, but that proved wrong (I assigned IP address directly after htonl() conversion). This problem I have since 5.1-RELEASE and now with 5.2-RELEASE the problem is still there. I use Sun HME ethernet NIC on Ultra-10 and have no possibility to verify with other network cards at the moment. Could somebody please have a look into this whether it's problem with hme driver or with bind()? P.S.: If you need some more info or if you want me to test some code, just let me know. I'm not a programmer, but I'll try my best. Kind regards, Ilya Varlashkin
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040126164533.GA21737>