Fwd: wpa_supplicant in adhoc WPA-PSK mode

Ujjal Roy royujjal at gmail.com
Tue Jan 12 08:24:23 EST 2010


Hi Jouni Malinen,

I find the error during the compilation.

ibss_rsn.c: In function 'supp_ether_send':
ibss_rsn.c:54: warning: implicit declaration of function 
'wpa_drv_send_eapol'
ibss_rsn.c: In function 'supp_set_key':
ibss_rsn.c:125: warning: implicit declaration of function 'wpa_drv_set_key'
ibss_rsn.c: In function 'ibss_rsn_auth_init_group':
ibss_rsn.c:295: warning: assignment from incompatible pointer type
.........
ibss_rsn.o: In function `auth_set_key':
/root/Download/wpa_supplicant-0.7.0/wpa_supplicant/ibss_rsn.c:269: 
undefined reference to `wpa_drv_set_key'
ibss_rsn.o: In function `auth_send_eapol':
/root/Download/wpa_supplicant-0.7.0/wpa_supplicant/ibss_rsn.c:234: 
undefined reference to `wpa_drv_send_eapol'
ibss_rsn.o: In function `supp_ether_send':
/root/Download/wpa_supplicant-0.7.0/wpa_supplicant/ibss_rsn.c:54: 
undefined reference to `wpa_drv_send_eapol'
ibss_rsn.o: In function `supp_set_key':
/root/Download/wpa_supplicant-0.7.0/wpa_supplicant/ibss_rsn.c:125: 
undefined reference to `wpa_drv_set_key'
collect2: ld returned 1 exit status
make: *** [wpa_supplicant] Error 1

The following patch will solve this.
[root at asl-044 Desktop]# diff -Naur 
wpa_supplicant-0.7.0/wpa_supplicant/ibss_rsn.c 
../Download/wpa_supplicant-0.7.0/wpa_supplicant/ibss_rsn.c
--- wpa_supplicant-0.7.0/wpa_supplicant/ibss_rsn.c      2010-01-11 
12:27:08.000000000 +0530
+++ ../Download/wpa_supplicant-0.7.0/wpa_supplicant/ibss_rsn.c  
2009-11-22 02:19:02.000000000 +0530
@@ -21,7 +21,6 @@
 #include "wpa_ie.h"
 #include "../hostapd/wpa.h"
 #include "ibss_rsn.h"
-#include "driver_i.h"
 
 
 static void ibss_rsn_free(struct ibss_rsn_peer *peer)
@@ -236,14 +235,27 @@
 }
 
 
-static int auth_set_key(void *ctx, int vlan_id, wpa_alg alg,
+static int auth_set_key(void *ctx, int vlan_id, const char *_alg,
                        const u8 *addr, int idx, u8 *key,
                        size_t key_len)
 {
        struct ibss_rsn *ibss_rsn = ctx;
        u8 seq[6];
+       wpa_alg alg;
 
        os_memset(seq, 0, sizeof(seq));
+       if (os_strcmp(_alg, "none") == 0)
+               alg = WPA_ALG_NONE;
+       else if (os_strcmp(_alg, "WEP") == 0)
+               alg = WPA_ALG_WEP;
+       else if (os_strcmp(_alg, "TKIP") == 0)
+               alg = WPA_ALG_TKIP;
+       else if (os_strcmp(_alg, "CCMP") == 0)
+               alg = WPA_ALG_CCMP;
+       else if (os_strcmp(_alg, "IGTK") == 0)
+               alg = WPA_ALG_IGTK;
+       else
+               return -1;
 
        if (idx == 0) {
                /*


Thanks,
UjjaL
> On Thu, Jan 07, 2010 at 11:22:45PM +0530, Ujjal Roy wrote:
>   
>> I found error and fixed after adding the flag *CONFIG_IBSS_RSN* to the
>> .config file.
>>
>> Please find the attached ibss_rsn.c file, let me know if I am not wrong.
>>     
>
> Could you please send this in patch format or describe what exactly you
> changed? The file you sent is based on some unknown version of the
> ibss_rsn.c that does not match with the current development branch. The
> only clear change I noticed when comparing the files were in the
> sequence number length (from 6 to 8) which is not correct; the TSC and
> PN used by TKIP and CCMP are 6 octets.
>
>   

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.shmoo.com/pipermail/hostap/attachments/20100112/e8179482/attachment-0001.htm 


More information about the HostAP mailing list