From owner-freebsd-sparc64@FreeBSD.ORG Mon Jan 26 07:49:34 2004 Return-Path: Delivered-To: freebsd-sparc64@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 35D8816A4CE for ; Mon, 26 Jan 2004 07:49:34 -0800 (PST) Received: from citadel.nobulus.com (citadel.nobulus.com [212.97.207.19]) by mx1.FreeBSD.org (Postfix) with ESMTP id B3A2B43D60 for ; Mon, 26 Jan 2004 07:48:30 -0800 (PST) (envelope-from iva@citadel.nobulus.com) Received: from citadel.nobulus.com (localhost.nobulus.com [127.0.0.1]) by citadel.nobulus.com (8.12.10/8.12.9) with ESMTP id i0QGjXkb021829 for ; Mon, 26 Jan 2004 16:45:33 GMT (envelope-from iva@citadel.nobulus.com) Received: (from iva@localhost) by citadel.nobulus.com (8.12.10/8.12.9/Submit) id i0QGjXKv021828 for freebsd-sparc64@freebsd.org; Mon, 26 Jan 2004 16:45:33 GMT (envelope-from iva) Date: Mon, 26 Jan 2004 16:45:33 +0000 From: Ilya Varlashkin To: freebsd-sparc64@freebsd.org Message-ID: <20040126164533.GA21737@CITADEL.NOBULUS.COM> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Subject: bind() to interface ip addr fails X-BeenThere: freebsd-sparc64@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting FreeBSD to the Sparc List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jan 2004 15:49:34 -0000 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