diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2023-11-12 18:13:03 +0100 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2023-11-12 19:58:46 +0100 |
commit | 11cee6efbf54aeff25a6d106f6707ce822fa72d0 (patch) | |
tree | f9381f87b77fd16ff17815b244ac86eab8f63f60 /src/network/networkd-manager.c | |
parent | network/brvlan: make [BridgeVLAN] settings support an empty string (diff) | |
download | systemd-11cee6efbf54aeff25a6d106f6707ce822fa72d0.tar.xz systemd-11cee6efbf54aeff25a6d106f6707ce822fa72d0.zip |
network/brvlan: read bridge vlan IDs through netlink and save them
In this commit, obtained vlan IDs are not used, but they will be used in
the later commits.
Diffstat (limited to 'src/network/networkd-manager.c')
-rw-r--r-- | src/network/networkd-manager.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/network/networkd-manager.c b/src/network/networkd-manager.c index 1ca1d7abe5..bdf6088f2f 100644 --- a/src/network/networkd-manager.c +++ b/src/network/networkd-manager.c @@ -753,6 +753,20 @@ static int manager_enumerate_links(Manager *m) { if (r < 0) return r; + r = manager_enumerate_internal(m, m->rtnl, req, manager_rtnl_process_link); + if (r < 0) + return r; + + req = sd_netlink_message_unref(req); + + r = sd_rtnl_message_new_link(m->rtnl, &req, RTM_GETLINK, 0); + if (r < 0) + return r; + + r = sd_rtnl_message_link_set_family(req, AF_BRIDGE); + if (r < 0) + return r; + return manager_enumerate_internal(m, m->rtnl, req, manager_rtnl_process_link); } |