Check IAID as well as CLID for lease identity.

This commit is contained in:
Simon Kelley
2013-01-14 21:35:05 +00:00
parent b1a1b6def5
commit 21bac1bccd

View File

@@ -575,9 +575,9 @@ static int dhcp6_no_relay(int msg_type, struct in6_addr *link_address, struct dh
inet_ntop(AF_INET6, &config->addr6, daemon->addrbuff, ADDRSTRLEN); inet_ntop(AF_INET6, &config->addr6, daemon->addrbuff, ADDRSTRLEN);
if (ltmp && ltmp->clid && if (ltmp && ltmp->clid &&
(ltmp->clid_len != clid_len || memcmp(ltmp->clid, clid, clid_len) != 0)) (ltmp->clid_len != clid_len || memcmp(ltmp->clid, clid, clid_len) != 0 || ltmp->hwaddr_type != iaid))
my_syslog(MS_DHCP | LOG_WARNING, _("not using configured address %s because it is leased to %s"), my_syslog(MS_DHCP | LOG_WARNING, _("not using configured address %s because it is leased to %s:%d"),
daemon->addrbuff, print_mac(daemon->namebuff, ltmp->clid, ltmp->clid_len)); daemon->addrbuff, print_mac(daemon->namebuff, ltmp->clid, ltmp->clid_len), lease->hwaddr_type);
else if (have_config(config, CONFIG_DECLINED) && else if (have_config(config, CONFIG_DECLINED) &&
difftime(now, config->decline_time) < (float)DECLINE_BACKOFF) difftime(now, config->decline_time) < (float)DECLINE_BACKOFF)
my_syslog(MS_DHCP | LOG_WARNING, _("not using configured address %s because it was previously declined"), my_syslog(MS_DHCP | LOG_WARNING, _("not using configured address %s because it was previously declined"),