[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: IPv6, tentative addresses, bind(), wheezy

On Sat, 2012-11-03 at 18:29 +0100, martin f krafft wrote:
> also sprach Ben Hutchings <ben@decadent.org.uk> [2012.11.03.1515 +0100]:
> > 	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.)
> Generally, one should not be able to bind() non-local sockets, don't
> you think?

Whyever not?  You can get a socket bound to a non-local address even
without this option, if the address is removed after you bind.  The
restriction to current local addresses is only a sanity check which may
or may not be useful.


Ben Hutchings
I'm always amazed by the number of people who take up solipsism because
they heard someone else explain it. - E*Borg on alt.fan.pratchett

Attachment: signature.asc
Description: This is a digitally signed message part

Reply to: