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:
@@ -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;
|
||||
|
Reference in New Issue
Block a user