From owner-freebsd-hackers@FreeBSD.ORG Fri Apr 19 18:17:53 2013 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 1756FE2E for ; Fri, 19 Apr 2013 18:17:53 +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 EC4BA105F 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 r3J4aYvu032495; Thu, 18 Apr 2013 21:36:34 -0700 Received: from corona.asicdesigners.com ([10.192.160.6]) by maui.asicdesigners.com with Microsoft SMTPSVC(6.0.3790.4675); Thu, 18 Apr 2013 21:36:33 -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; Thu, 18 Apr 2013 21:36:33 -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; Thu, 18 Apr 2013 21:36:33 -0700 From: Sreenivasa Honnur To: "Andrey V. Elsukov" Subject: RE: PV6 bind fails with 49 (#define EADDRNOTAVAIL 49 /* Can't assign requested address */) Thread-Topic: PV6 bind fails with 49 (#define EADDRNOTAVAIL 49 /* Can't assign requested address */) Thread-Index: AQHOPDvZutqyOvZawUK9KhABruxLHJjc8tlg Date: Fri, 19 Apr 2013 04:36:32 +0000 Message-ID: References: <516FF961.5070100@yandex.ru> <516FF9E1.5030303@yandex.ru> In-Reply-To: <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 04:36:33.0506 (UTC) FILETIME=[78491420:01CE3CB7] 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 cxgbe3 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]=20 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