diff options
author | Phil Davis <phil.davis@inf.org> | 2014-11-03 20:49:15 +0545 |
---|---|---|
committer | Phil Davis <phil.davis@inf.org> | 2014-11-03 20:49:15 +0545 |
commit | ba667cc6f4e0bb5fa282a3cf6750359c5d216bac (patch) | |
tree | 1d09ebd2bc7da805036a81f87f40e4372bfc41d9 /etc/rc.restore_config_backup | |
parent | ec2904649fac23c5155e779ebf3a266c94125c5f (diff) | |
download | pfsense-ba667cc6f4e0bb5fa282a3cf6750359c5d216bac.zip pfsense-ba667cc6f4e0bb5fa282a3cf6750359c5d216bac.tar.gz |
Fix console set interface IP address
Problem as per forum https://forum.pfsense.org/index.php?topic=83651.0
The problem comes whenever services_dhcpd_configure is called - the global $config gets reset from the actual current config, and any pending changes in the current process are lost.
It was introduced by commit 86ce2df
in which services_dhcpdv4_configure() does:
require_once('pkg-utils.inc')
and pkg-utils.inc does various stuff like:
if(file_exists("/cf/conf/use_xmlreader"))
require_once("xmlreader.inc");
else
require_once("xmlparse.inc");
which seems to cause a reset of the $config variable, thus losing the pending changes the user has entered at the console.
The top-level code in rc.initial.setlanip really does not need to (and should not) implement any changes along the way - it should collect all the answers from the user, then write_config and then make all the necessary calls to routines to implement the changes on the running system. This fixes it - defer any calls to services_dhcpd_configure() until after all questions are answered and write_config has happened.
Diffstat (limited to 'etc/rc.restore_config_backup')
0 files changed, 0 insertions, 0 deletions