]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
network/bridge-vlan: allow to configure bridge vlan on stacked bridge master interface
authorYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 11 Jul 2025 03:58:33 +0000 (12:58 +0900)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Fri, 11 Jul 2025 06:59:28 +0000 (08:59 +0200)
Fixes #38157.

src/network/networkd-bridge-vlan.c

index e36374dad27d13d1f8d929285efe1188c7f2232f..eb2131c272fb5de302b0db7415c879784c48cf54 100644 (file)
@@ -245,8 +245,9 @@ int bridge_vlan_set_message(Link *link, sd_netlink_message *m, bool is_set) {
         if (r < 0)
                 return r;
 
-        if (link->master_ifindex <= 0) {
-                /* master needs BRIDGE_FLAGS_SELF flag */
+        if (link->master_ifindex <= 0 || streq(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);
                 if (r < 0)
                         return r;