❦ 3 novembre 2012 15:15 CET, Ben Hutchings <b...@decadent.org.uk> :
>> I can now disable DAD, or insert "sleep 10" at the top of >> /etc/init.d/unbound, but neither is an acceptable solution. >> >> IPv6 has been a release goal for years and we are about to release >> another Debian version that does not properly cater for IPv6. >> >> What can be done? > > int one = 1; > setsockopt(sock, IPPROTO_IP, IP_FREEBIND, &one, sizeof(one)); > bind(sock, ...); > > Or we set the net.ipv4.ip_nonlocal_bind sysctl globally, but this is > probably not a good idea. (Note that 'v4' there is not a typo; this > would actually affect both v4 and v6.) Are you sure? In [13]: import socket In [14]: s=socket.socket(socket.AF_INET6) In [15]: s.bind(("2001:db8::1", 8000)) --------------------------------------------------------------------------- error Traceback (most recent call last) <ipython-input-15-2f2d75ed2558> in <module>() ----> 1 s.bind(("2001:db8::1", 8000)) /usr/lib/python2.7/socket.pyc in meth(name, self, *args) 222 223 def meth(name,self,*args): --> 224 return getattr(self._sock,name)(*args) 225 226 for _m in _socketmethods: error: [Errno 99] Cannot assign requested address I have proposed a patch to make this works but it has been refused by David Miller since he thought that such a thing was a mistake in IPv4. http://permalink.gmane.org/gmane.linux.network/215497 http://www.spinics.net/lists/netdev/msg183235.html -- panic("CPU too expensive - making holiday in the ANDES!"); 2.2.16 /usr/src/linux/arch/mips/kernel/traps.c
pgpBAmQwTIe1U.pgp
Description: PGP signature