1
0
mirror of https://github.com/systemd/systemd.git synced 2024-10-30 06:25:37 +03:00

network: dhcp-server: do not create DHCPServer object when the DHCP server is running in relaying mode

Follow-up for c95df5879e.

Fixes #26196.
This commit is contained in:
Yu Watanabe 2023-01-30 18:55:10 +09:00 committed by Luca Boccassi
parent 1d84a3c779
commit 2cb1cabb41

View File

@ -858,7 +858,8 @@ int link_object_find(sd_bus *bus, const char *path, const char *interface, void
if (r < 0)
return 0;
if (streq(interface, "org.freedesktop.network1.DHCPServer") && !link->dhcp_server)
if (streq(interface, "org.freedesktop.network1.DHCPServer") &&
(!link->dhcp_server || sd_dhcp_server_is_in_relay_mode(link->dhcp_server)))
return 0;
*found = link;