From f7f740fe58fb838fc87e82dc7e1e2d4e5ccf085c Mon Sep 17 00:00:00 2001 From: Christian Franke Date: Thu, 24 Jan 2013 14:04:48 +0000 Subject: zebra: add ZEBRA_IFC_QUEUED to keep track of kernel state As there are timeframes when we don't get a notification from the kernel about new addresses. (e.g. while Linux performs IPv6 DAD), we need to have some information whether an address has been sent to the kernel or not. One case where this is relevant would be a user adding an IPv6 address, but deleting it before DAD has been complete. With the next patch which removes some (ill assuming) synchronous parts in address setup, ipv6_address_uninstall would not know whether or not it has to actually delete the prefix from the kernel. Resolving these windows where we lack information is what the flag ZEBRA_IFC_QUEUED is intended for. Signed-off-by: Christian Franke Signed-off-by: David Lamparter --- lib/if.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'lib/if.h') diff --git a/lib/if.h b/lib/if.h index 2116e12e..13cc254e 100644 --- a/lib/if.h +++ b/lib/if.h @@ -151,11 +151,16 @@ struct connected u_char conf; #define ZEBRA_IFC_REAL (1 << 0) #define ZEBRA_IFC_CONFIGURED (1 << 1) +#define ZEBRA_IFC_QUEUED (1 << 2) /* The ZEBRA_IFC_REAL flag should be set if and only if this address - exists in the kernel. + exists in the kernel and is actually usable. (A case where it exists but + is not yet usable would be IPv6 with DAD) The ZEBRA_IFC_CONFIGURED flag should be set if and only if this address was configured by the user from inside quagga. + The ZEBRA_IFC_QUEUED flag should be set if and only if the address exists + in the kernel. It may and should be set although the address might not be + usable yet. (compare with ZEBRA_IFC_REAL) */ /* Flags for connected address. */ -- cgit v1.2.1