FS#26036 - [netcfg] 8021x: Allow scan_info when connected [PATCH]

Attached to Project: Arch Linux
Opened by Jouke Witteveen (jouke) - Friday, 16 September 2011, 14:08 GMT
Last edited by Rémy Oudompheng (remyoudompheng) - Saturday, 15 October 2011, 10:20 GMT
Task Type Bug Report
Category Arch Projects
Status Closed
Assigned To Rémy Oudompheng (remyoudompheng)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

I rewrote wifi-select to integrate more closely with netcfg:
https://github.com/joukewitteveen/wifi-menu

In order for wpa_supplicant_scan_info to not destroy a live connection, I wrote a little patch to 8021x. The patch actually does two things (I know, I'm a bad person):
1) Allow start_wpa to work without a configuration file
This makes start_wpa the only place the wpa_supplicant is started, which is a good thing.
2) Try to use a running wpa_supplicant in wpa_supplicant_scan_info
If this fails, one is started and later on stopped using the appropriate wrapper functions.

I would love to see my wifi-menu script included in the netcfg scripts someday too, but that is a different request.
This task depends upon

Closed by  Rémy Oudompheng (remyoudompheng)
Saturday, 15 October 2011, 10:20 GMT
Reason for closing:  Implemented
Additional comments about closing:  Will appear in netcfg 2.7
Comment by Rémy Oudompheng (remyoudompheng) - Sunday, 25 September 2011, 16:18 GMT
Can you explain why you call stop_wpa when SPAWNED_WPA==1 and what is the intended effect?
Comment by Jouke Witteveen (jouke) - Sunday, 25 September 2011, 18:41 GMT
When wpa_supplicant_scan_info is responsible for starting the wpa supplicant, it is intended to clean up after itself and also stop the supplicant.

The old behaviour was: always start the supplicant, always stop (kill) it.
The new behaviour is: use a running supplicant if possible, otherwise start and stop one for use in wpa_supplicant_scan_info.
Comment by Jouke Witteveen (jouke) - Monday, 26 September 2011, 10:06 GMT
$INTERFACE needs to be quoted in the patch. An updated patch is available on my github: https://raw.github.com/joukewitteveen/wifi-menu/master/8021x.patch

SPAWNED_WPA is set to 1 when start_wpa is successfully called. It might be good to make SPAWNED_WPA local and unset it beforehand, so that the test [[ "$SPAWNED_WPA" ]] really fails when a running supplicant was found (i.e. responded to the ping request).
Comment by Jouke Witteveen (jouke) - Thursday, 06 October 2011, 19:39 GMT
The patch is once again updated. The variable is now local and formatted according to the rest of the script.
Please apply the patch, so that I can announce wifi-menu.

The updated patch is available on my github: https://raw.github.com/joukewitteveen/wifi-menu/master/8021x.patch
Comment by Rémy Oudompheng (remyoudompheng) - Saturday, 15 October 2011, 10:20 GMT
Applied.

Loading...