diff options
author | Daniil Baturin <daniil@vyos.io> | 2024-09-19 16:29:49 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-19 16:29:49 +0100 |
commit | 1909f2df8017b084dd28e8e05cc266076b2a9980 (patch) | |
tree | 4cc2a37f8a4d390ff5b8095cf289169a9182e599 /data/templates | |
parent | 0444795e3798f2ec51e40bef67a0920f892769b8 (diff) | |
parent | b76a5c94cfeb1a7bad8ac5c818ed3065a4d32210 (diff) | |
download | vyos-1x-1909f2df8017b084dd28e8e05cc266076b2a9980.tar.gz vyos-1x-1909f2df8017b084dd28e8e05cc266076b2a9980.zip |
Merge pull request #4085 from vyos/mergify/bp/circinus/pr-3711
T6496: Added support for WPA-Enterprise client-mode (backport #3711)
Diffstat (limited to 'data/templates')
-rw-r--r-- | data/templates/wifi/wpa_supplicant.conf.j2 | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/data/templates/wifi/wpa_supplicant.conf.j2 b/data/templates/wifi/wpa_supplicant.conf.j2 index ac857a04a..04088e1ad 100644 --- a/data/templates/wifi/wpa_supplicant.conf.j2 +++ b/data/templates/wifi/wpa_supplicant.conf.j2 @@ -61,6 +61,8 @@ network={ # If not set, this defaults to: WPA-PSK WPA-EAP {% if security.wpa.mode is vyos_defined('wpa3') %} key_mgmt=SAE +{% elif security.wpa.username is vyos_defined %} + key_mgmt=WPA-EAP WPA-EAP-SHA256 {% else %} key_mgmt=WPA-PSK WPA-PSK-SHA256 {% endif %} @@ -76,8 +78,18 @@ network={ # from ASCII passphrase. This process uses lot of CPU and wpa_supplicant # startup and reconfiguration time can be optimized by generating the PSK only # only when the passphrase or SSID has actually changed. +{% if security.wpa.username is vyos_defined %} + identity="{{ security.wpa.username }}" + password="{{ security.wpa.passphrase }}" + phase2="auth=MSCHAPV2" + eap=PEAP +{% elif security.wpa.username is not vyos_defined %} psk="{{ security.wpa.passphrase }}" -{% else %} +{% else %} key_mgmt=NONE +{% endif %} +{% endif %} +{% if bssid is vyos_defined %} + bssid={{ bssid }} {% endif %} } |