diff options
author | Renato Botelho <garga@FreeBSD.org> | 2013-01-14 11:32:02 -0200 |
---|---|---|
committer | Renato Botelho <garga@FreeBSD.org> | 2013-01-14 11:32:02 -0200 |
commit | 8e9d1265506035ace51a8e94aa9714cca5f38734 (patch) | |
tree | d45750f8bb6ba4665b6fdbf9c3e8c79eb48633d6 /etc | |
parent | 11d1d64e81484f3175780e841f72fe845d7205f3 (diff) | |
download | pfsense-8e9d1265506035ace51a8e94aa9714cca5f38734.zip pfsense-8e9d1265506035ace51a8e94aa9714cca5f38734.tar.gz |
Check if interface really exists on interface_ppps_configure() and interface_configure()
Diffstat (limited to 'etc')
-rw-r--r-- | etc/inc/interfaces.inc | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/etc/inc/interfaces.inc b/etc/inc/interfaces.inc index ff04fa0..2030b58 100644 --- a/etc/inc/interfaces.inc +++ b/etc/inc/interfaces.inc @@ -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"); |