Patchwork how to configure WEP with shared password

login
register
mail settings
Submitter Li Jin
Date Sept. 26, 2013, 4:50 p.m.
Message ID <7CA823477D31914DAAAAAE68923521852AD62C78@SJEXCHMB09.corp.ad.broadcom.com>
Download mbox | patch
Permalink /patch/278228/
State Not Applicable
Headers show

Comments

Li Jin - Sept. 26, 2013, 4:50 p.m.
Hello Jouni,

Thanks for your reply!

I tried the following configuration without HT capability specified. However the AP still shows up as OPEN. Anything else I might missed?

interface=wlan0
ctrl_interface=/opt/wifi/hostapd
ssid=Android
channel=6
auth_algs=2
wep_default_key=0
wep_key0=123456789a
wep_key1="vwxyz"
wep_key2=0102030405060708090a0b0c0d
wep_key3=".2.4.6.8.0.23"
bridge=br0

Li

-----Original Message-----
From: hostap-bounces@lists.shmoo.com [mailto:hostap-bounces@lists.shmoo.com] On Behalf Of hostap-request@lists.shmoo.com
Sent: Monday, September 23, 2013 1:17 AM
To: hostap@lists.shmoo.com
Subject: HostAP Digest, Vol 125, Issue 23

Send HostAP mailing list submissions to
	hostap@lists.shmoo.com

To subscribe or unsubscribe via the World Wide Web, visit
	http://lists.shmoo.com/mailman/listinfo/hostap
or, via email, send a message with subject or body 'help' to
	hostap-request@lists.shmoo.com

You can reach the person managing the list at
	hostap-owner@lists.shmoo.com

When replying, please edit your Subject line so it is more specific
than "Re: Contents of HostAP digest..."


Today's Topics:

   1. where to put passphrase? (eMyListsDDg)
   2. Re: [PATCH] Handle EAGAIN in wpa_supplicant_ctrl_iface_send
      (Pontus Fuchs)
   3. Re: unable to clone (Jouni Malinen)
   4. Re: Stop wpa_supplicant from retrying authentication?
      (Jouni Malinen)
   5. Re: Group rekey with lots of stations. (Jouni Malinen)
   6. Re: [PATCH 1/2] supplicant: Use high-priority queue for
      management	packets. (Jouni Malinen)
   7. Re: how to configure WEP with shared password (Jouni Malinen)
   8. Re: [wpa_supplicant]does_not_build_without_md4 (Jouni Malinen)
   9. [PATCH V2] Handle EAGAIN in wpa_supplicant_ctrl_iface_send
      (Pontus Fuchs)


----------------------------------------------------------------------

Message: 1
Date: Sun, 22 Sep 2013 13:54:15 -0700
From: eMyListsDDg <emylistsddg@gmail.com>
Subject: where to put passphrase?
To: "hostap@lists.shmoo.com" <hostap@lists.shmoo.com>
Message-ID: <1683918645.20130922135415@gmail.com>
Content-Type: text/plain; charset=us-ascii

is it more secure to use a "wpa_passphrase= " entry in hostapd.conf or putting a passphrase in a "wpa_psk_file= " file ?






------------------------------

Message: 2
Date: Mon, 23 Sep 2013 08:51:05 +0200
From: Pontus Fuchs <pontus.fuchs@gmail.com>
Subject: Re: [PATCH] Handle EAGAIN in wpa_supplicant_ctrl_iface_send
To: Ben Greear <greearb@candelatech.com>
Cc: pontus2.fuchs@sonymobile.com, hostap@lists.shmoo.com
Message-ID: <523FE4D9.2030709@gmail.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

On 2013-09-20 18:05, Ben Greear wrote:
> On 09/20/2013 12:53 AM, Pontus Fuchs wrote:
>> Commit 4fdc8def changed the ctrl interface socket to be non-blocking,
>> but didn't update wpa_supplicant_ctrl_iface_send to handle EAGAIN.
>>
>> If a burst of events are sent, the socket queue can overflow and
>> sendmsg fails with EAGAIN. When this happens the monitor is silently
>> detached.
>
> Patch looks OK to me, but since sendmsg uses MSG_DONTWAIT, then it
> was always non-blocking and my patch should have not made things any
> worse...
>

Thanks Ben. Missed the MSG_DONTWAIT. I'll have to look for another 
reason to why this started to happen then. Anyway the patch is still 
valid. I'll update the commit msg.

Cheers,

Pontus




------------------------------

Message: 3
Date: Mon, 23 Sep 2013 10:42:22 +0300
From: Jouni Malinen <j@w1.fi>
Subject: Re: unable to clone
To: hostap@lists.shmoo.com
Message-ID: <20130923074222.GA10148@w1.fi>
Content-Type: text/plain; charset=us-ascii

On Mon, Sep 16, 2013 at 11:02:44PM +0530, Akhil Gaur wrote:
> I was trying to sync code from hostap site, using following command:
> 
> *git clone git://w1.fi/srv/git/hostap.git*
> 
> *git clone  http://w1.fi/hostap.git*
> Both the protocol failed. It looks like the hostap code sharing service is
> down.

git-daemon was in a bit confused state, but it should be fine now (I
restarted it last week). This would explain the git protocol not working
a week ago. However, HTTP option should have worked fine. Anyway, based
on a test, both protocols are working fine now.
Jouni Malinen - Sept. 26, 2013, 7:05 p.m.
On Thu, Sep 26, 2013 at 04:50:48PM +0000, Li Jin wrote:
> I tried the following configuration without HT capability specified. However the AP still shows up as OPEN. Anything else I might missed?
> 
> interface=wlan0
> ctrl_interface=/opt/wifi/hostapd
> ssid=Android
> channel=6
> auth_algs=2
> wep_default_key=0
> wep_key0=123456789a
> wep_key1="vwxyz"
> wep_key2=0102030405060708090a0b0c0d
> wep_key3=".2.4.6.8.0.23"
> bridge=br0

Are you sure the driver you are using supports Shared Key
authentication? This configuration works fine in my tests with the AP
coming up with Privacy=1 in Beacon/Probe Response frames and Shared Key
authentication with matching WEP key needed to complete authentication
exchange.

Patch

diff --git a/wpa_supplicant/ctrl_iface_unix.c b/wpa_supplicant/ctrl_iface_unix.c
index 49489d6..2c67b9c 100644
--- a/wpa_supplicant/ctrl_iface_unix.c
+++ b/wpa_supplicant/ctrl_iface_unix.c
@@ -623,14 +623,21 @@  static void wpa_supplicant_ctrl_iface_send(const char *ifname, int sock,
 			msg.msg_name = (void *) &dst->addr;
 			msg.msg_namelen = dst->addrlen;
 			if (sendmsg(sock, &msg, MSG_DONTWAIT) < 0) {
-				int _errno = errno;
+				int _errno = errno, detach = 0;
 				wpa_printf(MSG_INFO, "CTRL_IFACE monitor[%d]: "
 					   "%d - %s",
 					   idx, errno, strerror(errno));
 				dst->errors++;
-				if (dst->errors > 1000 ||
-				    (_errno != ENOBUFS && dst->errors > 10) ||
-				    _errno == ENOENT) {
+				if (dst->errors > 1000 || _errno == ENOENT)
+					detach = 1;
+				if (!(_errno == ENOBUFS || _errno == EAGAIN ||
+				    _errno == EWOULDBLOCK) && dst->errors > 10)
+					detach = 1;
+				if (detach) {
+					wpa_printf(MSG_ERROR, "CTRL_IFACE "
+						   "monitor[%d]: Too many "
+						   "errors. Detaching. ",
+						   idx);
 					wpa_supplicant_ctrl_iface_detach(
 						ctrl_dst, &dst->addr,
 						dst->addrlen);