Commit c909149e authored by Paolo Velati's avatar Paolo Velati Committed by Franco Fichtner

host-uniq settings in mpd.conf corrected

fixed command in pppoe configuration, connected to pull request #1730 https://github.com/opnsense/core/pull/1730
parent 6da18366
...@@ -1580,11 +1580,12 @@ EOD; ...@@ -1580,11 +1580,12 @@ EOD;
} }
} elseif ($ppp['type'] == "pppoe") { } elseif ($ppp['type'] == "pppoe") {
$provider = isset($ppp['provider']) ? $ppp['provider'] : ""; $provider = isset($ppp['provider']) ? $ppp['provider'] : "";
$mpdconf_arr[] = "set pppoe service \"{$provider}\""; $hostuniq = '';
$mpdconf_arr[] = "set pppoe iface {$port}";
if (!empty($ppp['hostuniq'])) { if (!empty($ppp['hostuniq'])) {
$mpdconf_arr[] = "set host-uniq \"{$ppp['hostuniq']}|\""; $hostuniq = '0x' . array_shift(unpack('H*', $ppp['hostuniq'])) . '|';
} }
$mpdconf_arr[] = "set pppoe service \"{$hostuniq}{$provider}\"";
$mpdconf_arr[] = "set pppoe iface {$port}";
} elseif ($ppp['type'] == "pptp" || $ppp['type'] == "l2tp") { } elseif ($ppp['type'] == "pptp" || $ppp['type'] == "l2tp") {
$mpdconf_arr[] = "set {$ppp['type']} self {$localips[$pid]}"; $mpdconf_arr[] = "set {$ppp['type']} self {$localips[$pid]}";
$mpdconf_arr[] = "set {$ppp['type']} peer {$gateways[$pid]}"; $mpdconf_arr[] = "set {$ppp['type']} peer {$gateways[$pid]}";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment