From owner-freebsd-net Fri Dec 13 10:27:29 2002 Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 63C2B37B401 for ; Fri, 13 Dec 2002 10:27:28 -0800 (PST) Received: from basie.internet2.edu (basie.internet2.edu [207.75.164.22]) by mx1.FreeBSD.org (Postfix) with ESMTP id F182543EC2 for ; Fri, 13 Dec 2002 10:27:27 -0800 (PST) (envelope-from boote@internet2.edu) Received: from localhost (localhost.localdomain [127.0.0.1]) by basie.internet2.edu (Postfix) with ESMTP id 29FF57B472; Fri, 13 Dec 2002 13:27:27 -0500 (EST) Received: from internet2.edu (localhost [127.0.0.1]) by basie.internet2.edu (Postfix) with ESMTP id E7AFE7B46E; Fri, 13 Dec 2002 13:27:25 -0500 (EST) Message-ID: <3DFA268D.A073F0F3@internet2.edu> Date: Fri, 13 Dec 2002 11:27:25 -0700 From: "Jeff W. Boote" X-Mailer: Mozilla 4.79 [en] (Windows NT 5.0; U) X-Accept-Language: en MIME-Version: 1.0 To: freebsd-net@freebsd.org Subject: IPv6 udp socket bind: EADDRNOTAVAIL? Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Virus-Scanned: by AMaViS 0.3.12pre8 Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org I have a long running IPv6 daemon that uses both tcp and udp. It accepts requests on a tcp socket, and then performs an action on a udp socket using the same local address that the tcp request came in on. (I am calling bind on the udp socket to allocate a port number to return to the client over the tcp connection.) My problem is that I get intermittent bind failures for the udp socket. I'm trying to understand what is going on here. The udp bind is for the same address as the local address of the tcp socket. (Although the tcp socket was originally bound using the wildcard.) I have tracked this down to the following lines in the kernel code: in6_pcb.c:129 if (!in6_ifaddr) /* XXX broken! */ return (EADDRNOTAVAIL); It looks like the kernel's list of v6 interfaces is empty for some reason. Is that correct, or is there some other reason this list would be empty? Questions: 1. The comment says broken. Anyone know why the comment says that? (The IPv4 version of bind says the same thing...) 2. This system is auto configuring this address... Is it possible that I'm just having this problem because the system is reconfiguring the address at this time? (I must admit that I have not looked at the auto configuration stuff.) Thanks, jeff To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message