Revision 258e764e
Added by Luiz Souza 5 months ago
src/etc/inc/interfaces.inc | ||
---|---|---|
1895 | 1895 |
case "pppoe": |
1896 | 1896 |
case "pptp": |
1897 | 1897 |
case "l2tp": |
1898 |
if ($ifcfg['ipaddr'] == "pppoe" && |
|
1899 |
!config_path_enabled('system', |
|
1900 |
'use_mpd5_for_pppoe')) { |
|
1901 |
if (does_interface_exist($realif)) { |
|
1902 |
pfSense_interface_destroy($realif); |
|
1903 |
} |
|
1904 |
} elseif (is_array($ppps) && count($ppps)) { |
|
1898 |
if (is_array($ppps) && count($ppps) > 0) { |
|
1905 | 1899 |
foreach ($ppps as $ppp) { |
1906 |
if ($realif == $ppp['if']) { |
|
1900 |
if ($realif != $ppp['if']) { |
|
1901 |
continue; |
|
1902 |
} |
|
1903 |
if (isset($ppp['if_pppoe'])) { |
|
1904 |
if (does_interface_exist($realif)) { |
|
1905 |
pfSense_interface_destroy($realif); |
|
1906 |
} |
|
1907 |
} else { |
|
1907 | 1908 |
if (isset($ppp['ondemand']) && !$destroy) { |
1908 | 1909 |
send_event("interface reconfigure {$interface}"); |
1909 | 1910 |
break; |
... | ... | |
1913 | 1914 |
sleep(2); |
1914 | 1915 |
} |
1915 | 1916 |
unlink_if_exists("{$g['varetc_path']}/mpd_{$interface}.conf"); |
1916 |
break; |
|
1917 | 1917 |
} |
1918 |
break; |
|
1918 | 1919 |
} |
1919 | 1920 |
} |
1920 | 1921 |
break; |
... | ... | |
2359 | 2360 |
|
2360 | 2361 |
$confports = array_filter(explode(',', $ppp['ports'])); |
2361 | 2362 |
|
2362 |
if (!config_path_enabled('system', 'use_mpd5_for_pppoe') && |
|
2363 |
$type == "pppoe" && count($confports) == 1) { |
|
2363 |
if (isset($ppp['if_pppoe']) && $type == "pppoe" && count($confports) == 1) { |
|
2364 | 2364 |
return interface_pppoe_configure($ifcfg, $ppp); |
2365 | 2365 |
} |
2366 | 2366 |
|
Also available in: Unified diff
Change the knob to select mpd5/kernel PPPoE to a per-connection setting.
Replaces the original global setting.
Ticket: #18294
(cherry picked from commit e52a8eda6fa90e613f940553cfe438baafc7e7ea)