mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-02-05 19:20:35 +01:00
dhcp: ensure any dhclient script from dhclient.conf is ignored
The config file can specify a dhclient script, which gets used instead of what NM passes on the command-line. Make sure that script gets ignored in the final dhclient config, because the script NM passes is the script that needs to be used to pass data back to NM. People may have old dhclient.conf files lying around that get picked up and we don't want any script specified there to interfere.
This commit is contained in:
parent
80886c2866
commit
97990135f1
1 changed files with 4 additions and 0 deletions
|
|
@ -168,6 +168,10 @@ nm_dhcp_dhclient_create_config (const char *interface,
|
|||
continue;
|
||||
}
|
||||
|
||||
/* Ignore 'script' since we pass our own */
|
||||
if (g_str_has_prefix (p, "script "))
|
||||
continue;
|
||||
|
||||
/* Check for "also require" */
|
||||
if (!strncmp (p, ALSOREQ_TAG, strlen (ALSOREQ_TAG))) {
|
||||
in_alsoreq = TRUE;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue