summaryrefslogtreecommitdiff
path: root/src/libsystemd-network/test-dhcp-option.c
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2022-01-23 02:14:31 +0900
committerYu Watanabe <watanabe.yu+github@gmail.com>2022-01-24 04:18:20 +0900
commit97fa338dceb8c59f9dd5047d327c819aca328e5c (patch)
tree14def8f02362663cc6d8c203ecf4a79a2d047a98 /src/libsystemd-network/test-dhcp-option.c
parenta6508f37c9321c93f5d0b0184611d0fd5e85e2fe (diff)
downloadsystemd-97fa338dceb8c59f9dd5047d327c819aca328e5c.tar.gz
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);