Skip to content

Commit

Permalink
Allow to assign L2TP VPN server interface. Issue #13099
Browse files Browse the repository at this point in the history
  • Loading branch information
vktg committed May 5, 2022
1 parent 336edf7 commit 992335f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
10 changes: 7 additions & 3 deletions src/etc/inc/interfaces.inc
Expand Up @@ -4351,7 +4351,7 @@ function interface_configure($interface = "wan", $reloadall = false, $linkupeven
break;
default:
/* XXX: Kludge for now related to #3280 */
if (!in_array($tunnelif, array("gif", "gre", "ovp", "ips"))) {
if (!in_array($tunnelif, array("gif", "gre", "ovp", "ips", "l2t"))) {
if (is_ipaddrv4($wancfg['ipaddr']) && $wancfg['subnet'] <> "") {
pfSense_interface_setaddress($realif, "{$wancfg['ipaddr']}/{$wancfg['subnet']}");
}
Expand Down Expand Up @@ -4383,7 +4383,7 @@ function interface_configure($interface = "wan", $reloadall = false, $linkupeven
break;
default:
/* XXX: Kludge for now related to #3280 */
if (!in_array($tunnelif, array("gif", "gre", "ovp", "ips"))) {
if (!in_array($tunnelif, array("gif", "gre", "ovp", "ips", "l2t"))) {
if (is_ipaddrv6($wancfg['ipaddrv6']) && $wancfg['subnetv6'] <> "") {
//pfSense_interface_setaddress($realif, "{$wancfg['ipaddrv6']}/{$wancfg['subnetv6']}");
// FIXME: Add IPv6 Support to the pfSense module
Expand Down Expand Up @@ -4443,7 +4443,11 @@ function interface_configure($interface = "wan", $reloadall = false, $linkupeven
/* update dyndns */
send_event("service reload dyndns {$interface}");
}
}
}

if (!platform_booting() && (substr($realif, 0, 5) == 'l2tps')) {
vpn_l2tp_configure();
};

if (!empty($wancfg['descr'])) {
mwexec("/sbin/ifconfig " . escapeshellarg($wancfg['if']) . " description " . escapeshellarg($wancfg['descr']));
Expand Down
1 change: 0 additions & 1 deletion src/etc/inc/util.inc
Expand Up @@ -1632,7 +1632,6 @@ function get_interface_list($mode = "active", $keyby = "physical", $vfaces = "")
'poes',
'pptp',
'l2tp',
'l2tps',
'sl',
'gif',
'gre',
Expand Down
2 changes: 1 addition & 1 deletion src/usr/local/www/interfaces.php
Expand Up @@ -88,7 +88,7 @@ function remove_bad_chars($string) {
$interfaces = get_configured_interface_with_descr();
/* Interfaces which have addresses configured elsewhere and should not be
* configured here. See https://redmine.pfsense.org/issues/8687 */
$no_address_interfaces = array("ovpn", "ipsec", "gif", "gre");
$no_address_interfaces = array("ovpn", "ipsec", "gif", "gre", "l2tps");
$show_address_controls = true;
$realifname = get_real_interface($if);
foreach ($no_address_interfaces as $ifbl) {
Expand Down

0 comments on commit 992335f

Please sign in to comment.