diff options
author | Umut Tezduyar Lindskog <umut.tezduyar@axis.com> | 2014-04-02 21:31:12 +0200 |
---|---|---|
committer | Tom Gundersen <teg@jklm.no> | 2014-04-03 16:00:25 +0200 |
commit | aba496a58acf9d9c61314de71353550e579f85ee (patch) | |
tree | e554123004bba327c3114539142047d4c124f40a /src/network/networkd.h | |
parent | 3e790eae01ce74f94a5233adeab12c64508916e0 (diff) |
networkd: smooth transition from ipv4ll to dhcp address
Currently when both ipv4ll and dhcp are enabled, ipv4ll
address (if one has been claimed) is removed when dhcp
address is aquired. This is not the best thing to do
since there might be clients unaware of the removal
trying to communicate.
This patch provides a smooth transition between ipv4ll
and dhcp. If ipv4ll address was claimed [1] before dhcp,
address is marked as deprecated. Deprecated address is still
a valid address and packets can be received on it but address
cannot be selected as a source address. If dhcp lease cannot
be extended, then ipv4ll address is marked as valid again.
[1] If there is no collision, claiming IPv4LL takes between 4 to
7 seconds.
Diffstat (limited to 'src/network/networkd.h')
-rw-r--r-- | src/network/networkd.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/network/networkd.h b/src/network/networkd.h index 8144031a99..36902e3c51 100644 --- a/src/network/networkd.h +++ b/src/network/networkd.h @@ -36,6 +36,8 @@ #include "set.h" #include "condition-util.h" +#define CACHE_INFO_INFINITY_LIFE_TIME 0xFFFFFFFFU + typedef struct NetDev NetDev; typedef struct Network Network; typedef struct Link Link; @@ -150,6 +152,7 @@ struct Address { char *label; struct in_addr broadcast; + struct ifa_cacheinfo cinfo; union { struct in_addr in; @@ -335,6 +338,7 @@ int address_new_static(Network *network, unsigned section, Address **ret); int address_new_dynamic(Address **ret); void address_free(Address *address); int address_configure(Address *address, Link *link, sd_rtnl_message_handler_t callback); +int address_update(Address *address, Link *link, sd_rtnl_message_handler_t callback); int address_drop(Address *address, Link *link, sd_rtnl_message_handler_t callback); DEFINE_TRIVIAL_CLEANUP_FUNC(Address*, address_free); |