net/l2tp: change listen IP to interface for #1106

This breaks compatibility, but it seems to solve issues with setups.
Additionally, it makes the spurious "interface" selection do something.

Suggested by: @mibofra
This commit is contained in:
Franco Fichtner
2018-12-30 12:53:41 +01:00
parent 7bb758bd7a
commit 9f924b119f
2 changed files with 6 additions and 5 deletions
+1 -2
View File
@@ -1,6 +1,5 @@
PLUGIN_NAME= l2tp
PLUGIN_VERSION= 1.7
PLUGIN_REVISION= 2
PLUGIN_VERSION= 1.8
PLUGIN_DEPENDS= clog mpd5
PLUGIN_COMMENT= L2TP server based on MPD5
PLUGIN_MAINTAINER= franco@opnsense.org
@@ -1,7 +1,7 @@
<?php
/*
* Coypright (C) 2016-2017 Franco Fichtner <franco@opnsense.org>
* Coypright (C) 2016-2018 Franco Fichtner <franco@opnsense.org>
* Copyright (C) 2008 Shrew Soft Inc. <mgrooms@shrew.net>
* Copyright (C) 2008 Ermal Luçi
* Copyright (C) 2004 Scott Ullrich <sullrich@gmail.com>
@@ -131,6 +131,8 @@ function if_l2tp_configure_do()
return 1;
}
$selfip = get_interface_ip($l2tpcfg['interface']);
$iprange = $l2tpcfg['remoteip'] . ' ';
$iprange .= long2ip32(ip2long($l2tpcfg['remoteip']) + $l2tpcfg['n_l2tp_units'] - 1);
@@ -165,7 +167,7 @@ EOD;
}
$mpdconf .= "\n";
} elseif (isset($config['dnsmasq']['enable']) || isset($config['unbound']['enable'])) {
$mpdconf .= " set ipcp dns " . get_interface_ip("lan");
$mpdconf .= " set ipcp dns ${selfip}";
if (isset($syscfg['dnsserver'][0])) {
$mpdconf .= " " . $syscfg['dnsserver'][0];
}
@@ -194,7 +196,7 @@ EOD;
{$paporchap}
set link keep-alive 10 60
set link mtu 1460
set l2tp self ${l2tpcfg['localip']}
set l2tp self ${selfip}
set link enable incoming
EOD;