summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2005-07-14 05:07:51 +0000
committerScott Ullrich <sullrich@pfsense.org>2005-07-14 05:07:51 +0000
commit0ed77c5111da945f658378ecfd3fbeef9426a115 (patch)
treea7db9fbd07d8c74787563f7dfba155ba56b7a35f /etc
parent77317f2b96d9bc924bf4c42e03e761c85c30dc80 (diff)
downloadpfsense-0ed77c5111da945f658378ecfd3fbeef9426a115.zip
pfsense-0ed77c5111da945f658378ecfd3fbeef9426a115.tar.gz
Missing }
Diffstat (limited to 'etc')
-rw-r--r--etc/inc/interfaces.inc27
1 files changed, 14 insertions, 13 deletions
diff --git a/etc/inc/interfaces.inc b/etc/inc/interfaces.inc
index 36df7d7..0864391 100644
--- a/etc/inc/interfaces.inc
+++ b/etc/inc/interfaces.inc
@@ -210,18 +210,19 @@ function interfaces_optional_configure_if($opti) {
if ($optcfg['spoofmac']) {
mwexec("/sbin/ifconfig " . escapeshellarg($optcfg['if']) .
" link " . escapeshellarg($optcfg['spoofmac']));
- } else {
- $mac = get_interface_mac_address($optcfg['if']);
- if($mac == "ff:ff:ff:ff:ff:ff") {
- /* this is not a valid mac address. generate a
- * temporary mac address so the machine can get online.
- */
- $random_mac = generate_random_mac_address();
- mwexec("/sbin/ifconfig " . escapeshellarg($optcfg['if']) .
- " link " . escapeshellarg($random_mac));
- $optcfg['spoofmac'] = $random_mac;
- write_config();
- file_notice("MAC Address altered", "The INVALID MAC address (ff:ff:ff:ff:ff:ff) on interface {$optcfg['if']} has been automatically replaced with {$random_mac}", "Interfaces");
+ } else {
+ $mac = get_interface_mac_address($optcfg['if']);
+ if($mac == "ff:ff:ff:ff:ff:ff") {
+ /* this is not a valid mac address. generate a
+ * temporary mac address so the machine can get online.
+ */
+ $random_mac = generate_random_mac_address();
+ mwexec("/sbin/ifconfig " . escapeshellarg($optcfg['if']) .
+ " link " . escapeshellarg($random_mac));
+ $optcfg['spoofmac'] = $random_mac;
+ write_config();
+ file_notice("MAC Address altered", "The INVALID MAC address (ff:ff:ff:ff:ff:ff) on interface {$optcfg['if']} has been automatically replaced with {$random_mac}", "Interfaces");
+ }
}
/* media */
@@ -949,4 +950,4 @@ function get_current_wan_address() {
}
}
-?>
+?> \ No newline at end of file
OpenPOWER on IntegriCloud