From 76fa9adb236ba342311190a044f0439aab9425d7 Mon Sep 17 00:00:00 2001 From: Ermal Date: Tue, 9 Sep 2014 17:28:39 +0200 Subject: Blah unconditionally set rightsourceip per https://forum.pfsense.org/index.php?topic=80300.0 Until pools can be supported properly. --- etc/inc/vpn.inc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/etc/inc/vpn.inc b/etc/inc/vpn.inc index 0a9ce06..3f4cb76 100644 --- a/etc/inc/vpn.inc +++ b/etc/inc/vpn.inc @@ -586,8 +586,11 @@ EOD; if ($ph1ent['lifetime']) $ikelifeline = "ikelifetime = {$ph1ent['lifetime']}s"; - $authentication = ""; $rightsourceip = NULL; + if (!empty($a_client['pool_address'])) + $rightsourceip = "\trightsourceip = {$a_client['pool_address']}/{$a_client['pool_netbits']}\n"; + + $authentication = ""; switch ($ph1ent['authentication_method']) { case 'xauth_rsa_server': $authentication = "leftauth = pubkey\n\trightauth = pubkey"; @@ -596,8 +599,6 @@ EOD; case 'xauth_psk_server': $authentication = "leftauth = psk\n\trightauth = psk"; $authentication .= "\n\trightauth2 = xauth-generic"; - if (!empty($a_client['pool_address'])) - $rightsourceip = "\trightsourceip = {$a_client['pool_address']}/{$a_client['pool_netbits']}\n"; break; case 'pre_shared_key': $authentication = "leftauth = psk\n\trightauth = psk"; -- cgit v1.1