Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package wicked for openSUSE:Factory checked 
in at 2024-02-04 19:06:40
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/wicked (Old)
 and      /work/SRC/openSUSE:Factory/.wicked.new.1815 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "wicked"

Sun Feb  4 19:06:40 2024 rev:96 rq:1143605 version:0.6.73

Changes:
--------
--- /work/SRC/openSUSE:Factory/wicked/wicked.changes    2023-07-06 
18:28:01.178905123 +0200
+++ /work/SRC/openSUSE:Factory/.wicked.new.1815/wicked.changes  2024-02-04 
19:06:46.059346243 +0100
@@ -1,0 +2,24 @@
+Thu Feb  1 08:58:28 UTC 2024 - Clemens Famulla-Conrad <cfamullacon...@suse.com>
+
+- ifreload: VLAN changes require device deletion (bsc#1218927) 
+  [+ 0009-ifreload-VLAN-changes-require-device-deletion-bsc-12.patch]
+- ifcheck: fix config changed check (bsc#1218926)
+  [+ 0008-ifcheck-fix-config-changed-check-bsc-1218926.patch]
+- client: fix exit code for no-carrier status (bsc#1219265)
+  [+ 0007-Fix-ifstatus-exit-code-for-NI_WICKED_ST_NO_CARRIER-s.patch]
+- dhcp6: omit the SO_REUSEPORT option (bsc#1215692)
+  [+ 0006-dhcp6-omit-the-SO_REUSEPORT-option-bsc-1215692.patch]
+- duid: fix comment for v6time
+  (https://github.com/openSUSE/wicked/pull/989)
+  [+ 0005-duid-fix-comment-for-v6time.patch]
+- rtnl: fix peer address parsing for non ptp-interfaces
+  (https://github.com/openSUSE/wicked/pull/987,
+  https://github.com/openSUSE/wicked/pull/988)
+  [+ 0003-rtnl-pass-ifname-in-newaddr-parsing-and-logging.patch]
+  [+ 0004-rtnl-parse-peer-address-on-non-ptp-interfaces.patch]
+- system-updater: Parse updater format from XML configuration to 
+  ensure install calls can run. 
+  (https://github.com/openSUSE/wicked/pull/985)
+  [+ 0002-system-updater-Parse-updater-format-from-XML-configu.patch]
+
+-------------------------------------------------------------------

New:
----
  0002-system-updater-Parse-updater-format-from-XML-configu.patch
  0003-rtnl-pass-ifname-in-newaddr-parsing-and-logging.patch
  0004-rtnl-parse-peer-address-on-non-ptp-interfaces.patch
  0005-duid-fix-comment-for-v6time.patch
  0006-dhcp6-omit-the-SO_REUSEPORT-option-bsc-1215692.patch
  0007-Fix-ifstatus-exit-code-for-NI_WICKED_ST_NO_CARRIER-s.patch
  0008-ifcheck-fix-config-changed-check-bsc-1218926.patch
  0009-ifreload-VLAN-changes-require-device-deletion-bsc-12.patch

BETA DEBUG BEGIN:
  New:  (https://github.com/openSUSE/wicked/pull/985)
  [+ 0002-system-updater-Parse-updater-format-from-XML-configu.patch]
  New:  https://github.com/openSUSE/wicked/pull/988)
  [+ 0003-rtnl-pass-ifname-in-newaddr-parsing-and-logging.patch]
  [+ 0004-rtnl-parse-peer-address-on-non-ptp-interfaces.patch]
  New:  [+ 0003-rtnl-pass-ifname-in-newaddr-parsing-and-logging.patch]
  [+ 0004-rtnl-parse-peer-address-on-non-ptp-interfaces.patch]
- system-updater: Parse updater format from XML configuration to 
  New:  (https://github.com/openSUSE/wicked/pull/989)
  [+ 0005-duid-fix-comment-for-v6time.patch]
- rtnl: fix peer address parsing for non ptp-interfaces
  New:- dhcp6: omit the SO_REUSEPORT option (bsc#1215692)
  [+ 0006-dhcp6-omit-the-SO_REUSEPORT-option-bsc-1215692.patch]
- duid: fix comment for v6time
  New:- client: fix exit code for no-carrier status (bsc#1219265)
  [+ 0007-Fix-ifstatus-exit-code-for-NI_WICKED_ST_NO_CARRIER-s.patch]
- dhcp6: omit the SO_REUSEPORT option (bsc#1215692)
  New:- ifcheck: fix config changed check (bsc#1218926)
  [+ 0008-ifcheck-fix-config-changed-check-bsc-1218926.patch]
- client: fix exit code for no-carrier status (bsc#1219265)
  New:- ifreload: VLAN changes require device deletion (bsc#1218927) 
  [+ 0009-ifreload-VLAN-changes-require-device-deletion-bsc-12.patch]
- ifcheck: fix config changed check (bsc#1218926)
BETA DEBUG END:

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ wicked.spec ++++++
--- /var/tmp/diff_new_pack.edz4xM/_old  2024-02-04 19:06:47.203387468 +0100
+++ /var/tmp/diff_new_pack.edz4xM/_new  2024-02-04 19:06:47.207387612 +0100
@@ -27,6 +27,14 @@
 Source0:        %{name}-%{version}.tar.bz2
 Source1:        wicked-rpmlintrc
 Patch1:         0001-fix_arp_notify_loop_and_burst_sending.patch
+Patch2:         0002-system-updater-Parse-updater-format-from-XML-configu.patch
+Patch3:         0003-rtnl-pass-ifname-in-newaddr-parsing-and-logging.patch
+Patch4:         0004-rtnl-parse-peer-address-on-non-ptp-interfaces.patch
+Patch5:         0005-duid-fix-comment-for-v6time.patch
+Patch6:         0006-dhcp6-omit-the-SO_REUSEPORT-option-bsc-1215692.patch
+Patch7:         0007-Fix-ifstatus-exit-code-for-NI_WICKED_ST_NO_CARRIER-s.patch
+Patch8:         0008-ifcheck-fix-config-changed-check-bsc-1218926.patch
+Patch9:         0009-ifreload-VLAN-changes-require-device-deletion-bsc-12.patch
 #
 # Upstream First - openSUSE Build Service Policy:
 #
@@ -168,7 +176,7 @@
 
 %prep
 %setup
-%patch1 -p1
+%autopatch -p1
 
 %build
 test -x ./configure || autoreconf --force --install

++++++ 0002-system-updater-Parse-updater-format-from-XML-configu.patch ++++++
>From ebb3e0d38a501d15956c1b9fa270df1dbc03b8e4 Mon Sep 17 00:00:00 2001
From: Stephan Brunner <s.brun...@stephan-brunner.net>
Date: Mon, 9 Oct 2023 10:55:33 +0200
Subject: [PATCH 1/8] system-updater: Parse updater format from XML
 configuration to ensure install calls can run.
Reference: gh#openSUSE/wicked#985 
Upstream: submitted

In ni_system_updaters_init(), the updater's format is set by using 
ni_updater_format_type(ex->format).
This in turn is used by ni_system_updater_generic_leaseinfo_create(), which is 
called by ni_system_updater_generic_install_call().
As ex->format is never actually set, ni_system_updater_generic_leaseinfo_create 
will always fail with an unknown format error and the install call is never 
executed.
---
 src/appconfig.c | 12 ++++++++++++
 src/extension.c |  1 +
 2 files changed, 13 insertions(+)

diff --git a/src/appconfig.c b/src/appconfig.c
index 82afb403..53d82ba5 100644
--- a/src/appconfig.c
+++ b/src/appconfig.c
@@ -2025,6 +2025,7 @@ ni_config_parse_system_updater(ni_extension_t **list, 
xml_node_t *node)
 {
        ni_extension_t *ex, *old;
        const char *name;
+       const char *format;
 
        ni_assert(list && node);
 
@@ -2047,6 +2048,17 @@ ni_config_parse_system_updater(ni_extension_t **list, 
xml_node_t *node)
                return FALSE;
        }
 
+       format = xml_node_get_attr(node, "format");
+       if (format) {
+               ex->format = strdup(format);
+
+               if (!ex->format) {
+                       ni_warn("[%s] failed to allocate memory for 
format-string", node->name);
+                       ni_extension_free(ex);
+                       return FALSE;
+               }
+       }
+
        if (ex->c_bindings) {
                ni_warn("[%s] builtin actions not supported in %s extensions",
                                xml_node_location(node), node->name);
diff --git a/src/extension.c b/src/extension.c
index 4f075e20..bf23d0c0 100644
--- a/src/extension.c
+++ b/src/extension.c
@@ -199,6 +199,7 @@ ni_extension_free(ni_extension_t *ex)
        if (ex) {
                ni_string_free(&ex->name);
                ni_string_free(&ex->interface);
+               ni_string_free(&ex->format);
 
                ni_script_action_list_destroy(&ex->actions);
                ni_c_binding_list_destroy(&ex->c_bindings);
-- 
2.35.3


++++++ 0003-rtnl-pass-ifname-in-newaddr-parsing-and-logging.patch ++++++
>From 8836bc49c657f122267b8f0135d8733225ca8c78 Mon Sep 17 00:00:00 2001
From: Marius Tomaschewski <m...@suse.com>
Date: Mon, 16 Oct 2023 16:01:45 +0200
Subject: [PATCH 2/8] rtnl: pass ifname in newaddr parsing and logging
References: gh#openSUSE/wicked#987
Upstream: submitted

---
 src/ifevent.c |  2 +-
 src/iflist.c  | 27 ++++++++++++++-------------
 src/kernel.h  |  3 ++-
 3 files changed, 17 insertions(+), 15 deletions(-)

diff --git a/src/ifevent.c b/src/ifevent.c
index c3dec822..c15d42af 100644
--- a/src/ifevent.c
+++ b/src/ifevent.c
@@ -512,7 +512,7 @@ __ni_rtevent_deladdr(ni_netconfig_t *nc, const struct 
sockaddr_nl *nladdr, struc
        if (dev == NULL)
                return 0;
 
-       if (__ni_rtnl_parse_newaddr(dev->link.ifflags, h, ifa, &tmp) < 0) {
+       if (__ni_rtnl_parse_newaddr(dev->name, dev->link.ifflags, h, ifa, &tmp) 
< 0) {
                ni_error("Problem parsing %s message for %s", dev->name,
                                ni_rtnl_msg_type_to_name(h->nlmsg_type, NULL));
                return -1;
diff --git a/src/iflist.c b/src/iflist.c
index 217f8740..e18d8a04 100644
--- a/src/iflist.c
+++ b/src/iflist.c
@@ -2810,16 +2810,16 @@ __ni_rtnl_parse_newprefix(const char *ifname, struct 
nlmsghdr *h, struct prefixm
 }
 
 static inline void
-__newaddr_trace(unsigned int family, const char *name, struct nlattr *attr)
+__newaddr_trace(const char *ifname, unsigned int family, const char *name, 
struct nlattr *attr)
 {
        ni_sockaddr_t temp;
        if (attr && name) {
                if (__ni_nla_get_addr(family, &temp, attr))
-                       ni_trace("newaddr[%s]: ---", name);
+                       ni_trace("%s: newaddr[%s]: ---", ifname, name);
                else
-                       ni_trace("newaddr[%s]: %s", name, 
ni_sockaddr_print(&temp));
+                       ni_trace("%s: newaddr[%s]: %s", ifname, name, 
ni_sockaddr_print(&temp));
        } else if(name) {
-               ni_trace("newaddr[%s]: NULL", name);
+               ni_trace("%s: newaddr[%s]: NULL", ifname, name);
        }
 }
 
@@ -2827,13 +2827,14 @@ __newaddr_trace(unsigned int family, const char *name, 
struct nlattr *attr)
  * Update interface address list given a RTM_NEWADDR message
  */
 int
-__ni_rtnl_parse_newaddr(unsigned ifflags, struct nlmsghdr *h, struct ifaddrmsg 
*ifa, ni_address_t *ap)
+__ni_rtnl_parse_newaddr(const char *ifname, unsigned int ifflags, struct 
nlmsghdr *h,
+               struct ifaddrmsg *ifa, ni_address_t *ap)
 {
        struct nlattr *tb[IFA_MAX+1];
 
        memset(tb, 0, sizeof(tb));
        if (nlmsg_parse(h, sizeof(*ifa), tb, IFA_MAX, NULL) < 0) {
-               ni_error("unable to parse rtnl ADDR message");
+               ni_error("%s: unable to parse rtnl ADDR message", ifname);
                return -1;
        }
 
@@ -2847,13 +2848,13 @@ __ni_rtnl_parse_newaddr(unsigned ifflags, struct 
nlmsghdr *h, struct ifaddrmsg *
                ap->flags = ifa->ifa_flags;
 
        if (ni_log_level_at(NI_LOG_DEBUG3) && 
(ni_log_facility(NI_TRACE_EVENTS))) {
-               ni_trace("newaddr(%s): family %d, prefixlen %u, scope %u, flags 
%u",
-                       (ifflags & NI_IFF_POINT_TO_POINT) ? "ptp" : "brd",
+               ni_trace("%s: newaddr(%s): family %d, prefixlen %u, scope %u, 
flags %u",
+                       ifname, (ifflags & NI_IFF_POINT_TO_POINT) ? "ptp" : 
"brd",
                        ap->family, ap->prefixlen, ap->scope, ap->flags);
-               __newaddr_trace(ifa->ifa_family, __ni_string(IFA_LOCAL), 
tb[IFA_LOCAL]);
-               __newaddr_trace(ifa->ifa_family, __ni_string(IFA_ADDRESS), 
tb[IFA_ADDRESS]);
-               __newaddr_trace(ifa->ifa_family, __ni_string(IFA_BROADCAST), 
tb[IFA_BROADCAST]);
-               __newaddr_trace(ifa->ifa_family, __ni_string(IFA_ANYCAST), 
tb[IFA_ANYCAST]);
+               __newaddr_trace(ifname, ifa->ifa_family, 
__ni_string(IFA_LOCAL), tb[IFA_LOCAL]);
+               __newaddr_trace(ifname, ifa->ifa_family, 
__ni_string(IFA_ADDRESS), tb[IFA_ADDRESS]);
+               __newaddr_trace(ifname, ifa->ifa_family, 
__ni_string(IFA_BROADCAST), tb[IFA_BROADCAST]);
+               __newaddr_trace(ifname, ifa->ifa_family, 
__ni_string(IFA_ANYCAST), tb[IFA_ANYCAST]);
        }
 
        /*
@@ -2907,7 +2908,7 @@ __ni_netdev_process_newaddr_event(ni_netdev_t *dev, 
struct nlmsghdr *h, struct i
 {
        ni_address_t tmp, *ap;
 
-       if (__ni_rtnl_parse_newaddr(dev->link.ifflags, h, ifa, &tmp) < 0)
+       if (__ni_rtnl_parse_newaddr(dev->name, dev->link.ifflags, h, ifa, &tmp) 
< 0)
                return -1;
 
        ap = ni_address_list_find(dev->addrs, &tmp.local_addr);
diff --git a/src/kernel.h b/src/kernel.h
index 620ab840..f883dff6 100644
--- a/src/kernel.h
+++ b/src/kernel.h
@@ -120,7 +120,8 @@ extern ni_bool_t    ni_rtnl_route_filter_msg(struct rtmsg 
*);
 extern int     ni_rtnl_route_parse_msg(struct nlmsghdr *, struct rtmsg *, 
ni_route_t *);
 extern int     ni_rtnl_rule_parse_msg(struct nlmsghdr *, struct fib_rule_hdr 
*, ni_rule_t *);
 
-extern int     __ni_rtnl_parse_newaddr(unsigned, struct nlmsghdr *, struct 
ifaddrmsg *, ni_address_t *);
+extern int     __ni_rtnl_parse_newaddr(const char *, unsigned int, struct 
nlmsghdr *,
+                               struct ifaddrmsg *, ni_address_t *);
 extern int     __ni_rtnl_parse_newprefix(const char *, struct nlmsghdr *, 
struct prefixmsg *, ni_ipv6_ra_pinfo_t *);
 
 extern int     __ni_netdev_process_newlink(ni_netdev_t *, struct nlmsghdr *, 
struct ifinfomsg *, ni_netconfig_t *);
-- 
2.35.3


++++++ 0004-rtnl-parse-peer-address-on-non-ptp-interfaces.patch ++++++
>From d3fa3575fe00c901ff85aa56f03237859f2c0061 Mon Sep 17 00:00:00 2001
From: Marius Tomaschewski <m...@suse.com>
Date: Mon, 16 Oct 2023 16:01:53 +0200
Subject: [PATCH 3/8] rtnl: parse peer address on non-ptp interfaces
References: gh#openSUSE/wicked#988
Upstream: submitted

---
 src/iflist.c | 32 +++++++++++++++-----------------
 1 file changed, 15 insertions(+), 17 deletions(-)

diff --git a/src/iflist.c b/src/iflist.c
index e18d8a04..d2ba6310 100644
--- a/src/iflist.c
+++ b/src/iflist.c
@@ -2863,27 +2863,25 @@ __ni_rtnl_parse_newaddr(const char *ifname, unsigned 
int ifflags, struct nlmsghd
         * It makes no difference for normally configured broadcast interfaces,
         * but for point-to-point IFA_ADDRESS is DESTINATION address,
         * local address is supplied in IFA_LOCAL attribute.
+        *
+        * In a peer setup (regardless if ptp interface or brd):
+        * - local is IFA_LOCAL, peer is IFA_ADDRESS (IFA_BROADCAST is NULL).
+        * Otherwise (without peer):
+        * - in IPv6: IFA_LOCAL is NULL and address in IFA_ADDRESS
+        * - in IPv4: address in IFA_LOCAL and in IFA_ADDRESS (equal),
+        *   IFA_BROADCAST is NULL unless it was explicitly specified
+        *   ("ip addr add 192.168.0.1/24 dev eth0" doesn't set it).
         */
-       if (ifflags & NI_IFF_POINT_TO_POINT) {
-               if (tb[IFA_LOCAL]) {
-                       /* local peer remote */
-                       __ni_nla_get_addr(ifa->ifa_family, &ap->local_addr, 
tb[IFA_LOCAL]);
-                       __ni_nla_get_addr(ifa->ifa_family, &ap->peer_addr, 
tb[IFA_ADDRESS]);
-               } else
-               if (tb[IFA_ADDRESS]) {
-                       /* local only, e.g. tunnel ipv6 link layer address */
-                       __ni_nla_get_addr(ifa->ifa_family, &ap->local_addr, 
tb[IFA_ADDRESS]);
-               }
-               /* Note iproute2 code obtains peer_addr from IFA_BROADCAST */
-               /* When I read and remember it correctly, iproute2 is using:
-                *   !tb[IFA_BROADCAST] && tb[IFA_LOCAL] && tb[IFA_ADDRESS]
-                * instead of the p-t-p flag ...
-                */
+       if (tb[IFA_LOCAL]) {
+               __ni_nla_get_addr(ifa->ifa_family, &ap->local_addr, 
tb[IFA_LOCAL]);
+               __ni_nla_get_addr(ifa->ifa_family, &ap->peer_addr, 
tb[IFA_ADDRESS]);
+               if (ni_sockaddr_equal(&ap->local_addr, &ap->peer_addr))
+                       memset(&ap->peer_addr, 0, sizeof(ap->peer_addr));
        } else {
                __ni_nla_get_addr(ifa->ifa_family, &ap->local_addr, 
tb[IFA_ADDRESS]);
-               if (tb[IFA_BROADCAST])
-                       __ni_nla_get_addr(ifa->ifa_family, &ap->bcast_addr, 
tb[IFA_BROADCAST]);
        }
+
+       __ni_nla_get_addr(ifa->ifa_family, &ap->bcast_addr, tb[IFA_BROADCAST]);
        __ni_nla_get_addr(ifa->ifa_family, &ap->anycast_addr, tb[IFA_ANYCAST]);
 
        if (tb[IFA_CACHEINFO]) {
-- 
2.35.3


++++++ 0005-duid-fix-comment-for-v6time.patch ++++++
>From ab82f5e54367815545dcab26b419acd9e0b9d431 Mon Sep 17 00:00:00 2001
From: Mike Lamb <m...@bytesbymike.com>
Date: Wed, 1 Nov 2023 14:31:25 -0400
Subject: [PATCH 4/8] duid: fix comment for v6time
References: gh#openSUSE/wicked#989
Upstream: submitted

v6time is seconds since midnight (UTC), January 1, 2000, modulo 2^32. The value 
is generated correctly but the comment refers to 2001 instead of 2000.
---
 src/duid.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/duid.h b/src/duid.h
index dbfd1b29..756d7cef 100644
--- a/src/duid.h
+++ b/src/duid.h
@@ -75,7 +75,7 @@
 typedef struct ni_duid_llt {
        uint16_t                type;           /* type 1                     */
        uint16_t                hwtype;         /* link layer address type    */
-       uint32_t                v6time;         /* second since 2001 % 2^32   */
+       uint32_t                v6time;         /* second since 2000 % 2^32   */
        unsigned char           hwaddr[];       /* link layer address         */
 } NI_PACKED ni_duid_llt_t;
 
-- 
2.35.3


++++++ 0006-dhcp6-omit-the-SO_REUSEPORT-option-bsc-1215692.patch ++++++
>From 995c21c29dbe33995aacb5f37463016047015bfc Mon Sep 17 00:00:00 2001
From: Marius Tomaschewski <m...@suse.com>
Date: Thu, 2 Nov 2023 17:06:01 +0100
Subject: [PATCH 5/8] dhcp6: omit the SO_REUSEPORT option (bsc#1215692)
References: bsc#1215692
Upstream: submitted

Setting the SO_REUSEPORT socket option causes that replies are
delivered to the first process/socket bound to an [ip%dev]:port
with the effect that `wicked test dhcp6 ...` does not receive
it's replies, but the wickedd-dhcp6 (service) active on the
same interface (bsc#1215692).
---
 src/dhcp6/protocol.c | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/src/dhcp6/protocol.c b/src/dhcp6/protocol.c
index 5eb8d55b..b0955f39 100644
--- a/src/dhcp6/protocol.c
+++ b/src/dhcp6/protocol.c
@@ -89,7 +89,7 @@ static int    ni_dhcp6_option_get_duid(ni_buffer_t *bp, 
ni_opaque_t *duid);
  *
  */
 static int
-__ni_dhcp6_mcast_socket_open(const struct ni_dhcp6_link *link, const char 
*ifname)
+ni_dhcp6_link_mcast_socket_open(const struct ni_dhcp6_link *link, const char 
*ifname)
 {
        ni_sockaddr_t saddr;
        int fd, on;
@@ -119,10 +119,7 @@ __ni_dhcp6_mcast_socket_open(const struct ni_dhcp6_link 
*link, const char *ifnam
        on = 1;
        if (setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &on, sizeof(on)) == -1)
                ni_error("%s: Cannot set setsockopt(SO_REUSEADDR): %m", ifname);
-#if defined(SO_REUSEPORT)
-       if (setsockopt(fd, SOL_SOCKET, SO_REUSEPORT, &on, sizeof(on)) == -1)
-               ni_error("%s: Cannot set setsockopt(SO_REUSEPORT): %m", ifname);
-#endif
+
        if (setsockopt(fd, SOL_SOCKET, SO_RCVBUF, &on, sizeof(on)) == -1)
                ni_error("%s: Cannot set setsockopt(SO_RCVBUF): %m", ifname);
 
@@ -199,7 +196,7 @@ ni_dhcp6_mcast_socket_open(ni_dhcp6_device_t *dev)
        dev->mcast.dest.six.sin6_scope_id = dev->link.ifindex;
 
        /* open the socket an bind to the link-local address */
-       if ((fd = __ni_dhcp6_mcast_socket_open(&dev->link, dev->ifname)) == -1)
+       if ((fd = ni_dhcp6_link_mcast_socket_open(&dev->link, dev->ifname)) == 
-1)
                return -1;
 
        /* finally wrap it and allocate receive buffer */
-- 
2.35.3


++++++ 0007-Fix-ifstatus-exit-code-for-NI_WICKED_ST_NO_CARRIER-s.patch ++++++
>From cdbb4c573e41c5c9c4bf119bfe08776522d99e97 Mon Sep 17 00:00:00 2001
From: liss <coder.l...@gmail.com>
Date: Thu, 25 Jan 2024 11:52:54 +0800
Subject: [PATCH 6/8] Fix ifstatus exit code for NI_WICKED_ST_NO_CARRIER status
References: bsc#1219265
Upstream: submitted

The 'no-carrier' status was separated from the 'setup-in-progress'
status. Even though the interface appears active during this status, the
setup process is not complete and the NIC is not ready. Therefore, the
`ifstatus <nic>` command should not return 0 for this status.
---
 client/ifstatus.c           | 2 ++
 client/suse/scripts/ifup.in | 3 +++
 2 files changed, 5 insertions(+)

diff --git a/client/ifstatus.c b/client/ifstatus.c
index ab0b5685..5feb79d2 100644
--- a/client/ifstatus.c
+++ b/client/ifstatus.c
@@ -884,6 +884,7 @@ ni_do_ifstatus(int argc, char **argv)
                        case NI_WICKED_ST_UNCONFIGURED:
                        case NI_WICKED_ST_NOT_RUNNING:
                        case NI_WICKED_ST_IN_PROGRESS:
+                       case NI_WICKED_ST_NO_CARRIER:
                                break;
                        default:
                                status = NI_WICKED_ST_OK;
@@ -1000,6 +1001,7 @@ ni_ifstatus_display_result(ni_fsm_t *fsm, 
ni_string_array_t *names, ni_ifworker_
                        case NI_WICKED_ST_UNCONFIGURED:
                        case NI_WICKED_ST_NOT_RUNNING:
                        case NI_WICKED_ST_IN_PROGRESS:
+                       case NI_WICKED_ST_NO_CARRIER:
                                break;
                        default:
                                status = NI_WICKED_ST_OK;
diff --git a/client/suse/scripts/ifup.in b/client/suse/scripts/ifup.in
index 49c46c07..9f90591f 100644
--- a/client/suse/scripts/ifup.in
+++ b/client/suse/scripts/ifup.in
@@ -226,6 +226,9 @@ rc_map_status()
        166)    # NI_WICKED_ST_PERSISTENT_ON
                return $R_NOTALLOWED
        ;;
+       168)    # NI_WICKED_ST_NO_CARRIER
+               return $R_DHCP_BG
+       ;;
        *)      # any other
                return ${1:-1}
        ;;
-- 
2.35.3


++++++ 0008-ifcheck-fix-config-changed-check-bsc-1218926.patch ++++++
>From 96c62c7585b9bfae034b5b58d31824e66b0eaec1 Mon Sep 17 00:00:00 2001
From: Clemens Famulla-Conrad <cfamullacon...@suse.de>
Date: Tue, 30 Jan 2024 15:07:39 +0100
Subject: [PATCH 7/8] ifcheck: fix config changed check (bsc#1218926)
References: bsc#1218926
Upstream: submitted

---
 client/ifcheck.c | 23 ++++++++++++-----------
 1 file changed, 12 insertions(+), 11 deletions(-)

diff --git a/client/ifcheck.c b/client/ifcheck.c
index 28c8a3d2..e06c4ba1 100644
--- a/client/ifcheck.c
+++ b/client/ifcheck.c
@@ -305,6 +305,18 @@ ni_do_ifcheck(int argc, char **argv)
                goto usage;
        }
 
+       if (!ni_fsm_create_client(fsm)) {
+               /* Severe error we always explicitly return */
+               status = NI_WICKED_RC_ERROR;
+               goto cleanup;
+       }
+
+       if (!ni_fsm_refresh_state(fsm)) {
+               /* Severe error we always explicitly return */
+               status = NI_WICKED_RC_ERROR;
+               goto cleanup;
+       }
+
        if (opt_ifconfig.count == 0) {
                const ni_string_array_t *sources = 
ni_config_sources("ifconfig");
 
@@ -323,17 +335,6 @@ ni_do_ifcheck(int argc, char **argv)
                goto cleanup;
        }
 
-       if (!ni_fsm_create_client(fsm)) {
-               /* Severe error we always explicitly return */
-               status = NI_WICKED_RC_ERROR;
-               goto cleanup;
-       }
-
-       if (!ni_fsm_refresh_state(fsm)) {
-               /* Severe error we always explicitly return */
-               status = NI_WICKED_RC_ERROR;
-               goto cleanup;
-       }
 
        status = NI_WICKED_ST_OK;
 
-- 
2.35.3


++++++ 0009-ifreload-VLAN-changes-require-device-deletion-bsc-12.patch ++++++
>From fea2c7b13f4d102608fe214a3d53b083d6eecf98 Mon Sep 17 00:00:00 2001
From: Clemens Famulla-Conrad <cfamullacon...@suse.de>
Date: Tue, 30 Jan 2024 18:27:15 +0100
Subject: [PATCH 8/8] ifreload: VLAN changes require device deletion
References: bsc#1218927
Upstream: submitted

---
 client/ifreload.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/client/ifreload.c b/client/ifreload.c
index abe7a38d..8786cb3b 100644
--- a/client/ifreload.c
+++ b/client/ifreload.c
@@ -109,8 +109,10 @@ ifreload_mark_down(const ni_fsm_t *fsm, 
ni_ifworker_array_t *marked, ni_ifworker
                w->target_range.max = NI_FSM_STATE_DEVICE_READY;
 
                /* the config has been modified, but some changes require 
deletion */
-               if (w->iftype == NI_IFTYPE_TEAM) {
-                       /* e.g. the team runner (mode) changes require teamd 
restart */
+               if (w->iftype == NI_IFTYPE_TEAM || w->iftype == NI_IFTYPE_VLAN) 
{
+                       /* examples:
+                        *   - the team runner (mode) changes require teamd 
restart
+                        *   - VlanID changed, the interface need to be 
recreated */
                        w->target_range.max = NI_FSM_STATE_DEVICE_DOWN;
                } else
                if (w->iftype != NI_IFTYPE_UNKNOWN) {
-- 
2.35.3

Reply via email to