[ntp:questions] ipv6 support on linux - bind problem

Rishi Malik rishi.malik at quantum.com
Mon Apr 9 20:02:33 UTC 2007


Thanks for all the replies. I've hacked up ntpd/ntp_io.c a little bit.
Now, if it is going to try and bind to ipv6 address, it won't try ipv4.
In my limited testing thus far, this is working well. There's no check
in it right now, so it would screw things up on BSD, or any other system
that doesn't automatically bind to both. Because of this, I won't submit
a patch. If I find a define option that specifies the OS, I'll send a
patch in, if anyone thinks it's necessary. 

Thanks,

Rishi Malik

-----Original Message-----
From: questions-bounces+rishi.malik=quantum.com at lists.ntp.isc.org
[mailto:questions-bounces+rishi.malik=quantum.com at lists.ntp.isc.org] On
Behalf Of Uwe Klein
Sent: Monday, April 09, 2007 10:19 AM
To: questions at lists.ntp.isc.org
Subject: Re: [ntp:questions] ipv6 support on linux - bind problem

Wolfgang S. Rupprecht wrote:
> Uwe Klein <uwe_klein_habertwedt at t-online.de> writes:
> 
>>does this look any different when you do a :
>>
>>	setsockopt(sock, SOL_SOCKET, SO_REUSEADDR,.....
>>
>>before any binding to that local port?
> 
> 
> That is a good question, but no it doesn't seem to help.
> 
> I always have those REUSEADDR lines in all my personal code and it
> didn't help here.  REUSEADDR seems to only help when you restart the
> daemon and the old socket still has connections in timed waits.  (I
> suppose that means it only does anything for TCP, which is where I was
> introduced to the problem.)
you need it if you have more than one multicast App on the same host.
with REUSEADDR all incoming (multicast) packets are muxed to all apps
listening on that port(
( I use that for distributed, restartable and migratable stuff)
> 
> Thinking about it from a different angle, I don't see how the kernel
> could ever allow two wildcard binds on the same address and port.  For
> incoming packets, it would have no way to tell which of the two
> sockets to send a packet to.  If subsequent packets when to different
> ports then the reassembly of multi-packet messages would be impossible
> without lots of retransmissions.  It would look like a 50% packet loss
> rate, which is effectively unusable.
Unusable for TCP but for UDP you would mux all packets to all listeners.
> 
> -wolfgang

uwe

_______________________________________________
questions mailing list
questions at lists.ntp.isc.org
https://lists.ntp.isc.org/mailman/listinfo/questions

------------------------------------------------------------
The information contained in this transmission is 
confidential.  It is intended solely for the use of the 
individual(s) or organization(s) to whom it is addressed.  
Any disclosure, copying, or further distribution is not 
permitted unless such privilege is explicitly granted in 
writing by Quantum Corporation.  Furthermore, Quantum 
Corporation is not responsible for the proper and complete 
transmission of the substance of this communication or for
any delay in its receipt.
------------------------------------------------------------



More information about the questions mailing list