diff options
author | Renato Botelho <renato@netgate.com> | 2018-08-28 09:43:21 -0300 |
---|---|---|
committer | Renato Botelho <renato@netgate.com> | 2018-08-28 09:43:21 -0300 |
commit | 57639ced0f34568e3bf0760e305864fd75739042 (patch) | |
tree | f765b769a51a966e57b6aeb6522147768d53da3d | |
parent | 4cd8424ac55a5723c21a5431acf3b4d21ba16b1f (diff) | |
download | pfsense-57639ced0f34568e3bf0760e305864fd75739042.zip pfsense-57639ced0f34568e3bf0760e305864fd75739042.tar.gz |
$wancfg is not a reference to $config. Set $random_mac properly on config and break long lines while here
-rw-r--r-- | src/etc/inc/interfaces.inc | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/etc/inc/interfaces.inc b/src/etc/inc/interfaces.inc index d90a3d7..25a80e4 100644 --- a/src/etc/inc/interfaces.inc +++ b/src/etc/inc/interfaces.inc @@ -3810,9 +3810,14 @@ function interface_configure($interface = "wan", $reloadall = false, $linkupeven echo gettext("Generating new MAC address."); $random_mac = generate_random_mac_address(); interface_set_macaddr($realhwif, $random_mac); - $wancfg['spoofmac'] = $random_mac; - write_config(sprintf(gettext('The invalid MAC address (ff:ff:ff:ff:ff:ff) on interface %1$s has been automatically replaced with %2$s'), $realif, $random_mac)); - file_notice("MAC Address altered", sprintf(gettext('The invalid MAC address (ff:ff:ff:ff:ff:ff) on interface %1$s has been automatically replaced with %2$s'), $realif, $random_mac), "Interfaces"); + $config['interfaces'][$mac_if]['spoofmac'] = $random_mac; + write_config(sprintf(gettext('The invalid MAC address ' . + '(ff:ff:ff:ff:ff:ff) on interface %1$s has been ' . + 'automatically replaced with %2$s'), $mac_if, $random_mac)); + file_notice("MAC Address altered", sprintf(gettext('The ' . + 'invalid MAC address (ff:ff:ff:ff:ff:ff) on interface ' . + '%1$s has been automatically replaced with %2$s'), $mac_if, + $random_mac), "Interfaces"); } /* media */ |