Skip to content

Commit

Permalink
(ipsec, mobile) bug in writing out psk for mobile clients
Browse files Browse the repository at this point in the history
  • Loading branch information
AdSchellevis committed Sep 30, 2016
1 parent 57ab36d commit 76c66b2
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/etc/inc/ipsec.inc
Original file line number Diff line number Diff line change
Expand Up @@ -780,11 +780,10 @@ EOD;
/* XXX" Traffic selectors? */
$pskconf .= " : RSA {$ph1keyfile}\n";
} elseif (!empty($ph1ent['pre-shared-key'])) {
$myid_data = ipsec_find_id($ph1ent, "local");
$peerid_data = ipsec_find_id($ph1ent, "peer", $rgmap);
$myid = isset($ph1ent['mobile']) ? trim(ipsec_find_id($ph1ent, "local")) : "";
$peerid_data = isset($ph1ent['mobile']) ? "%any" : ipsec_find_id($ph1ent, "peer", $rgmap);

if (!empty($peerid_data)) {
$myid = isset($ph1ent['mobile']) ? trim($myid_data) . " " : "";
$pskconf .= $myid . trim($peerid_data) . " : PSK 0s" . base64_encode(trim($ph1ent['pre-shared-key'])) . "\n";
}
}
Expand Down

0 comments on commit 76c66b2

Please sign in to comment.