mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
Check if interface really exists on interface_ppps_configure() and interface_configure()
This commit is contained in:
parent
11d1d64e81
commit
8e9d126550
@ -1351,8 +1351,11 @@ function interface_ppps_configure($interface) {
|
||||
|
||||
$ports = explode(',',$ppp['ports']);
|
||||
if ($type != "modem") {
|
||||
foreach ($ports as $pid => $port)
|
||||
foreach ($ports as $pid => $port) {
|
||||
$ports[$pid] = get_real_interface($port);
|
||||
if (empty($ports[$pid]))
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
$localips = explode(',',$ppp['localip']);
|
||||
$gateways = explode(',',$ppp['gateway']);
|
||||
@ -2630,6 +2633,9 @@ function interface_configure($interface = "wan", $reloadall = false, $linkupeven
|
||||
// Need code to handle MLPPP if we ever use $realhwif for MLPPP handling
|
||||
$realhwif = $realhwif_array[0];
|
||||
|
||||
if (!does_interface_exist($realhwif))
|
||||
return 0;
|
||||
|
||||
/* Disable Accepting router advertisements unless specifically requested */
|
||||
log_error("Deny router advertisements for interface {$interface}");
|
||||
mwexec("/sbin/ifconfig " . escapeshellarg($realif) . " inet6 -accept_rtadv");
|
||||
|
||||
Loading…
Reference in New Issue
Block a user