Revision a55e9c70
Added by Ermal Luçi about 16 years ago
usr/local/www/services_wol.php | ||
---|---|---|
51 | 51 |
foreach ($a_wol as $wolent) { |
52 | 52 |
$mac = $wolent['mac']; |
53 | 53 |
$if = $wolent['interface']; |
54 |
$bcip = gen_subnet_max($config['interfaces'][$if]['ipaddr'],
|
|
55 |
$config['interfaces'][$if]['subnet']);
|
|
54 |
$bcip = gen_subnet_max($get_interface_ip($if),
|
|
55 |
get_interface_subnet($if));
|
|
56 | 56 |
mwexec("/usr/local/bin/wol -i {$bcip} {$mac}"); |
57 | 57 |
$savemsg .= "Sent magic packet to {$mac}.<br>"; |
58 | 58 |
} |
... | ... | |
81 | 81 |
|
82 | 82 |
if (!$input_errors) { |
83 | 83 |
/* determine broadcast address */ |
84 |
$bcip = gen_subnet_max($config['interfaces'][$if]['ipaddr'],
|
|
85 |
$config['interfaces'][$if]['subnet']);
|
|
84 |
$bcip = gen_subnet_max(get_interface_ip($if),
|
|
85 |
get_interface_subnet($if));
|
|
86 | 86 |
|
87 | 87 |
mwexec("/usr/local/bin/wol -i {$bcip} {$mac}"); |
88 | 88 |
$savemsg = "Sent magic packet to {$mac}."; |
Also available in: Unified diff
Basically use get_interface*() functions instead of accessing fields like 'ipaddr'/'descr' etc...
NOTE: This should give indipendce on dynamic interfaces on some services that before could not be used on top of this type of interfaces.