sd-dhcp-client: drop unused data in sd_dhcp_client

With the previous commit, now sd_dhcp_client.link is not used anymore.
Let's drop it.
This commit is contained in:
Yu Watanabe
2026-05-03 14:50:13 +09:00
parent 0c69b24741
commit a72f23d2b8
3 changed files with 0 additions and 23 deletions

View File

@@ -44,7 +44,6 @@ struct sd_dhcp_client {
uint16_t port;
uint16_t server_port;
union sockaddr_union link;
sd_event_source *receive_message;
bool request_broadcast;
Set *req_opts;

View File

@@ -40,17 +40,6 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
ASSERT_OK_ERRNO(socketpair(AF_UNIX, SOCK_SEQPACKET | SOCK_CLOEXEC | SOCK_NONBLOCK, 0, socket_fd));
client->socket_fd = TAKE_FD(socket_fd[0]);
/* Set a fake socket address, as the client will never call dhcp_network_bind_raw_socket() when
* socket_fd is set. */
client->link.ll = (struct sockaddr_ll) {
.sll_family = AF_PACKET,
.sll_protocol = htobe16(ETH_P_IP),
.sll_ifindex = 42,
.sll_hatype = ARPHRD_ETHER,
.sll_halen = bcast_addr.length,
};
memcpy(client->link.ll.sll_addr, bcast_addr.bytes, bcast_addr.length);
ASSERT_OK(sd_dhcp_client_attach_event(client, e, /* priority= */ 0));
ASSERT_OK(sd_dhcp_client_set_ifindex(client, 42));

View File

@@ -82,17 +82,6 @@ static void setup(sd_event_io_handler_t io_handler, sd_dhcp_client_callback_t cl
client->socket_fd = TAKE_FD(socket_fd[0]);
/* Set a fake socket address, as the client will never call dhcp_network_bind_raw_socket() when
* socket_fd is set. */
client->link.ll = (struct sockaddr_ll) {
.sll_family = AF_PACKET,
.sll_protocol = htobe16(ETH_P_IP),
.sll_ifindex = 42,
.sll_hatype = ARPHRD_ETHER,
.sll_halen = bcast_addr.length,
};
memcpy(client->link.ll.sll_addr, bcast_addr.bytes, bcast_addr.length);
ASSERT_OK(sd_dhcp_client_attach_event(client, e, SD_EVENT_PRIORITY_NORMAL));
ASSERT_OK(sd_dhcp_client_set_ifindex(client, 42));
ASSERT_OK(sd_dhcp_client_set_mac(client, hw_addr.bytes, bcast_addr.bytes, hw_addr.length, ARPHRD_ETHER));