summaryrefslogtreecommitdiff
path: root/src/network/networkd-link.c
diff options
context:
space:
mode:
authorTom Gundersen <teg@jklm.no>2014-07-15 18:55:31 +0200
committerTom Gundersen <teg@jklm.no>2014-07-15 18:55:31 +0200
commitf5de5b00204f041aaec828d336c8afd9e860a5c3 (patch)
treead159454a17556b8f3ac953e8a0428c493f36b4e /src/network/networkd-link.c
parent30632d97d9d68c8202e562f34afae8f8d6e9c377 (diff)
sd-dhcp-client: make request broadcasts opt-in
It appears there is no good way to decide whether or not broadcasts should be enabled, there is hardware that must have broadcast, and there are networks that only allow unicast. So we give up and make this configurable. By default, unicast is used, but if the kernel were to inform us abotu certain interfaces requiring broadcast, we could change this to opt-in by default in those cases.
Diffstat (limited to 'src/network/networkd-link.c')
-rw-r--r--src/network/networkd-link.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/network/networkd-link.c b/src/network/networkd-link.c
index 877b7a9be2..0fb323b9a5 100644
--- a/src/network/networkd-link.c
+++ b/src/network/networkd-link.c
@@ -1998,6 +1998,10 @@ static int link_configure(Link *link) {
if (r < 0)
return r;
+ r = sd_dhcp_client_set_request_broadcast(link->dhcp_client, link->network->dhcp_broadcast);
+ if (r < 0)
+ return r;
+
if (link->network->dhcp_mtu) {
r = sd_dhcp_client_set_request_option(link->dhcp_client, 26);
if (r < 0)