pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/net/wpa_supplicant Update to wpa_supplicant-0.6.9



details:   https://anonhg.NetBSD.org/pkgsrc/rev/5460020f336b
branches:  trunk
changeset: 392827:5460020f336b
user:      roy <roy%pkgsrc.org@localhost>
date:      Mon May 11 22:47:04 2009 +0000

description:
Update to wpa_supplicant-0.6.9
Define NEW_FREEBSD_MLME_ASSOC so we work with newer NetBSD and FreeBSD

Changes from 0.6.7 include
 * fixed wired IEEE 802.1X auth

diffstat:

 net/wpa_supplicant/Makefile         |   10 +-
 net/wpa_supplicant/distinfo         |    9 +-
 net/wpa_supplicant/patches/patch-aa |  277 ------------------------------------
 3 files changed, 11 insertions(+), 285 deletions(-)

diffs (truncated from 325 to 300 lines):

diff -r 5962cb52dd6b -r 5460020f336b net/wpa_supplicant/Makefile
--- a/net/wpa_supplicant/Makefile       Mon May 11 22:43:50 2009 +0000
+++ b/net/wpa_supplicant/Makefile       Mon May 11 22:47:04 2009 +0000
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.3 2009/01/22 21:19:17 roy Exp $
+# $NetBSD: Makefile,v 1.4 2009/05/11 22:47:04 roy Exp $
 #
 
-DISTNAME=      wpa_supplicant-0.6.7
+DISTNAME=      wpa_supplicant-0.6.9
 CATEGORIES=    net
 MASTER_SITES=  http://hostap.epitest.fi/releases/
 
@@ -24,11 +24,15 @@
 
 .include "../../mk/bsd.options.mk"
 
+.if ${OPSYS} == "NetBSD" || ${OPSYS} == "FreeBSD"
+CPPFLAGS+=     -DNEW_FREEBSD_MLME_ASSOC
+.endif
+
 post-extract:
        ${CP} ${FILESDIR}/defconfig ${WRKSRC}/wpa_supplicant/.config
        ${CAT} ${FILESDIR}/defconfig.${OPSYS} >> ${WRKSRC}/wpa_supplicant/.config
 .if !empty(PKG_OPTIONS:Mdbus)
-       ${ECHO} xxCONFIG_CTRL_IFACE_DBUS=y >> ${WRKSRC}/wpa_supplicant/.config
+       ${ECHO} CONFIG_CTRL_IFACE_DBUS=y >> ${WRKSRC}/wpa_supplicant/.config
 .endif
 
 do-install:
diff -r 5962cb52dd6b -r 5460020f336b net/wpa_supplicant/distinfo
--- a/net/wpa_supplicant/distinfo       Mon May 11 22:43:50 2009 +0000
+++ b/net/wpa_supplicant/distinfo       Mon May 11 22:47:04 2009 +0000
@@ -1,6 +1,5 @@
-$NetBSD: distinfo,v 1.2 2009/01/22 21:19:17 roy Exp $
+$NetBSD: distinfo,v 1.3 2009/05/11 22:47:04 roy Exp $
 
-SHA1 (wpa_supplicant-0.6.7.tar.gz) = 8db7f95f700c942bb8f74d0e6e3c65bccaebd8a5
-RMD160 (wpa_supplicant-0.6.7.tar.gz) = a6850d2ae9823bba3dd93979a788d505477157bc
-Size (wpa_supplicant-0.6.7.tar.gz) = 1121560 bytes
-SHA1 (patch-aa) = fe22c4096983f7ab3f9e690abb69e324c228fb6c
+SHA1 (wpa_supplicant-0.6.9.tar.gz) = 3764f7bda4e5c87caac2b9e134cb59996f073f09
+RMD160 (wpa_supplicant-0.6.9.tar.gz) = e8427935b17c354c2654250501236dcd3f239307
+Size (wpa_supplicant-0.6.9.tar.gz) = 1178238 bytes
diff -r 5962cb52dd6b -r 5460020f336b net/wpa_supplicant/patches/patch-aa
--- a/net/wpa_supplicant/patches/patch-aa       Mon May 11 22:43:50 2009 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,277 +0,0 @@
-$NetBSD: patch-aa,v 1.1.1.1 2008/12/11 21:18:41 reed Exp $
-
---- src/drivers/driver_bsd.c.orig      2008-11-23 07:02:06.000000000 -0800
-+++ src/drivers/driver_bsd.c   2008-12-11 12:30:26.000000000 -0800
-@@ -21,7 +21,13 @@
- #include "ieee802_11_defs.h"
- 
- #include <net/if.h>
-+
-+#ifdef __NetBSD__
-+#include <net/if_ether.h>
-+#define COMPAT_FREEBSD_NET80211
-+#else
- #include <net/ethernet.h>
-+#endif
- 
- #include <net80211/ieee80211.h>
- #include <net80211/ieee80211_crypto.h>
-@@ -32,6 +38,7 @@
-       int     route;                  /* routing socket for events */
-       char    ifname[IFNAMSIZ+1];     /* interface name */
-       unsigned int ifindex;           /* interface index */
-+      int flags;                      /* interface flags */
-       void    *ctx;
-       int     prev_roaming;           /* roaming state to restore on deinit */
-       int     prev_privacy;           /* privacy state to restore on deinit */
-@@ -145,9 +152,18 @@
- wpa_driver_bsd_get_bssid(void *priv, u8 *bssid)
- {
-       struct wpa_driver_bsd_data *drv = priv;
-+#ifdef __NetBSD__
-+      struct ieee80211_bssid bs;
- 
-+      strncpy(bs.i_name, drv->ifname, sizeof(bs.i_name));
-+      if (ioctl(drv->sock, SIOCG80211BSSID, &bs) < 0)
-+              return -1;
-+      memcpy(bssid, bs.i_bssid, sizeof(bs.i_bssid));
-+      return 0;
-+#else
-       return get80211var(drv, IEEE80211_IOC_BSSID,
-               bssid, IEEE80211_ADDR_LEN) < 0 ? -1 : 0;
-+#endif
- }
- 
- #if 0
-@@ -155,6 +171,7 @@
- wpa_driver_bsd_set_bssid(void *priv, const char *bssid)
- {
-       struct wpa_driver_bsd_data *drv = priv;
-+      struct ieee80211_bssid bs;
- 
-       return set80211var(drv, IEEE80211_IOC_BSSID,
-               bssid, IEEE80211_ADDR_LEN);
-@@ -165,9 +182,22 @@
- wpa_driver_bsd_get_ssid(void *priv, u8 *ssid)
- {
-       struct wpa_driver_bsd_data *drv = priv;
-+#ifdef __NetBSD__
-+      struct ieee80211_nwid nwid;
-+      struct ifreq ifr;
- 
-+      memset(&ifr, 0, sizeof(ifr));
-+      strncpy(ifr.ifr_name, drv->ifname, sizeof(ifr.ifr_name));
-+      ifr.ifr_data = (void *)&nwid;
-+      if (ioctl(drv->sock, SIOCG80211NWID, &ifr) < 0 ||
-+          nwid.i_len > IEEE80211_NWID_LEN)
-+              return -1;
-+      memcpy(ssid, nwid.i_nwid, nwid.i_len);
-+      return nwid.i_len;
-+#else
-       return get80211var(drv, IEEE80211_IOC_SSID,
-               ssid, IEEE80211_NWID_LEN);
-+#endif
- }
- 
- static int
-@@ -175,8 +205,19 @@
-                            size_t ssid_len)
- {
-       struct wpa_driver_bsd_data *drv = priv;
--
-+#ifdef __NetBSD__
-+      struct ieee80211_nwid nwid;
-+      struct ifreq ifr;
-+ 
-+      memcpy(nwid.i_nwid, ssid, ssid_len);
-+      nwid.i_len = ssid_len;
-+      memset(&ifr, 0, sizeof(ifr));
-+      (void)strncpy(ifr.ifr_name, drv->ifname, sizeof(ifr.ifr_name));
-+      ifr.ifr_data = (void *)&nwid;
-+      return ioctl(drv->sock, SIOCS80211NWID, &ifr);
-+#else
-       return set80211var(drv, IEEE80211_IOC_SSID, ssid, ssid_len);
-+#endif
- }
- 
- static int
-@@ -301,13 +342,23 @@
-       if (bcmp(addr, "\xff\xff\xff\xff\xff\xff", IEEE80211_ADDR_LEN) == 0) {
-               wk.ik_flags |= IEEE80211_KEY_GROUP;
-               wk.ik_keyix = key_idx;
-+#ifdef __NetBSD__
-+              if (set_tx)
-+                      wk.ik_flags |= IEEE80211_KEY_DEFAULT;
-+      } else
-+              wk.ik_keyix = IEEE80211_KEYIX_NONE;
-+#else
-       } else {
-               wk.ik_keyix = (key_idx == 0 ? IEEE80211_KEYIX_NONE : key_idx);
-       }
-       if (wk.ik_keyix != IEEE80211_KEYIX_NONE && set_tx)
-               wk.ik_flags |= IEEE80211_KEY_DEFAULT;
-+#endif
-       wk.ik_keylen = key_len;
-       os_memcpy(&wk.ik_keyrsc, seq, seq_len);
-+#ifdef __NetBSD__
-+      wk.ik_keyrsc = le64toh(wk.ik_keyrsc);
-+#endif
-       os_memcpy(wk.ik_keydata, key, key_len);
- 
-       return set80211var(drv, IEEE80211_IOC_WPAKEY, &wk, sizeof(wk));
-@@ -380,10 +431,12 @@
-       /* XXX error handling is wrong but unclear what to do... */
-       if (wpa_driver_bsd_set_wpa_ie(drv, params->wpa_ie, params->wpa_ie_len) < 0)
-               return -1;
-+#ifndef __NetBSD
- #ifndef NEW_FREEBSD_MLME_ASSOC
-       if (wpa_driver_bsd_set_ssid(drv, params->ssid, params->ssid_len) < 0)
-               return -1;
- #endif
-+#endif
- 
-       privacy = !(params->pairwise_suite == CIPHER_NONE &&
-           params->group_suite == CIPHER_NONE &&
-@@ -449,7 +502,12 @@
- }
- 
- #include <net/route.h>
-+#if __FreeBSD__
- #include <net80211/ieee80211_freebsd.h>
-+#endif
-+#if __NetBSD__
-+#include <net80211/ieee80211_netbsd.h>
-+#endif
- 
- static void
- wpa_driver_bsd_event_receive(int sock, void *ctx, void *sock_ctx)
-@@ -487,15 +545,23 @@
-               switch (ifan->ifan_what) {
-               case IFAN_DEPARTURE:
-                       event.interface_status.ievent = EVENT_INTERFACE_REMOVED;
-+#ifdef __NetBSD__
-+                      break;
-+#endif
-               default:
-+#ifdef __NetBSD__
-+                      event.interface_status.ievent = EVENT_INTERFACE_ADDED;
-+                      break;
-+#else
-                       return;
-+#endif
-               }
--              wpa_printf(MSG_DEBUG, "RTM_IFANNOUNCE: Interface '%s' %s",
-+              wpa_printf(MSG_DEBUG, "RTM_IFANNOUNCE: Interface '%s' %s (%d)",
-                          event.interface_status.ifname,
-                          ifan->ifan_what == IFAN_DEPARTURE ?
--                              "removed" : "added");
-+                              "removed" : "added", ifan->ifan_what);
-               wpa_supplicant_event(ctx, EVENT_INTERFACE_STATUS, &event);
--              break;
-+              return;
-       case RTM_IEEE80211:
-               ifan = (struct if_announcemsghdr *) rtm;
-               if (ifan->ifan_index != drv->ifindex)
-@@ -503,15 +569,23 @@
-               switch (ifan->ifan_what) {
-               case RTM_IEEE80211_ASSOC:
-               case RTM_IEEE80211_REASSOC:
-+                      wpa_printf(MSG_DEBUG, "RTM_IEEE80211: (re)assoc (%d)",
-+                          ifan->ifan_what);
-                       wpa_supplicant_event(ctx, EVENT_ASSOC, NULL);
-                       break;
-               case RTM_IEEE80211_DISASSOC:
-+                      wpa_printf(MSG_DEBUG, "RTM_IEEE80211: disassoc (%d)",
-+                          ifan->ifan_what);
-                       wpa_supplicant_event(ctx, EVENT_DISASSOC, NULL);
-                       break;
-               case RTM_IEEE80211_SCAN:
-+                      wpa_printf(MSG_DEBUG, "RTM_IEEE80211: scan result (%d)",
-+                          ifan->ifan_what);
-                       wpa_supplicant_event(ctx, EVENT_SCAN_RESULTS, NULL);
-                       break;
-               case RTM_IEEE80211_REPLAY:
-+                      wpa_printf(MSG_DEBUG, "RTM_IEEE80211: replay (%d)",
-+                          ifan->ifan_what);
-                       /* ignore */
-                       break;
-               case RTM_IEEE80211_MICHAEL:
-@@ -527,20 +601,48 @@
-                       wpa_supplicant_event(ctx, EVENT_MICHAEL_MIC_FAILURE,
-                               &event);
-                       break;
-+              default:
-+                      wpa_printf(MSG_DEBUG, "RTM_IEEE80211: ??? (%d)",
-+                          ifan->ifan_what);
-+                      break;
-               }
-               break;
-       case RTM_IFINFO:
-               ifm = (struct if_msghdr *) rtm;
-               if (ifm->ifm_index != drv->ifindex)
-                       break;
--              if ((rtm->rtm_flags & RTF_UP) == 0) {
-+              if ((ifm->ifm_flags & IFF_UP) == 0 &&
-+                  (drv->flags & IFF_UP) != 0) {
-                       strlcpy(event.interface_status.ifname, drv->ifname,
-                               sizeof(event.interface_status.ifname));
-                       event.interface_status.ievent = EVENT_INTERFACE_REMOVED;
-                       wpa_printf(MSG_DEBUG, "RTM_IFINFO: Interface '%s' DOWN",
-                                  event.interface_status.ifname);
-                       wpa_supplicant_event(ctx, EVENT_INTERFACE_STATUS, &event);
-+#ifdef __NetBSD__
-+              } else if ((ifm->ifm_flags & IFF_UP) != 0 &&
-+                  (drv->flags & IFF_UP) == 0) {
-+                      strlcpy(event.interface_status.ifname, drv->ifname,
-+                              sizeof(event.interface_status.ifname));
-+                      event.interface_status.ievent = EVENT_INTERFACE_ADDED;
-+                      wpa_printf(MSG_DEBUG, "RTM_IFINFO: Interface '%s' UP",
-+                                 event.interface_status.ifname);
-+                      wpa_supplicant_event(ctx, EVENT_INTERFACE_STATUS, &event);
-+              } else {
-+                      wpa_printf(MSG_DEBUG, "RTM_IFINFO: Interface '%s' "
-+                          "if=%x drv=%x", event.interface_status.ifname,
-+                           ifm->ifm_flags, drv->flags);
-+#endif
-               }
-+#ifdef __NetBSD__
-+              drv->flags = ifm->ifm_flags;
-+              break;
-+      case RTM_LOSING:
-+              wpa_printf(MSG_DEBUG, "RTM_LOSING: %d", rtm->rtm_type);
-+              break;
-+      default:
-+              wpa_printf(MSG_DEBUG, "RTM_???: %d", rtm->rtm_type);
-+#endif
-               break;
-       }
- }
-@@ -632,8 +734,8 @@
-               wsr->ssid_len = sr->isr_ssid_len;
-               wsr->freq = sr->isr_freq;
-               wsr->noise = sr->isr_noise;



Home | Main Index | Thread Index | Old Index