summaryrefslogtreecommitdiffstats
path: root/src/libsystemd-network/test-dhcp-option.c
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2022-01-22 18:14:31 +0100
committerYu Watanabe <watanabe.yu+github@gmail.com>2022-01-23 20:18:20 +0100
commit97fa338dceb8c59f9dd5047d327c819aca328e5c (patch)
tree14def8f02362663cc6d8c203ecf4a79a2d047a98 /src/libsystemd-network/test-dhcp-option.c
parentsd-dhcp-client: fix RFC number (diff)
downloadsystemd-97fa338dceb8c59f9dd5047d327c819aca328e5c.tar.xz
systemd-97fa338dceb8c59f9dd5047d327c819aca328e5c.zip
sd-dhcp-client,sd-dhcp-client-server: set chaddr in dhcp_message_init()
And also set chaddr and hlen for packets on non-Ethernet interfaces, except for InfiniBand.
Diffstat (limited to 'src/libsystemd-network/test-dhcp-option.c')
-rw-r--r--src/libsystemd-network/test-dhcp-option.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libsystemd-network/test-dhcp-option.c b/src/libsystemd-network/test-dhcp-option.c
index 800a6641e3..b01b1f57a3 100644
--- a/src/libsystemd-network/test-dhcp-option.c
+++ b/src/libsystemd-network/test-dhcp-option.c
@@ -89,7 +89,8 @@ static void test_message_init(void) {
message = malloc0(len);
assert_se(dhcp_message_init(message, BOOTREQUEST, 0x12345678,
- DHCP_DISCOVER, ARPHRD_ETHER, optlen, &optoffset) >= 0);
+ DHCP_DISCOVER, ARPHRD_ETHER, ETH_ALEN, (uint8_t[16]){},
+ optlen, &optoffset) >= 0);
assert_se(message->xid == htobe32(0x12345678));
assert_se(message->op == BOOTREQUEST);