After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 768205 - networkmanager-1.2.x: add a configure option to disable/enable internal dhcp
networkmanager-1.2.x: add a configure option to disable/enable internal dhcp
Status: RESOLVED OBSOLETE
Product: NetworkManager
Classification: Platform
Component: general
1.2.x
Other Linux
: Normal normal
: ---
Assigned To: NetworkManager maintainer(s)
NetworkManager maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2016-06-29 18:49 UTC by Pacho Ramos
Modified: 2020-11-12 14:31 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Pacho Ramos 2016-06-29 18:49:00 UTC
Currently configure.ac is written in a way that looks to offer two options:
- dhcpcd (I am unsure if it's still maintained or maybe a candidate to be removed in the future)
- dhclient
- If none is found, it will try to use dhclient anyway:
# Fallback
if test "$with_dhclient" = "no" -a "$with_dhcpcd" = "no"; then
        AC_MSG_WARN([Could not find a suitable DHCP client, falling back to dhclient])
        with_dhclient=/sbin/dhclient
fi

But NetworkManager has also an internal dhcp that can be used when configuring it in NetworkManager.conf:
[main]
dhcp=internal

Is there any reason for hiding that internal dhcp so much? Is it experimental or something? If not, maybe it would be offered also as a configure option

Thanks
Comment 1 Thomas Haller 2016-06-30 06:03:47 UTC
the internal client is based on systemd's networking code. Currently, that code is not yet released as a stable library, instead it is used by copying/importing the source files from systemd upstream project. That is not great, and once a proper libsystemd-network is released, we will switch.

Also, if you use the internal client, you don't get proper sandboxing/previledge dropping, so it may be more dangerous against exploits (but maybe not, the systemd code is in a pretty good shape).
-- but then again, as it is also not a proper library, it's harder for us to maintain our (essentially) fork of libsystemd-networkd.

So, yes, it's considered experimental, but it should work quite well actually.

Btw. dhcpcd doesn't get as much testing, so that might not work perfect either. The most complete plugin is dhclient (which on Fedora and maybe other distros has downstream patches to drop previledges), but that has a rather large overhead as the dhclient process consumes a lot of memory.


Eventually, the internal plugin should be sandboxed, based on a proper libsystemd-network library, and be a full replacement for dhclient.

The internal clinet is not "hidden so much". It's only that the default configuration (in absence of a main.dhcp setting) prefers dhclient,dhcpcd,internal (in that order)). What is missing is a configure option to select the default configuration at compile-time. 
-- but I don't think that matters either, because few people will build with both dhcpcd and dhclient support. So, their "default" ends up to be pretty much what they want.


I don't think there is much value in disabling it at compile time. The only overhead it has is  an increased binary size (which is bad, but probably not too bad).



Note, we use the systemd code also for lldp and ipv4ll with the same issues.
Comment 2 André Klapper 2020-11-12 14:31:11 UTC
bugzilla.gnome.org is being shut down in favor of a GitLab instance. 
We are closing all old bug reports and feature requests in GNOME Bugzilla which have not seen updates for a long time.

If you still use NetworkManager and if you still see this bug / want this feature in a recent and supported version of NetworkManager, then please feel free to report it at https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/issues/

Thank you for creating this report and we are sorry it could not be implemented (workforce and time is unfortunately limited).