]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
network/bridge-vlan: fix segfault
authorYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 8 Aug 2025 10:39:28 +0000 (19:39 +0900)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Wed, 3 Sep 2025 10:10:48 +0000 (12:10 +0200)
Fixes a bug introduced by 78738adf88ad288a6af37a1998adc749ac6b5f2d.
Fixes #38515.

(cherry picked from commit 570210eb281f33e4c013cfdabc142838691aaa9f)

src/network/networkd-bridge-vlan.c

index 9cc3293951951d06767a40176809205651d6f614..a80792e1758cecbf5aa63720ea2817681afb1ea4 100644 (file)
@@ -246,7 +246,7 @@ int bridge_vlan_set_message(Link *link, sd_netlink_message *m, bool is_set) {
         if (r < 0)
                 return r;
 
-        if (link->master_ifindex <= 0 || streq(link->kind, "bridge")) {
+        if (link->master_ifindex <= 0 || streq_ptr(link->kind, "bridge")) {
                 /* If the setting is requested in a .network file for a bridge master (or a physical master)
                  * interface, then BRIDGE_FLAGS_SELF flag needs to be set. */
                 r = sd_netlink_message_append_u16(m, IFLA_BRIDGE_FLAGS, BRIDGE_FLAGS_SELF);