network/ndisc: drop all configurations without lifetime on stop
As we call ndisc_drop_outdated() with USEC_INFINITY on stop.
This commit is contained in:
committed by
Luca Boccassi
parent
dc4eb788e6
commit
c75d119658
@@ -1469,7 +1469,7 @@ static int ndisc_drop_outdated(Link *link, usec_t timestamp_usec) {
|
||||
if (route->nexthop.ifindex != link->ifindex)
|
||||
continue;
|
||||
|
||||
if (route->lifetime_usec >= timestamp_usec)
|
||||
if (route->lifetime_usec > timestamp_usec)
|
||||
continue; /* the route is still valid */
|
||||
|
||||
r = route_remove_and_cancel(route, link->manager);
|
||||
@@ -1481,7 +1481,7 @@ static int ndisc_drop_outdated(Link *link, usec_t timestamp_usec) {
|
||||
if (address->source != NETWORK_CONFIG_SOURCE_NDISC)
|
||||
continue;
|
||||
|
||||
if (address->lifetime_valid_usec >= timestamp_usec)
|
||||
if (address->lifetime_valid_usec > timestamp_usec)
|
||||
continue; /* the address is still valid */
|
||||
|
||||
r = address_remove_and_cancel(address, link);
|
||||
@@ -1490,7 +1490,7 @@ static int ndisc_drop_outdated(Link *link, usec_t timestamp_usec) {
|
||||
}
|
||||
|
||||
SET_FOREACH(rdnss, link->ndisc_rdnss) {
|
||||
if (rdnss->lifetime_usec >= timestamp_usec)
|
||||
if (rdnss->lifetime_usec > timestamp_usec)
|
||||
continue; /* the DNS server is still valid */
|
||||
|
||||
free(set_remove(link->ndisc_rdnss, rdnss));
|
||||
@@ -1498,7 +1498,7 @@ static int ndisc_drop_outdated(Link *link, usec_t timestamp_usec) {
|
||||
}
|
||||
|
||||
SET_FOREACH(dnssl, link->ndisc_dnssl) {
|
||||
if (dnssl->lifetime_usec >= timestamp_usec)
|
||||
if (dnssl->lifetime_usec > timestamp_usec)
|
||||
continue; /* the DNS domain is still valid */
|
||||
|
||||
free(set_remove(link->ndisc_dnssl, dnssl));
|
||||
@@ -1506,7 +1506,7 @@ static int ndisc_drop_outdated(Link *link, usec_t timestamp_usec) {
|
||||
}
|
||||
|
||||
SET_FOREACH(cp, link->ndisc_captive_portals) {
|
||||
if (cp->lifetime_usec >= timestamp_usec)
|
||||
if (cp->lifetime_usec > timestamp_usec)
|
||||
continue; /* the captive portal is still valid */
|
||||
|
||||
ndisc_captive_portal_free(set_remove(link->ndisc_captive_portals, cp));
|
||||
@@ -1514,7 +1514,7 @@ static int ndisc_drop_outdated(Link *link, usec_t timestamp_usec) {
|
||||
}
|
||||
|
||||
SET_FOREACH(p64, link->ndisc_pref64) {
|
||||
if (p64->lifetime_usec >= timestamp_usec)
|
||||
if (p64->lifetime_usec > timestamp_usec)
|
||||
continue; /* the pref64 prefix is still valid */
|
||||
|
||||
free(set_remove(link->ndisc_pref64, p64));
|
||||
|
||||
Reference in New Issue
Block a user