From 58da18251f468de9de4cc7b36804c924e2fd4421 Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Thu, 3 Feb 2022 18:55:18 +0100 Subject: [PATCH] sd-dhcp6-client: fix sending prefix delegation request during rebind Fixes an assertion failure "pd->type == SD_DHCP6_OPTION_IA_PD" in dhcp6_option_append_pd(). Something similar was done in commit 26a63b81322a ('sd-dhcp6-client: Fix sending prefix delegation request (#17136)'). The justification is probably the same. --- src/libsystemd-network/sd-dhcp6-client.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libsystemd-network/sd-dhcp6-client.c b/src/libsystemd-network/sd-dhcp6-client.c index 706904c7202..84bc739bba2 100644 --- a/src/libsystemd-network/sd-dhcp6-client.c +++ b/src/libsystemd-network/sd-dhcp6-client.c @@ -857,7 +857,7 @@ static int client_send_message(sd_dhcp6_client *client, usec_t time_now) { return r; } - if (FLAGS_SET(client->request_ia, DHCP6_REQUEST_IA_PD)) { + if (FLAGS_SET(client->request_ia, DHCP6_REQUEST_IA_PD) && client->lease->pd.addresses) { r = dhcp6_option_append_pd(&opt, &optlen, &client->lease->pd, NULL); if (r < 0) return r;