summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorErmal <eri@pfsense.org>2013-01-27 15:46:47 +0000
committerErmal <eri@pfsense.org>2013-01-27 15:46:47 +0000
commit029b377a5473d11487f18ea9f9e874f815592a26 (patch)
treef45077c06e3bd21f4bd07ef8c7428a8de5022547 /etc
parent8d1f1034c2333b0536ae8cfee57c9d3fd838aeb0 (diff)
downloadpfsense-029b377a5473d11487f18ea9f9e874f815592a26.zip
pfsense-029b377a5473d11487f18ea9f9e874f815592a26.tar.gz
Remove missed line and also improve code for bridge cases
Diffstat (limited to 'etc')
-rw-r--r--etc/inc/services.inc14
1 files changed, 7 insertions, 7 deletions
diff --git a/etc/inc/services.inc b/etc/inc/services.inc
index f05e43d..0fe7a45 100644
--- a/etc/inc/services.inc
+++ b/etc/inc/services.inc
@@ -1109,20 +1109,20 @@ EOD;
/* magic here */
$dhcpdv6ifs = array_merge($dhcpdv6ifs, get_pppoes_child_interfaces($dhcpv6if));
} else {
- $realif = escapeshellcmd(get_real_interface($dhcpv6if));
- $dhcpdv6ifs[] = $realif;
- exec("/sbin/ifconfig {$realif} |awk '/ether/ {print $2}'", $mac);
- $v6address = generate_ipv6_from_mac($mac[0]);
- /* Create link local address for bridges */
- if(stristr("$realif", "bridge")) {
+ $realif = get_real_interface($dhcpv6if);
+ if (stristr("$realif", "bridge")) {
+ $mac = get_interface_mac($realif);
+ $v6address = generate_ipv6_from_mac($mac);
+ /* Create link local address for bridges */
mwexec("/sbin/ifconfig {$realif} inet6 {$v6address}");
}
+ $realif = escapeshellcmd($realif);
+ $dhcpdv6ifs[] = $realif;
}
}
}
/* write dhcpdv6.conf */
- $fdv6 = fopen("{$g['dhcpd_chroot_path']}/etc/dhcpdv6.conf", "w");
if (!@file_put_contents("{$g['dhcpd_chroot_path']}/etc/dhcpdv6.conf", $dhcpdv6conf)) {
log_error("Error: cannot open dhcpdv6.conf in services_dhcpdv6_configure().\n");
if ($g['booting'])
OpenPOWER on IntegriCloud