mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-27 05:30:42 +01:00
dhcp: merge branch 'bg/dhcp6-pd-stateless'
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/issues/647
(cherry picked from commit 26aab27587)
This commit is contained in:
commit
7a357dc5c7
3 changed files with 14 additions and 2 deletions
|
|
@ -9862,13 +9862,16 @@ gboolean
|
|||
nm_device_dhcp6_renew(NMDevice *self, gboolean release)
|
||||
{
|
||||
NMDevicePrivate *priv = NM_DEVICE_GET_PRIVATE(self);
|
||||
NMNDiscDHCPLevel mode;
|
||||
|
||||
g_return_val_if_fail(priv->dhcp_data_6.client != NULL, FALSE);
|
||||
|
||||
_LOGI(LOGD_DHCP6, "DHCPv6 lease renewal requested");
|
||||
|
||||
/* Terminate old DHCP instance and release the old lease */
|
||||
mode = priv->dhcp6.mode;
|
||||
dhcp6_cleanup(self, CLEANUP_TYPE_DECONFIGURE, release);
|
||||
priv->dhcp6.mode = mode;
|
||||
|
||||
/* Start DHCP again on the interface */
|
||||
return dhcp6_start(self, FALSE);
|
||||
|
|
|
|||
|
|
@ -437,6 +437,12 @@ dhclient_start(NMDhcpClient *client,
|
|||
|
||||
if (addr_family == AF_INET6) {
|
||||
g_ptr_array_add(argv, (gpointer) "-6");
|
||||
|
||||
if (prefixes > 0 && nm_streq0(mode_opt, "-S")) {
|
||||
/* -S is incompatible with -P, only use the latter */
|
||||
mode_opt = NULL;
|
||||
}
|
||||
|
||||
if (mode_opt)
|
||||
g_ptr_array_add(argv, (gpointer) mode_opt);
|
||||
while (prefixes--)
|
||||
|
|
|
|||
|
|
@ -969,8 +969,11 @@ ip6_start(NMDhcpClient * client,
|
|||
|
||||
_LOGT("dhcp-client6: set %p", sd_client);
|
||||
|
||||
if (nm_dhcp_client_get_info_only(client))
|
||||
sd_dhcp6_client_set_information_request(sd_client, 1);
|
||||
if (nm_dhcp_client_get_info_only(client)) {
|
||||
sd_dhcp6_client_set_address_request(sd_client, 0);
|
||||
if (needed_prefixes == 0)
|
||||
sd_dhcp6_client_set_information_request(sd_client, 1);
|
||||
}
|
||||
|
||||
r = sd_dhcp6_client_set_iaid(sd_client, nm_dhcp_client_get_iaid(client));
|
||||
if (r < 0) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue