summaryrefslogtreecommitdiff
path: root/rules.d
diff options
context:
space:
mode:
authorViktor Mihajlovski <mihajlov@linux.ibm.com>2021-04-14 13:01:35 +0200
committerViktor Mihajlovski <mihajlov@linux.ibm.com>2021-04-21 18:11:18 +0200
commite70eca9b48df906a3e2d9f36d3acd4b5cb9ae553 (patch)
tree158f5af06f773e2b4e36b4c5a658af55a56f6718 /rules.d
parent5c9f1c68f032287da3fa7f5c4c08dfb0bf340c0b (diff)
downloadsystemd-e70eca9b48df906a3e2d9f36d3acd4b5cb9ae553.tar.gz
network: enable DHCP broadcast flag if required by interface
Some interfaces require that the DHCPOFFER message is sent via broadcast if they can't receive unicast messages before they've been configured with an IP address. E.g., s390 ccwgroup network interfaces operating in layer3 mode face this limitation. This can prevent the interfaces from receiving an IP address via DHCP, if the have been configured for layer3. To allow DHCP over such interfaces, we're introducing a new device property ID_NET_DHCP_BROADCAST which can be set for those. The networkd DHCP client will check whether this property is set for an interface, and if so will set the broadcast flag, unless the network configuration for the interface has an explicit RequestBroadcast setting. Besides that, we're adding a udev rule to set this device property for ccwgroup devices operating in layer3 mode, which is the case if the ID_NET_DRIVER property is qeth_l3. Supercedes #18829
Diffstat (limited to 'rules.d')
-rw-r--r--rules.d/81-net-dhcp.rules14
-rw-r--r--rules.d/meson.build1
2 files changed, 15 insertions, 0 deletions
diff --git a/rules.d/81-net-dhcp.rules b/rules.d/81-net-dhcp.rules
new file mode 100644
index 0000000000..2ef25ba060
--- /dev/null
+++ b/rules.d/81-net-dhcp.rules
@@ -0,0 +1,14 @@
+# do not edit this file, it will be overwritten on update
+
+ACTION=="remove", GOTO="net_dhcp_end"
+SUBSYSTEM!="net", GOTO="net_dhcp_end"
+
+# Network interfaces requiring DHCPOFFER messages to be broadcast
+# must set ID_NET_DHCP_BROADCAST to "1". This property will be
+# checked by the networkd DHCP4 client to set the DHCP option
+
+# s390 ccwgroup interfaces in layer3 mode need broadcast DHCPOFFER
+# using the link driver to detect this condition
+ENV{ID_NET_DRIVER}=="qeth_l3", ENV{ID_NET_DHCP_BROADCAST}="1"
+
+LABEL="net_dhcp_end"
diff --git a/rules.d/meson.build b/rules.d/meson.build
index 42fa451c6b..4bbba09fd5 100644
--- a/rules.d/meson.build
+++ b/rules.d/meson.build
@@ -26,6 +26,7 @@ rules = files('''
75-probe_mtd.rules
78-sound-card.rules
80-net-setup-link.rules
+ 81-net-dhcp.rules
'''.split())
if conf.get('HAVE_KMOD') == 1