Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
systemd
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
certo
systemd
Commits
47f8d079
Commit
47f8d079
authored
Mar 22, 2026
by
Vladimir Bashkirtsev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix DHCP client to work with qmi_wwan RawIP interface
parent
9b2f1b87
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
58 additions
and
0 deletions
+58
-0
Makefile
Makefile
+1
-0
systemd-248-fix_wwan_dhcp.patch
systemd-248-fix_wwan_dhcp.patch
+57
-0
No files found.
Makefile
View file @
47f8d079
...
...
@@ -5,6 +5,7 @@ all: systemd-user-sessions network-config
patch
-Np1
-d
systemd-248 < systemd-248-fix_timesyncd.patch
patch
-Np1
-d
systemd-248 < systemd-248-fix_test-udev.patch
patch
-Np1
-d
systemd-248 < systemd-248-fix_test-path-util.patch
patch
-Np1
-d
systemd-248 < systemd-248-fix_wwan_dhcp.patch
patch
-Np1
-d
systemd-248 < systemd-248-increase_test_timeouts.patch
ln
-s
/tools/bin/true /usr/bin/xsltproc
cd
systemd-248
&&
sed
-i
's/GROUP="render", //'
rules.d/50-udev-default.rules.in
...
...
systemd-248-fix_wwan_dhcp.patch
0 → 100644
View file @
47f8d079
diff -uNr systemd-248/src/libsystemd-network/sd-dhcp-client.c systemd-248-wwan_dhcp_fix/src/libsystemd-network/sd-dhcp-client.c
--- systemd-248/src/libsystemd-network/sd-dhcp-client.c 2021-03-31 07:29:02.000000000 +1030
+++ systemd-248-wwan_dhcp_fix/src/libsystemd-network/sd-dhcp-client.c 2026-03-21 23:25:24.603956799 +1030
@@ -293,16 +293,33 @@
bool need_restart = false;
int r;
+ static const uint8_t default_eth_bcast[6] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff },
+ default_eth_addr[6] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
+
assert_return(client, -EINVAL);
- assert_return(addr, -EINVAL);
- assert_return(addr_len > 0 && addr_len <= MAX_MAC_ADDR_LEN, -EINVAL);
- assert_return(arp_type > 0, -EINVAL);
if (arp_type == ARPHRD_ETHER)
assert_return(addr_len == ETH_ALEN, -EINVAL);
else if (arp_type == ARPHRD_INFINIBAND)
assert_return(addr_len == INFINIBAND_ALEN, -EINVAL);
- else
+ else if (arp_type == ARPHRD_RAWIP || arp_type == ARPHRD_NONE) {
+ /* Linux cellular modem drivers (e.g. qmi_wwan) present a
+ * network interface of type ARPHRD_RAWIP(519) or
+ * ARPHRD_NONE(65534) when in point-to-point mode, but these
+ * are not valid DHCP hardware-type values.
+ *
+ * Apparently, it's best to just pretend that these are ethernet
+ * devices. Other approaches have been tried, but resulted in
+ * incompatibilities with some server software. See
+ * https://lore.kernel.org/netdev/cover.1228948072.git.inaky@linux.intel.com/
+ */
+ arp_type = ARPHRD_ETHER;
+ if (addr_len == 0) {
+ addr = default_eth_addr;
+ bcast_addr = default_eth_bcast;
+ addr_len = ETH_ALEN;
+ }
+ } else
return -EINVAL;
if (client->mac_addr_len == addr_len &&
diff -uNr systemd-248/src/network/networkd-dhcp-common.c systemd-248-wwan_dhcp_fix/src/network/networkd-dhcp-common.c
--- systemd-248/src/network/networkd-dhcp-common.c 2021-03-31 07:29:02.000000000 +1030
+++ systemd-248-wwan_dhcp_fix/src/network/networkd-dhcp-common.c 2026-03-21 22:26:30.850421741 +1030
@@ -21,6 +21,12 @@
assert(link);
assert(IN_SET(family, AF_INET, AF_INET6));
+ /* Currently, sd-dhcp-client supports only ethernet and infiniband.
+ * (ARMHRD_RAWIP and ARMHRD_NONE are typically wwan modems and will be
+ * treated as ethernet devices.) */
+ if (family == AF_INET && !IN_SET(link->iftype, ARPHRD_ETHER, ARPHRD_INFINIBAND, ARPHRD_RAWIP, ARPHRD_NONE))
+ return false;
+
if (family == AF_INET6 && !socket_ipv6_is_supported())
return false;
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment