Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#17271 - [netcfg] 2.5rc1 wpa-config profile ignored

Attached to Project: Arch Linux
Opened by Michele Scandale (skadotnet) - Tuesday, 24 November 2009, 16:26 GMT
Last edited by Thomas Bächler (brain0) - Tuesday, 13 July 2010, 17:26 GMT
Task Type Bug Report
Category Packages: Core
Status Closed
Assigned To James Rayner (iphitus)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
Using netcfg, net-auto-wireless daemon ignores profiles with SECURITY="wpa-config", causing the failure of loading the profile of a network that should be found from wpa-roaming service.

Additional info:
* config and/or log files etc.

wpa_supplicant.conf:
network={
ssid="STUDENTI"
key_mgmt=WPA-EAP
eap=TTLS
identity="myidentity"
password="123456"
ca_cert="/path/to/cert.pem"
phase2="auth=PAP"
}

myprofile:
CONNECTION="wireless"
DESCRIPTION="unibs"
SCAN="no"
QUIRKS=(prescan preessid)
INTERFACE="wlan0"
ESSID="STUDENTI"
SECURITY="wpa-config"
WPA_CONF="/etc/wpa_supplicant.conf"
IP="dhcp"


Steps to reproduce:
Run net-auto-wireless with a profile that use SECURITY="wpa-config"


The problem seems to be located in /usr/bin/netcfg-wpa_actiond on line 55,56:
# Exclude wpa-config, the wpa_conf is 'complete' and doesn't fit in this scheme
[[ $SECURITY == "wpa-config" ]] && exit 1

The script in this line ignore profiles with SECURITY="wpa-config", so the configuration of custom wpa_supplicant.conf isn't joined to the netcfg's generated one. So the wpa-roaming cannot work.

This task depends upon

Closed by  Thomas Bächler (brain0)
Tuesday, 13 July 2010, 17:26 GMT
Reason for closing:  Not a bug
Comment by Michele Scandale (skadotnet) - Tuesday, 24 November 2009, 16:27 GMT
A possible workaround is to replace the previous token (lines 46-62) with:
WPA_CONF="$(make_wpa_config_file $interface)"
WPA_E_CONF="$WPA_CONF"

for profile in $(list_profiles); do
echo $profile
(
load_profile $profile

[[ $CONNECTION != "wireless" ]] && exit 1
[[ $INTERFACE != $interface ]] && exit 1
if [ $SECURITY == "wpa-config" ]; then
cat $WPA_CONF | sed '/network={/,/}/!d' >> $WPA_E_CONF
exit 1
fi

config=$(make_wpa_config)

echo -e "network={ \n$config \nid_str=\"$profile\" \n}" >> $WPA_CONF
)
done


In this way the "network blocks" from custom wpa_supplicant.conf are added to netcfg's generated one and so parsed by wpa-roaming service.
Comment by James Rayner (iphitus) - Wednesday, 25 November 2009, 00:39 GMT
This was by design because wpa_supplicant configs can have a range of other options which may mess up the config and the id_str option needs to be added to the network block. This is why there is the wpa-configsection option.
Comment by Michele Scandale (skadotnet) - Thursday, 26 November 2009, 11:01 GMT
Ok, I understand the fact that wpa_supplicant.conf can have extra options that could be usefull, but I can't understand why in the auto-wireless daemon these profile with wpa-config are not used in roaming process, is an incomplete service in the way of current implementation. I think that a different way of manage wpa-config profiles is possible to obtain a full roaming support. What I've posted is a fast, dirty, weak workaround that works for my usage.
Comment by James Rayner (iphitus) - Saturday, 30 January 2010, 23:47 GMT
The above fix won't work, as it does not add the id_str section to the configurations. There is a different way of managing wpa-config profiles to obtain full roaming support, and that's the wpa-configsection type that has been added. See the example on the forums here:

http://bbs.archlinux.org/viewtopic.php?id=84796

Comment by Thomas Bächler (brain0) - Tuesday, 13 July 2010, 17:26 GMT
The design of net-auto-wireless mode design dictates that all network profiles are put into one big wpa_supplicant.conf. The wpa-config mode is not intended to work with this, and this won't change. If you want a custom configuration section that netcfg can't generate, use the new wpa-configsection mode:

For example:

CONNECTION="wireless"
DESCRIPTION="My very complex connection"
INTERFACE="wlan0"
SECURITY="wpa-configsection"
CONFIGSECTION='
ssid="somessid"
key_mgmt=WPA-EAP
proto=RSN
eap=TTLS
phase2="auth=PAP"
anonymous_identity="somethingpublic"
identity="somethingsecret"
password="somethingevenmoresecret"
ca_path="/etc/ssl/certs"
'
IP="dhcp"

Loading...