From owner-freebsd-stable@FreeBSD.ORG Sun Apr 20 07:39:38 2003 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 193F637B401 for ; Sun, 20 Apr 2003 07:39:38 -0700 (PDT) Received: from xorpc.icir.org (xorpc.icir.org [192.150.187.68]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9D88F43FE3 for ; Sun, 20 Apr 2003 07:39:37 -0700 (PDT) (envelope-from rizzo@xorpc.icir.org) Received: from xorpc.icir.org (localhost [127.0.0.1]) by xorpc.icir.org (8.12.8p1/8.12.3) with ESMTP id h3KEdWBp052801; Sun, 20 Apr 2003 07:39:32 -0700 (PDT) (envelope-from rizzo@xorpc.icir.org) Received: (from rizzo@localhost) by xorpc.icir.org (8.12.8p1/8.12.3/Submit) id h3KEdWbE052800; Sun, 20 Apr 2003 07:39:32 -0700 (PDT) (envelope-from rizzo) Date: Sun, 20 Apr 2003 07:39:32 -0700 From: Luigi Rizzo To: stable@freebsd.org Message-ID: <20030420073932.A52742@xorpc.icir.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i Subject: weird behaviour of bind() with sin_family=0 X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 Apr 2003 14:39:38 -0000 Hi, i have some code (which works on FreeBSD) which was supposed to do a bind() of a UDP socket on address 0.0.0.0/5678 When running it under cygwin, i got a bind() error which made me notice that i forgot to set sin_family = PF_INET, resulting in a value of 0 (which corresponds to AF_UNSPEC) in that field. Cygwin complains at runtime with "unsupported protocol family", whereas FreeBSD succeeds in binding to the UDP socket. Is this to be considered a feature or a bug ? And, any idea on why it works like this ? cheers luigi