Update decline address handling in DHCPv6 for new multi-address world.

When dhcp-host options can have many IPv6 addresses, we need
to deal with one of them being declined by a client. The other
addresses are still valid.

It seems that this logic never worked, even with only one address, since
the DECLINED flag was never tested.
This commit is contained in:
Simon Kelley
2020-03-05 17:10:14 +00:00
parent e39c484ebd
commit c125c1dfee
2 changed files with 48 additions and 43 deletions

View File

@@ -384,10 +384,12 @@ struct ds_config {
#define ADDRLIST_REVONLY 4
#define ADDRLIST_PREFIX 8
#define ADDRLIST_WILDCARD 16
#define ADDRLIST_DECLINED 32
struct addrlist {
union all_addr addr;
int flags, prefixlen;
int flags, prefixlen;
time_t decline_time;
struct addrlist *next;
};