Project

General

Profile

« Previous | Next » 

Revision f27958f0

Added by Erik Fonnesbeck over 15 years ago

Fix code for getting the BSSID.

View differences:

etc/inc/interfaces.inc
1631 1631
				mwexec("/sbin/ifconfig " . escapeshellarg($if) . " down");
1632 1632
			}
1633 1633
			if(!is_macaddr($if_bssid)) {
1634
				$if_bssid = baseif_mac;
1634
				$if_bssid = $baseif_mac;
1635 1635
			}
1636 1636
			/* XXX: Workaround because hostapd won't properly detect BSSID of
1637 1637
			 * clone interfaces and uses base interface's MAC instead
......
2904 2904

  
2905 2905
function get_interface_bssid($interface) {
2906 2906
	$mac = array();
2907
        exec("/sbin/ifconfig {$interface} | /usr/bin/awk '/bssid/ {print $2}'", $mac);
2907
        exec("/sbin/ifconfig {$interface} | /usr/bin/awk '/bssid/ {print $NF}'", $mac);
2908 2908
        if(is_macaddr($mac[0])) {
2909 2909
                return trim($mac[0]);
2910 2910
        } else {

Also available in: Unified diff