Opened 12 years ago

Last modified 3 weeks ago

#8850 in-progress enhancement

wpa_supplicant and WPA2 enterprise support

Reported by: edglex Owned by: nephele
Priority: normal Milestone: Unscheduled
Component: Network & Internet/Wireless Version: R1/Development
Keywords: Cc:
Blocked By: Blocking: #14741
Platform: All

Description

Haiku wireless does not support WPA2 enterprise for authenticating with networks.

wpa_supplicant should support this, but I don't think the functionality is exposed to the user anywhere.

I'm happy to do testing.

Attachments (6)

eap_addition.diff (711 bytes ) - added by kallisti5 11 years ago.
v1
haiku-wapenter.diff (2.5 KB ) - added by kallisti5 11 years ago.
net server changes v1
0001-eap-Add-initial-EAP-support-for-Haiku.patch (3.0 KB ) - added by kallisti5 11 years ago.
wpa_supplicant change v1
0002-eap-Drop-802_1X-naming.-Use-EAP.patch (2.0 KB ) - added by kallisti5 11 years ago.
wpa_supplicant change v1
0003-eap-Clean-up-EAP-define-naming.patch (1.9 KB ) - added by kallisti5 11 years ago.
wpa_supplicant change v1
0004-eap-Add-initial-option-to-dialog.patch (3.3 KB ) - added by kallisti5 11 years ago.
wpa_supplicant change v1

Download all attachments as: .zip

Change History (32)

comment:1 by edglex, 12 years ago

Platform: Allx86

comment:2 by edglex, 12 years ago

Keywords: wpa_supplicant added

comment:3 by phoudoin, 12 years ago

Platform: x86All

No reason to make this enhancement x86-only...

comment:4 by kallisti5, 11 years ago

It looks like we should be passing a potential user to the wpa_supplicant here: http://cgit.haiku-os.org/haiku/tree/src/servers/net/NetServer.cpp#n1151

I'm not sure where we filter the passed BMessage for wpa_supplicant though... unless we have code in upstream wpa_supplicant.

comment:5 by kallisti5, 11 years ago

aah.. there is a 2500 line patch in haikuports for wpa_supplicant.. yikes.

We may want to track this in a github repo as a fork... thoughts?

comment:6 by mmlr, 11 years ago

Yes that's what I did:

https://github.com/mmlr/wpa_supplicant-haiku

Please feel free to update the port source if I forgot to do so as I don't currently have the time.

comment:7 by korli, 11 years ago

In theory, the GUI for wpa_supplicant should use the control library, provided by a build feature and reside in the Haiku tree. A package for wpa_supplicant could then be more manageable as a patch.

in reply to:  7 comment:8 by kallisti5, 11 years ago

mmlr: i'm attaching a diff for Haiku adding EAP. Would you take a quick look and see if it looks sane?

I've also added some basic EAP code to a fork of your wpa_supplcant branch:

https://github.com/kallisti5/wpa_supplicant-haiku

by kallisti5, 11 years ago

Attachment: eap_addition.diff added

v1

comment:9 by kallisti5, 11 years ago

patch: 01

comment:10 by mmlr, 11 years ago

I would prefer if we could stick with the non-abbreviated names, so at least:

B_NETWORK_ENCAP_NONE -> B_NETWORK_ENCAPSULATION_NONE

But since this is also EAP specific I would convey that in the name as well:

B_NETWORK_ENCAPSULATION_NONE -> B_NETWORK_EAP_ENCAPSULATION_NONE

I know it is rather verbose, but I personally always prefer the version that doesn't leave room for guessing.

comment:11 by kallisti5, 11 years ago

mmlr:

The code in your branch doesn't seem to build at all.. thoughts? Lots of incorrect headers from ../src/drivers/driver_bsd.c

building with:

CFLAGS="-MMD -O2 -Wall -I/Data/Projects/haiku/headers/private/net" make wpa_supplicant

comment:12 by kallisti5, 11 years ago

got a little further thanks to jessicah.. pastebin of current issue here:

http://pastebin.com/srUbq7AG

lots of:

/Data/Projects/haiku/src/libs/compat/freebsd_wlan/net80211/ieee80211.h:70:3: error: conflicting declaration 'ieee80211_frame __packed'
/Data/Projects/haiku/src/libs/compat/freebsd_wlan/net80211/ieee80211.h:48:3: error: '__packed' has a previous declaration as 'ieee80211_plcp_hdr __packed'

Building like:

CFLAGS="-MMD -O2 -Wall -I/Data/Projects/haiku/headers/private/net -I/Data/Projects/haiku/src/libs/compat/freebsd_wlan" make wpa_supplicant

comment:13 by kallisti5, 11 years ago

Got a little further.. I have a feeling you are wedging this into our tree somehow :D maybe an optional build package isn't the best format at the moment. It seems like this may live happier in-tree.

http://pastebin.com/ZF1H2u5H

/Data/Projects/wpa_supplicant-haiku/wpa_supplicant> CFLAGS="-MMD -Wall -I/Data/Projects/haiku/headers/private/net -I/Data/Projects/haiku/src/libs/compat/freebsd_wlan -I/Data/Projects/haiku/src/libs/compat/freebsd_network/compat/ -I/Data/Projects/haiku/headers/private/ -I /Data/Projects/haiku/headers/private/kernel/ -I/Data/Projects/haiku/build/config_headers/ -D_KERNEL=1 -DFBSD_DRIVER=1 -Dpacked=attribute\(\(packed\)\)" make wpa_supplicant

comment:14 by mmlr, 11 years ago

You don't need to do it that way. The provided .config already sets up the CFLAGS (and the rest of the config) accordingly, you just need to adjust the paths so they points to your Haiku source. Then just build with make wpa_supplicant.

by kallisti5, 11 years ago

Attachment: haiku-wapenter.diff added

net server changes v1

by kallisti5, 11 years ago

wpa_supplicant change v1

by kallisti5, 11 years ago

wpa_supplicant change v1

by kallisti5, 11 years ago

wpa_supplicant change v1

by kallisti5, 11 years ago

wpa_supplicant change v1

comment:15 by kallisti5, 11 years ago

attaching the work I have so far... still pretty rough and doesn't connect yet. GUI needs work (hide username if wpa enterprise isn't selected)

For the moment, these changes do break wifi... just a word of warning :)

comment:16 by MatejHorvat, 7 years ago

I think implementing this functionality would be a good GSoC task. Without it, it's impossible to connect to Eduroam, which could be a deal-breaker for students who want to natively run Haiku on their laptops.

comment:17 by axeld, 7 years ago

Owner: changed from axeld to nobody
Status: newassigned

comment:18 by waddlesplash, 6 years ago

Now that we are on wpa_supplicant 2.7 and the build process is much smoother, kallisti5 -- if you'd like to go back to this, it's probably possible.

comment:19 by waddlesplash, 5 years ago

Blocking: 14741 added

comment:20 by waddlesplash, 5 years ago

Milestone: R1Unscheduled

comment:21 by wilsonjwcsu, 20 months ago

Any progress on this? Even if the GUI doesn't expose these settings and we still had to edit the wpa_supplicant.conf file, it would help. Lots of universities require wpa enterprise to access their campus network.

comment:22 by nephele, 19 months ago

Keywords: WPA enterprise wpa_supplicant removed
Owner: changed from nobody to nephele
Status: assignedin-progress

I've rebased kallisti5's patches.

as he said wifi indeed breaks :D

I'll try to investigate and fix it.

comment:23 by kallisti5, 19 months ago

whew.. I did these patches a long time ago. I think that highlights how badly these updates are needed. :-)

I don't remember very much from these attempts other than what's in the ticket... but definitely feel free to rework these as you see fit if it helps. No need to credit me in any way.

comment:24 by nephele, 15 months ago

Hey, I've submitted a commit to test if you have time. I don't have a wpa2 enterprise AP unfortunately

https://github.com/haiku/wpa_supplicant/pull/6

comment:25 by nephele, 15 months ago

(I think this also needs the net_server change above)

comment:26 by marcoapc, 3 weeks ago

It is possible to create an access point and test:

https://www.bordergate.co.uk/wpa2-enteprise-access-point-with-linux/

Note: See TracTickets for help on using tickets.