Source-Changes-HG archive

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

[src/trunk]: src/external/bsd/wpa/dist merge conflicts



details:   https://anonhg.NetBSD.org/src/rev/a75e48af592d
branches:  trunk
changeset: 325674:a75e48af592d
user:      christos <christos%NetBSD.org@localhost>
date:      Fri Jan 03 02:08:16 2014 +0000

description:
merge conflicts

diffstat:

 external/bsd/wpa/dist/hostapd/hostapd_cli.c                                         |   164 +-
 external/bsd/wpa/dist/src/ap/wpa_auth.c                                             |   427 +-
 external/bsd/wpa/dist/src/crypto/md5-non-fips.c                                     |   113 -
 external/bsd/wpa/dist/src/drivers/Apple80211.h                                      |   156 -
 external/bsd/wpa/dist/src/drivers/MobileApple80211.c                                |   189 -
 external/bsd/wpa/dist/src/drivers/MobileApple80211.h                                |    43 -
 external/bsd/wpa/dist/src/drivers/driver_broadcom.c                                 |   599 ---
 external/bsd/wpa/dist/src/drivers/driver_bsd.c                                      |    22 +-
 external/bsd/wpa/dist/src/drivers/driver_iphone.m                                   |   466 --
 external/bsd/wpa/dist/src/drivers/driver_osx.m                                      |   459 --
 external/bsd/wpa/dist/src/drivers/driver_ralink.c                                   |  1498 -------
 external/bsd/wpa/dist/src/drivers/driver_ralink.h                                   |   383 --
 external/bsd/wpa/dist/src/drivers/driver_test.c                                     |    91 +-
 external/bsd/wpa/dist/src/drivers/wireless_copy.h                                   |  1183 ------
 external/bsd/wpa/dist/src/eap_server/eap_server_tls_common.c                        |    49 +-
 external/bsd/wpa/dist/src/l2_packet/l2_packet_freebsd.c                             |    10 +-
 external/bsd/wpa/dist/src/utils/eloop.c                                             |   265 +-
 external/bsd/wpa/dist/src/utils/os.h                                                |    37 +-
 external/bsd/wpa/dist/src/utils/radiotap.h                                          |     3 +-
 external/bsd/wpa/dist/src/utils/trace.h                                             |    10 +-
 external/bsd/wpa/dist/src/wps/wps_nfc.c                                             |   117 -
 external/bsd/wpa/dist/src/wps/wps_nfc_pn531.c                                       |   113 -
 external/bsd/wpa/dist/src/wps/wps_ufd.c                                             |   235 -
 external/bsd/wpa/dist/wpa_supplicant/main_symbian.cpp                               |    48 -
 external/bsd/wpa/dist/wpa_supplicant/symbian/README.symbian                         |    24 -
 external/bsd/wpa/dist/wpa_supplicant/symbian/bld.inf                                |     8 -
 external/bsd/wpa/dist/wpa_supplicant/symbian/wpa_supplicant.mmp                     |    38 -
 external/bsd/wpa/dist/wpa_supplicant/systemd/wpa_supplicant-nl80211@.service.in     |    13 -
 external/bsd/wpa/dist/wpa_supplicant/systemd/wpa_supplicant-wired@.service.in       |    13 -
 external/bsd/wpa/dist/wpa_supplicant/systemd/wpa_supplicant@.service.in             |    13 -
 external/bsd/wpa/dist/wpa_supplicant/wpa_cli.c                                      |  1881 ++++-----
 external/bsd/wpa/dist/wpa_supplicant/wpa_gui/.gitignore                             |     3 -
 external/bsd/wpa/dist/wpa_supplicant/wpa_gui/eventhistory.ui                        |   125 -
 external/bsd/wpa/dist/wpa_supplicant/wpa_gui/eventhistory.ui.h                      |    41 -
 external/bsd/wpa/dist/wpa_supplicant/wpa_gui/main.cpp                               |    30 -
 external/bsd/wpa/dist/wpa_supplicant/wpa_gui/networkconfig.ui                       |   475 --
 external/bsd/wpa/dist/wpa_supplicant/wpa_gui/networkconfig.ui.h                     |   552 --
 external/bsd/wpa/dist/wpa_supplicant/wpa_gui/scanresults.ui                         |   179 -
 external/bsd/wpa/dist/wpa_supplicant/wpa_gui/scanresults.ui.h                       |   101 -
 external/bsd/wpa/dist/wpa_supplicant/wpa_gui/setup-mingw-cross-compiling            |    11 -
 external/bsd/wpa/dist/wpa_supplicant/wpa_gui/userdatarequest.ui                     |   163 -
 external/bsd/wpa/dist/wpa_supplicant/wpa_gui/userdatarequest.ui.h                   |    72 -
 external/bsd/wpa/dist/wpa_supplicant/wpa_gui/wpa_gui.pro                            |    50 -
 external/bsd/wpa/dist/wpa_supplicant/wpa_gui/wpagui.ui                              |   471 --
 external/bsd/wpa/dist/wpa_supplicant/wpa_gui/wpagui.ui.h                            |   730 ---
 external/bsd/wpa/dist/wpa_supplicant/wpa_gui/wpamsg.h                               |    34 -
 external/bsd/wpa/dist/wpa_supplicant/wpa_supplicant.nsi                             |   112 -
 external/bsd/wpa/dist/wpa_supplicant/xcode/wpa_supplicant.xcodeproj/project.pbxproj |   513 --
 48 files changed, 1547 insertions(+), 10785 deletions(-)

diffs (truncated from 14271 to 300 lines):

diff -r e517c535bdf9 -r a75e48af592d external/bsd/wpa/dist/hostapd/hostapd_cli.c
--- a/external/bsd/wpa/dist/hostapd/hostapd_cli.c       Fri Jan 03 02:07:31 2014 +0000
+++ b/external/bsd/wpa/dist/hostapd/hostapd_cli.c       Fri Jan 03 02:08:16 2014 +0000
@@ -1,15 +1,9 @@
 /*
  * hostapd - command line interface for hostapd daemon
- * Copyright (c) 2004-2011, Jouni Malinen <j%w1.fi@localhost>
+ * Copyright (c) 2004-2012, Jouni Malinen <j%w1.fi@localhost>
  *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- *
- * Alternatively, this software may be distributed under the terms of BSD
- * license.
- *
- * See README and COPYING for more details.
+ * This software may be distributed under the terms of the BSD license.
+ * See README for more details.
  */
 
 #include "includes.h"
@@ -28,28 +22,11 @@
 
 
 static const char *hostapd_cli_license =
-"This program is free software. You can distribute it and/or modify it\n"
-"under the terms of the GNU General Public License version 2.\n"
-"\n"
-"Alternatively, this software may be distributed under the terms of the\n"
-"BSD license. See README and COPYING for more details.\n";
+"This software may be distributed under the terms of the BSD license.\n"
+"See README for more details.\n";
 
 static const char *hostapd_cli_full_license =
-"This program is free software; you can redistribute it and/or modify\n"
-"it under the terms of the GNU General Public License version 2 as\n"
-"published by the Free Software Foundation.\n"
-"\n"
-"This program is distributed in the hope that it will be useful,\n"
-"but WITHOUT ANY WARRANTY; without even the implied warranty of\n"
-"MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n"
-"GNU General Public License for more details.\n"
-"\n"
-"You should have received a copy of the GNU General Public License\n"
-"along with this program; if not, write to the Free Software\n"
-"Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA\n"
-"\n"
-"Alternatively, this software may be distributed under the terms of the\n"
-"BSD license.\n"
+"This software may be distributed under the terms of the BSD license.\n"
 "\n"
 "Redistribution and use in source and binary forms, with or without\n"
 "modification, are permitted provided that the following conditions are\n"
@@ -94,9 +71,12 @@
 "   wps_pin <uuid> <pin> [timeout] [addr]  add WPS Enrollee PIN\n"
 "   wps_check_pin <PIN>  verify PIN checksum\n"
 "   wps_pbc              indicate button pushed to initiate PBC\n"
-#ifdef CONFIG_WPS_OOB
-"   wps_oob <type> <path> <method>  use WPS with out-of-band (UFD)\n"
-#endif /* CONFIG_WPS_OOB */
+"   wps_cancel           cancel the pending WPS operation\n"
+#ifdef CONFIG_WPS_NFC
+"   wps_nfc_tag_read <hexdump>  report read NFC tag with WPS data\n"
+"   wps_nfc_config_token <WPS/NDEF>  build NFC configuration token\n"
+"   wps_nfc_token <WPS/NDEF/enable/disable>  manager NFC password token\n"
+#endif /* CONFIG_WPS_NFC */
 "   wps_ap_pin <cmd> [params..]  enable/disable AP PIN\n"
 "   wps_config <SSID> <auth> <encr> <key>  configure AP\n"
 #endif /* CONFIG_WPS */
@@ -415,38 +395,82 @@
 }
 
 
-#ifdef CONFIG_WPS_OOB
-static int hostapd_cli_cmd_wps_oob(struct wpa_ctrl *ctrl, int argc,
-                                  char *argv[])
+static int hostapd_cli_cmd_wps_cancel(struct wpa_ctrl *ctrl, int argc,
+                                     char *argv[])
 {
-       char cmd[256];
-       int res;
+       return wpa_ctrl_command(ctrl, "WPS_CANCEL");
+}
+
 
-       if (argc != 3 && argc != 4) {
-               printf("Invalid WPS_OOB command: need three or four "
-                      "arguments:\n"
-                      "- DEV_TYPE: use 'ufd' or 'nfc'\n"
-                      "- PATH: path of OOB device like '/mnt'\n"
-                      "- METHOD: OOB method 'pin-e' or 'pin-r', "
-                      "'cred'\n"
-                      "- DEV_NAME: (only for NFC) device name like "
-                      "'pn531'\n");
+#ifdef CONFIG_WPS_NFC
+static int hostapd_cli_cmd_wps_nfc_tag_read(struct wpa_ctrl *ctrl, int argc,
+                                           char *argv[])
+{
+       int ret;
+       char *buf;
+       size_t buflen;
+
+       if (argc != 1) {
+               printf("Invalid 'wps_nfc_tag_read' command - one argument "
+                      "is required.\n");
                return -1;
        }
 
-       if (argc == 3)
-               res = os_snprintf(cmd, sizeof(cmd), "WPS_OOB %s %s %s",
-                                 argv[0], argv[1], argv[2]);
-       else
-               res = os_snprintf(cmd, sizeof(cmd), "WPS_OOB %s %s %s %s",
-                                 argv[0], argv[1], argv[2], argv[3]);
+       buflen = 18 + os_strlen(argv[0]);
+       buf = os_malloc(buflen);
+       if (buf == NULL)
+               return -1;
+       os_snprintf(buf, buflen, "WPS_NFC_TAG_READ %s", argv[0]);
+
+       ret = wpa_ctrl_command(ctrl, buf);
+       os_free(buf);
+
+       return ret;
+}
+
+
+static int hostapd_cli_cmd_wps_nfc_config_token(struct wpa_ctrl *ctrl,
+                                               int argc, char *argv[])
+{
+       char cmd[64];
+       int res;
+
+       if (argc != 1) {
+               printf("Invalid 'wps_nfc_config_token' command - one argument "
+                      "is required.\n");
+               return -1;
+       }
+
+       res = os_snprintf(cmd, sizeof(cmd), "WPS_NFC_CONFIG_TOKEN %s",
+                         argv[0]);
        if (res < 0 || (size_t) res >= sizeof(cmd) - 1) {
-               printf("Too long WPS_OOB command.\n");
+               printf("Too long WPS_NFC_CONFIG_TOKEN command.\n");
                return -1;
        }
        return wpa_ctrl_command(ctrl, cmd);
 }
-#endif /* CONFIG_WPS_OOB */
+
+
+static int hostapd_cli_cmd_wps_nfc_token(struct wpa_ctrl *ctrl,
+                                        int argc, char *argv[])
+{
+       char cmd[64];
+       int res;
+
+       if (argc != 1) {
+               printf("Invalid 'wps_nfc_token' command - one argument is "
+                      "required.\n");
+               return -1;
+       }
+
+       res = os_snprintf(cmd, sizeof(cmd), "WPS_NFC_TOKEN %s", argv[0]);
+       if (res < 0 || (size_t) res >= sizeof(cmd) - 1) {
+               printf("Too long WPS_NFC_TOKEN command.\n");
+               return -1;
+       }
+       return wpa_ctrl_command(ctrl, cmd);
+}
+#endif /* CONFIG_WPS_NFC */
 
 
 static int hostapd_cli_cmd_wps_ap_pin(struct wpa_ctrl *ctrl, int argc,
@@ -515,6 +539,26 @@
 #endif /* CONFIG_WPS */
 
 
+static int hostapd_cli_cmd_disassoc_imminent(struct wpa_ctrl *ctrl, int argc,
+                                            char *argv[])
+{
+       char buf[300];
+       int res;
+
+       if (argc < 2) {
+               printf("Invalid 'disassoc_imminent' command - two arguments "
+                      "(STA addr and Disassociation Timer) are needed\n");
+               return -1;
+       }
+
+       res = os_snprintf(buf, sizeof(buf), "DISASSOC_IMMINENT %s %s",
+                         argv[0], argv[1]);
+       if (res < 0 || res >= (int) sizeof(buf))
+               return -1;
+       return wpa_ctrl_command(ctrl, buf);
+}
+
+
 static int hostapd_cli_cmd_ess_disassoc(struct wpa_ctrl *ctrl, int argc,
                                        char *argv[])
 {
@@ -742,12 +786,16 @@
        { "wps_pin", hostapd_cli_cmd_wps_pin },
        { "wps_check_pin", hostapd_cli_cmd_wps_check_pin },
        { "wps_pbc", hostapd_cli_cmd_wps_pbc },
-#ifdef CONFIG_WPS_OOB
-       { "wps_oob", hostapd_cli_cmd_wps_oob },
-#endif /* CONFIG_WPS_OOB */
+       { "wps_cancel", hostapd_cli_cmd_wps_cancel },
+#ifdef CONFIG_WPS_NFC
+       { "wps_nfc_tag_read", hostapd_cli_cmd_wps_nfc_tag_read },
+       { "wps_nfc_config_token", hostapd_cli_cmd_wps_nfc_config_token },
+       { "wps_nfc_token", hostapd_cli_cmd_wps_nfc_token },
+#endif /* CONFIG_WPS_NFC */
        { "wps_ap_pin", hostapd_cli_cmd_wps_ap_pin },
        { "wps_config", hostapd_cli_cmd_wps_config },
 #endif /* CONFIG_WPS */
+       { "disassoc_imminent", hostapd_cli_cmd_disassoc_imminent },
        { "ess_disassoc", hostapd_cli_cmd_ess_disassoc },
        { "get_config", hostapd_cli_cmd_get_config },
        { "help", hostapd_cli_cmd_help },
@@ -911,7 +959,7 @@
 
        eloop_register_signal_terminate(hostapd_cli_eloop_terminate, NULL);
        edit_init(hostapd_cli_edit_cmd_cb, hostapd_cli_edit_eof_cb,
-                 NULL, NULL, NULL);
+                 NULL, NULL, NULL, NULL);
        eloop_register_timeout(ping_interval, 0, hostapd_cli_ping, NULL, NULL);
 
        eloop_run();
diff -r e517c535bdf9 -r a75e48af592d external/bsd/wpa/dist/src/ap/wpa_auth.c
--- a/external/bsd/wpa/dist/src/ap/wpa_auth.c   Fri Jan 03 02:07:31 2014 +0000
+++ b/external/bsd/wpa/dist/src/ap/wpa_auth.c   Fri Jan 03 02:08:16 2014 +0000
@@ -1,15 +1,9 @@
 /*
- * hostapd - IEEE 802.11i-2004 / WPA Authenticator
- * Copyright (c) 2004-2009, Jouni Malinen <j%w1.fi@localhost>
+ * IEEE 802.11 RSN / WPA Authenticator
+ * Copyright (c) 2004-2011, Jouni Malinen <j%w1.fi@localhost>
  *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- *
- * Alternatively, this software may be distributed under the terms of BSD
- * license.
- *
- * See README and COPYING for more details.
+ * This software may be distributed under the terms of the BSD license.
+ * See README for more details.
  */
 
 #include "utils/includes.h"
@@ -52,6 +46,7 @@
 static const u32 dot11RSNAConfigPairwiseUpdateCount = 4;
 static const u32 eapol_key_timeout_first = 100; /* ms */
 static const u32 eapol_key_timeout_subseq = 1000; /* ms */
+static const u32 eapol_key_timeout_first_group = 500; /* ms */
 
 /* TODO: make these configurable */
 static const int dot11RSNAConfigPMKLifetime = 43200;
@@ -59,11 +54,12 @@
 static const int dot11RSNAConfigSATimeout = 60;
 
 
-static inline void wpa_auth_mic_failure_report(
+static inline int wpa_auth_mic_failure_report(
        struct wpa_authenticator *wpa_auth, const u8 *addr)
 {
        if (wpa_auth->cb.mic_failure_report)
-               wpa_auth->cb.mic_failure_report(wpa_auth->cb.ctx, addr);
+               return wpa_auth->cb.mic_failure_report(wpa_auth->cb.ctx, addr);
+       return 0;
 }
 
 
@@ -194,6 +190,7 @@
 {
        if (wpa_auth->cb.disconnect == NULL)
                return;
+       wpa_printf(MSG_DEBUG, "wpa_sta_disconnect STA " MACSTR, MAC2STR(addr));
        wpa_auth->cb.disconnect(wpa_auth->cb.ctx, addr,
                                WLAN_REASON_PREV_AUTH_NOT_VALID);
 }
@@ -282,25 +279,6 @@
 }
 
 
-static void wpa_group_set_key_len(struct wpa_group *group, int cipher)
-{
-       switch (cipher) {
-       case WPA_CIPHER_CCMP:
-               group->GTK_len = 16;
-               break;
-       case WPA_CIPHER_TKIP:
-               group->GTK_len = 32;
-               break;
-       case WPA_CIPHER_WEP104:
-               group->GTK_len = 13;



Home | Main Index | Thread Index | Old Index