PV6 bind fails with 49 (#define EADDRNOTAVAIL 49 /* Can't assign requested address */)

Sreenivasa Honnur shonnur at chelsio.com
Fri Apr 19 18:17:53 UTC 2013


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 and used it.

One more observation. Interface "cxgbe1" has a IPv6 interface and an IPv4 interface, print in ifa_ifwithaddr_internal () shows like below

ifp->xname:cxgbe1 ifp->dname:cxgbe
ifa->ifa_addr->sa_family:18 addr->sa_family:28 ==> this is for AF_LINK
ifa->ifa_addr->sa_family:2 addr->sa_family:28 ==> 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_internal () shows like below
ifp->xname:cxgbe3 ifp->dname:cxgbe
ifa->ifa_addr->sa_family:18 addr->sa_family:28 ==> for AF_LINK



roundhay# ifconfig cxgbe1
cxgbe1: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        options=6c07bb<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,JUMBO_MTU,VLAN_HWCSUM,TSO4,TSO6,LRO,VLAN_HWTSO,LINKSTATE,RXCSUM_IPV6,TXCSUM_IPV6>
        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=21<PERFORMNUD,AUTO_LINKLOCAL>
        media: Ethernet 10Gbase-SR <full-duplex>
        status: active
roundhay# iscsictl -S target=ALL
Failed to start Target iqn.2004-05.com.chelsio.target1
roundhay# ifconfig cxgbe3
cxgbe3: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500
        options=6c07bb<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,JUMBO_MTU,VLAN_HWCSUM,TSO4,TSO6,LRO,VLAN_HWTSO,LINKSTATE,RXCSUM_IPV6,TXCSUM_IPV6>
        ether 00:07:43:11:89:98
        nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
        media: Ethernet 10Gbase-SR <full-duplex>
        status: no carrier


-----Original Message-----
From: Andrey V. Elsukov [mailto:bu7cher at yandex.ru] 
Sent: Thursday, April 18, 2013 7:19 PM
To: Sreenivasa Honnur
Cc: freebsd-hackers at freebsd.org
Subject: Re: PV6 bind fails with 49 (#define EADDRNOTAVAIL 49 /* Can't assign 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 
>> bind to this address through a socket program "sobind" fails with 
>> "49" as return value. If I give "saddr6.sin6_addr =  in6addr_any;"
>> sobind works.
>>
>> Any idea what could be going wrong here?
> 
> 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


More information about the freebsd-hackers mailing list