Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-15-SP4:Update
wicked.33329
0001-addrconf-fix-fallback-lease-drop-bsc-12209...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0001-addrconf-fix-fallback-lease-drop-bsc-1220996.patch of Package wicked.33329
From 969a3ac88391667821f84a2fe11e21b8ded89745 Mon Sep 17 00:00:00 2001 From: Clemens Famulla-Conrad <cfamullaconrad@suse.de> Date: Thu, 14 Mar 2024 11:43:11 +0100 Subject: [PATCH 1/3] addrconf: fix fallback-lease drop (bsc#1220996) If the lease isn't known by the supplicant, we need to stop/cleanup local data-structures and notify listeners e.g. nanny. Signed-off-by: Marius Tomaschewski <mt@suse.com> --- src/dbus-objects/addrconf.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/dbus-objects/addrconf.c b/src/dbus-objects/addrconf.c index 993c939d8..d9de24674 100644 --- a/src/dbus-objects/addrconf.c +++ b/src/dbus-objects/addrconf.c @@ -1357,6 +1357,14 @@ ni_objectmodel_addrconf_fallback_release(ni_netdev_t *dev, unsigned int family) ni_debug_objectmodel("%s: no %s/%s lease", dev->name, ni_addrconf_type_to_name(forwarder->addrconf), ni_addrfamily_type_to_name(forwarder->addrfamily)); + + if (ni_addrconf_flag_bit_is_set(lease->flags, NI_ADDRCONF_FLAGS_FALLBACK)) { + /* bsc#1220996 - on fallback lease, it just wasn't triggered, + * so we need to change state and inform nanny that it's done. */ + lease->state = NI_ADDRCONF_STATE_REQUESTING; + ni_objectmodel_addrconf_send_event(dev, + NI_EVENT_ADDRESS_DEFERRED, &lease->uuid); + } rv = TRUE; break; default: -- 2.35.3 From 5b44baf4108a5ab8f279f89ade107e985cc756e8 Mon Sep 17 00:00:00 2001 From: Clemens Famulla-Conrad <cfamullaconrad@suse.de> Date: Thu, 14 Mar 2024 11:43:34 +0100 Subject: [PATCH 2/3] client: show lease fallback flag in ifstatus Signed-off-by: Marius Tomaschewski <mt@suse.com> --- client/ifstatus.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/client/ifstatus.c b/client/ifstatus.c index 5feb79d2b..51f5ba4ca 100644 --- a/client/ifstatus.c +++ b/client/ifstatus.c @@ -617,10 +617,14 @@ __show_leases_by_family(const ni_netdev_t *dev, ni_bool_t verbose, sa_family_t f ni_addrconf_type_to_name(lease->type), ni_addrconf_state_to_name(lease->state)); - if (verbose && lease->flags) { + if ((verbose && lease->flags) || + ni_addrconf_flag_bit_is_set(lease->flags, NI_ADDRCONF_FLAGS_FALLBACK)) { + ni_stringbuf_t tmp = NI_STRINGBUF_INIT_DYNAMIC; ni_stringbuf_puts(&buf, " ["); - ni_addrconf_flags_format(&buf, lease->flags, ","); + ni_addrconf_flags_format(&tmp, lease->flags, ","); + ni_stringbuf_puts(&buf, tmp.string); ni_stringbuf_puts(&buf, "]"); + ni_stringbuf_destroy(&tmp); } } if (buf.string) -- 2.35.3 From 5fb4a07e9c9cef1bd6922e2b5d2004b60a7d753b Mon Sep 17 00:00:00 2001 From: Clemens Famulla-Conrad <cfamullaconrad@suse.de> Date: Thu, 14 Mar 2024 11:43:34 +0100 Subject: [PATCH 3/3] client: fix ifstatus for fallback lease Signed-off-by: Marius Tomaschewski <mt@suse.com> --- client/ifstatus.c | 46 +++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 45 insertions(+), 1 deletion(-) diff --git a/client/ifstatus.c b/client/ifstatus.c index 51f5ba4ca..568de17bf 100644 --- a/client/ifstatus.c +++ b/client/ifstatus.c @@ -213,10 +213,44 @@ __ifstatus_of_device_lease(ni_netdev_t *dev, ni_addrconf_lease_t *lease, unsigne } } +static ni_addrconf_lease_t* +ifstatus_primary_lease(ni_netdev_t *dev, + ni_addrconf_lease_t *lease) +{ + ni_addrconf_lease_t *l; + + if (!ni_addrconf_flag_bit_is_set(lease->flags, NI_ADDRCONF_FLAGS_FALLBACK)) + return NULL; + + for (l = dev->leases; l; l = l->next) { + if (l->family != lease->family) + continue; + + if (!ni_addrconf_flag_bit_is_set(l->flags, NI_ADDRCONF_FLAGS_PRIMARY)) + continue; + + if (ni_log_level_at(NI_LOG_DEBUG1)) { + ni_stringbuf_t buf = NI_STRINGBUF_INIT_DYNAMIC; + + ni_addrconf_flags_format(&buf, l->flags, "|"); + ni_debug_application("%s: primary lease %s:%s, state=%s, flags=%s", + dev->name, + ni_addrfamily_type_to_name(l->family), + ni_addrconf_type_to_name(l->type), + ni_addrconf_state_to_name(l->state), + buf.string); + ni_stringbuf_destroy(&buf); + } + + return l; + } + return NULL; +} + static void __ifstatus_of_device_leases(ni_netdev_t *dev, unsigned int *st) { - ni_addrconf_lease_t *lease; + ni_addrconf_lease_t *lease, *primary; if (!dev || !st) return; @@ -241,6 +275,16 @@ __ifstatus_of_device_leases(ni_netdev_t *dev, unsigned int *st) NI_ADDRCONF_FLAGS_OPTIONAL)) continue; + /* Do not consider fallback lease status, if there is a + * corresponding primary+granted lease */ + if ((primary = ifstatus_primary_lease(dev, lease))) { + unsigned int tmp = NI_WICKED_ST_OK; + + __ifstatus_of_device_lease(dev, primary, &tmp); + if (tmp == NI_WICKED_ST_OK) + continue; + } + __ifstatus_of_device_lease(dev, lease, st); } } -- 2.35.3
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor