dhcp: switch IPv4 "internal" DHCP client to use "nettools" backend instead of "systemd"

Previously, our "internal" DHCPv4 client is based on a fork of
systemd code. This manner of maintaining the fork is problematic.
The solution is to use a proper library: n-dhcp4 from the nettools
project.

We already have these two as undocumented plugins available, by
setting either "dhcp=systemd" or "dhcp=nettools". This is only for
testing. Users are only supposed to use the "internal" plugin.

Up until now, the "internal" DHCPv4 plugin was based on "systemd" code.
Change that to use "nettools" instead.

Possibly this breaks something, and we need to fix it. But do this
early so we have time to test the nettools plugin and identify issues.

For the user, this change should be entirely transparant.

https://gitlab.freedesktop.org/NetworkManager/NetworkManager/merge_requests/302
This commit is contained in:
Thomas Haller 2019-10-07 16:41:46 +02:00
parent ccfc3370af
commit d3c7083f97
2 changed files with 3 additions and 1 deletions

2
NEWS
View file

@ -23,6 +23,8 @@ USE AT YOUR OWN RISK. NOT RECOMMENDED FOR PRODUCTION USE!
* libnm: retire deprecated WiMAX API NMDeviceWimax and NMWimaxNsp.
WiMAX support was removed from NetworkManager in version 1.2 (2016) and no such
type instances would have been created by NMClient for a while now.
* DHCP: switch "internal" DHCPv4 plugin from code based on systemd to use nettools'
n-dhcp4 library.
=============================================
NetworkManager-1.20

View file

@ -1099,7 +1099,7 @@ _get_type_per_addr_family (int addr_family)
{
nm_assert_addr_family (addr_family);
if (FALSE && addr_family == AF_INET)
if (addr_family == AF_INET)
return nm_dhcp_nettools_get_type ();
return nm_dhcp_systemd_get_type ();
}