diff --git a/net/l2tp/Makefile b/net/l2tp/Makefile index 0be8638bc..2f7e4cc91 100644 --- a/net/l2tp/Makefile +++ b/net/l2tp/Makefile @@ -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 diff --git a/net/l2tp/src/etc/inc/plugins.inc.d/if_l2tp.inc b/net/l2tp/src/etc/inc/plugins.inc.d/if_l2tp.inc index f6282fb0e..09ed99a74 100644 --- a/net/l2tp/src/etc/inc/plugins.inc.d/if_l2tp.inc +++ b/net/l2tp/src/etc/inc/plugins.inc.d/if_l2tp.inc @@ -1,7 +1,7 @@ + * Coypright (C) 2016-2018 Franco Fichtner * Copyright (C) 2008 Shrew Soft Inc. * Copyright (C) 2008 Ermal Luçi * Copyright (C) 2004 Scott Ullrich @@ -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;