From owner-freebsd-hackers@FreeBSD.ORG Fri Apr 19 18:17:52 2013 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id EBFA1E2D for ; Fri, 19 Apr 2013 18:17:52 +0000 (UTC) (envelope-from shonnur@chelsio.com) Received: from stargate.chelsio.com (stargate.chelsio.com [67.207.112.58]) by mx1.freebsd.org (Postfix) with ESMTP id 7A67E105D for ; Fri, 19 Apr 2013 18:17:52 +0000 (UTC) Received: from maui.asicdesigners.com (maui.asicdesigners.com [10.192.180.15]) by stargate.chelsio.com (8.13.1/8.13.1) with SMTP id r3J9hOsS001128; Fri, 19 Apr 2013 02:43:24 -0700 Received: from corona.asicdesigners.com ([10.192.160.6]) by maui.asicdesigners.com with Microsoft SMTPSVC(6.0.3790.4675); Fri, 19 Apr 2013 02:43:23 -0700 Received: from NICE.asicdesigners.com (10.192.160.7) by corona.asicdesigners.com (10.192.160.6) with Microsoft SMTP Server (TLS) id 8.3.83.0; Fri, 19 Apr 2013 02:43:23 -0700 Received: from NICE.asicdesigners.com ([fe80::51b2:ba95:9d72:babc]) by nice.asicdesigners.com ([fe80::51b2:ba95:9d72:babc%15]) with mapi id 14.02.0247.003; Fri, 19 Apr 2013 02:43:23 -0700 From: Sreenivasa Honnur To: "Andrey V. Elsukov" Subject: RE: IPV6 bind fails with 49 (#define EADDRNOTAVAIL 49 /* Can't assign requested address */) Thread-Topic: IPV6 bind fails with 49 (#define EADDRNOTAVAIL 49 /* Can't assign requested address */) Thread-Index: AQHOPDvZutqyOvZawUK9KhABruxLHJjc8tlggABZPZA= Date: Fri, 19 Apr 2013 09:43:22 +0000 Message-ID: References: <516FF961.5070100@yandex.ru> <516FF9E1.5030303@yandex.ru> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.193.190.128] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginalArrivalTime: 19 Apr 2013 09:43:23.0708 (UTC) FILETIME=[559EF7C0:01CE3CE2] Cc: "freebsd-hackers@freebsd.org" X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Apr 2013 18:17:53 -0000 roundhay# sysctl -a | grep jailed security.jail.jailed: 0 Oh, of course, I mean, what do you have in td->td_ucred? [Sreenivas] not sure, I referred to socreate() usage in the kernel source a= nd used it. One more observation. Interface "cxgbe1" has a IPv6 interface and an IPv4 i= nterface, print in ifa_ifwithaddr_internal () shows like below ifp->xname:cxgbe1 ifp->dname:cxgbe ifa->ifa_addr->sa_family:18 addr->sa_family:28 =3D=3D> this is for AF_LINK ifa->ifa_addr->sa_family:2 addr->sa_family:28 =3D=3D> for AF_INET Though cxgbe1 has a IPv6 interface there is no entry for AF_INET6 Interface "cxgbe3" is not configured with any IP, print in ifa_ifwithaddr_i= nternal () shows like below ifp->xname:cxgbe3 ifp->dname:cxgbe ifa->ifa_addr->sa_family:18 addr->sa_family:28 =3D=3D> for AF_LINK roundhay# ifconfig cxgbe1 cxgbe1: flags=3D8843 metric 0 mtu 1= 500 options=3D6c07bb ether 00:07:43:11:89:88 inet6 2010::102 prefixlen 64 inet6 fe80::207:43ff:fe11:8988%cxgbe1 prefixlen 64 scopeid 0xd inet 16.1.1.154 netmask 0xff000000 broadcast 16.255.255.255 nd6 options=3D21 media: Ethernet 10Gbase-SR status: active roundhay# iscsictl -S target=3DALL Failed to start Target iqn.2004-05.com.chelsio.target1 roundhay# ifconfig c= xgbe3 cxgbe3: flags=3D8802 metric 0 mtu 1500 options=3D6c07bb ether 00:07:43:11:89:98 nd6 options=3D29 media: Ethernet 10Gbase-SR status: no carrier -----Original Message----- From: Andrey V. Elsukov [mailto:bu7cher@yandex.ru] Sent: Thursday, April 18, 2013 7:19 PM To: Sreenivasa Honnur Cc: freebsd-hackers@freebsd.org Subject: Re: PV6 bind fails with 49 (#define EADDRNOTAVAIL 49 /* Can't assi= gn requested address */) On 18.04.2013 17:47, Andrey V. Elsukov wrote: > On 18.04.2013 15:37, Sreenivasa Honnur wrote: >> I have a ipv6 interface(ping6 to a remove ipv6 works) when I try to=20 >> bind to this address through a socket program "sobind" fails with=20 >> "49" as return value. If I give "saddr6.sin6_addr =3D in6addr_any;" >> sobind works. >> >> Any idea what could be going wrong here? >=20 > What value has the sysctl variable security.jail.jailed? Oh, of course, I mean, what do you have in td->td_ucred? -- WBR, Andrey V. Elsukov