network/bridge-vlan: fix segfault

Fixes a bug introduced by 78738adf88.
Fixes #38515.
This commit is contained in:
Yu Watanabe
2025-08-08 19:39:28 +09:00
parent df75dd34f6
commit 570210eb28

View File

@@ -245,7 +245,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);