[PATCHES] CTDB: improved IPv6 support
David Holder
david.holder at erion.co.uk
Wed Dec 17 05:22:24 MST 2014
Hi Martin,
Re determining the interface:
In IPv6 the basic socket API and advanced socket API have support for
identifying interfaces by a unique integer. There are also supporting
functions for enumerating interfaces and converting to and from textual
names for the interfaces.
The functions are if_nametoindex(), if_indextoname(), if_nameindex() and
if_freenameindex() (see RFC3493 Section 4).
Specifying sending and receive interfaces is covered in RFC3542 Section
6.1 and 6.2.
Also I was wondering about the DAD issue. This can be turned off in the
kernel (an interface to this is exposed in /proc). Might this help? I
sometimes turn off DAD in situations where it can cause problems.
Don't know if this helps... (I didn't look at the code due serious
broadband issues here)
Best Regards,
David
------------------------------------------------------------------------
Dr David Holder CEng FIET MIEEE
Erion Ltd, An Cala, Inverkirkaig, Lochinver, Sutherland, IV27 4LR, UK
Reception: +44 (0)1422 207000
Direct Dial: +44 (0)131 2026317
http://www.erion.co.uk
Registered in England and Wales. Registered Number 3521142
Registered Office: Newtons, 49 Coniscliffe Road, Darlington, County
Durham, DL3 7EH, UK
VAT Number: GB 698 3633 78
On 04/12/2014 06:42, Martin Schwenke wrote:
> * Some functionality has moved from the daemon to the 10.interfaces
> eventscript and it now works with IPv6 addresses.
>
> For the past couple of years the release IP code in the daemon has
> depended on being able to determine which interface an IP address is
> on, rather than trusting vnn->interface. This was done to more
> reliably be able to remove rogue IP addresses (present due to
> either race conditions or addresses that have been moved by hand).
> This is not as easy for IPv6 addresses since the SIOCGIFCONF ioctl
> does not support IPv6.
>
> Therefore, this code has been removed and vnn->interface is now
> passed to the "releaseip" event, even when it is NULL (in which case
> "__none__" is passed). In all cases the eventscript now uses some "ip
> addr show to ..." magic to determine the actual interface and netmask
> for an IP address being released. If either of these differ from
> what was passed then a warning is logged, and the actual interface
> and netmask are used to delete the IP address.
More information about the samba-technical
mailing list