diff mbox series

[v3,4/9] wpa_supplicant: src: tests: Replace Sanity.

Message ID 20210708182400.113748-4-arowa@google.com
State Superseded
Headers show
Series [v3,1/9] wpa_supplicant: hostapd: Replace MITM with PITM. | expand

Commit Message

Arowa Suliman July 8, 2021, 6:23 p.m. UTC
Replaced the word Sanity with the inclusive word Validity.

Signed-off-by: Arowa Suliman <arowa@chromium.org>
---
 ...supplicant-hostapd-src-Remove-Native.patch | 1365 +++++++++++++++++
 src/ap/acs.c                                  |    2 -
 src/ap/wpa_auth_ft.c                          |    4 +-
 src/p2p/p2p_pd.c                              |    2 +-
 src/pae/ieee802_1x_kay.c                      |    8 +-
 tests/hwsim/test_fst_config.py                |    2 +-
 tests/hwsim/test_wmediumd.py                  |    2 +-
 tests/remote/run-tests.py                     |    6 +-
 wpa_supplicant/ctrl_iface.c                   |    2 +-
 wpa_supplicant/p2p_supplicant_sd.c            |    4 +-
 10 files changed, 1380 insertions(+), 17 deletions(-)
 create mode 100644 0001-wpa_supplicant-hostapd-src-Remove-Native.patch
diff mbox series

Patch

diff --git a/0001-wpa_supplicant-hostapd-src-Remove-Native.patch b/0001-wpa_supplicant-hostapd-src-Remove-Native.patch
new file mode 100644
index 000000000..23e7855e4
--- /dev/null
+++ b/0001-wpa_supplicant-hostapd-src-Remove-Native.patch
@@ -0,0 +1,1365 @@ 
+From d01f671863177fd0919ed1b7a3bcdf6cd4907e67 Mon Sep 17 00:00:00 2001
+From: Arowa Suliman <arowa@google.com>
+Date: Thu, 1 Jul 2021 17:59:49 -0700
+Subject: [PATCH] wpa_supplicant: hostapd: src: Remove Native.
+
+Remove the word Native or replace it with more inclusive word such as built-in.
+
+Signed-off-by: Arowa Suliman <arowa@chromium.org>
+---
+ hostapd/Android.mk                          |  6 ++---
+ hostapd/Makefile                            |  6 ++---
+ hostapd/config_file.c                       |  8 +++---
+ hostapd/ctrl_iface.c                        |  4 +--
+ hostapd/main.c                              | 28 ++++++++++-----------
+ src/ap/ap_config.h                          |  4 +--
+ src/ap/beacon.c                             |  4 +--
+ src/ap/hostapd.h                            |  4 +--
+ src/ap/ieee802_11.c                         |  4 +--
+ src/crypto/tls_openssl.c                    | 24 +++++++++---------
+ src/drivers/driver_ndis.c                   |  6 ++---
+ src/eap_peer/tncc.c                         | 28 ++++++++++-----------
+ src/l2_packet/l2_packet_pcap.c              |  4 +--
+ src/radius/radius_client.c                  |  8 +++---
+ src/utils/build_config.h                    |  2 +-
+ src/utils/common.c                          |  4 +--
+ src/utils/common.h                          | 14 +++++------
+ src/utils/eloop.c                           | 18 ++++++-------
+ src/utils/includes.h                        |  4 +--
+ src/utils/ip_addr.c                         |  4 +--
+ src/utils/os_win32.c                        |  8 +++---
+ src/utils/pcsc_funcs.c                      |  6 ++---
+ wpa_supplicant/Android.mk                   | 14 +++++------
+ wpa_supplicant/ChangeLog                    |  4 +--
+ wpa_supplicant/Makefile                     | 14 +++++------
+ wpa_supplicant/README-Windows.txt           |  2 +-
+ wpa_supplicant/android.config               |  4 +--
+ wpa_supplicant/ctrl_iface.c                 |  2 +-
+ wpa_supplicant/defconfig                    |  4 +--
+ wpa_supplicant/eapol_test.c                 |  6 ++---
+ wpa_supplicant/nmake.mak                    |  2 +-
+ wpa_supplicant/rrm.c                        |  2 +-
+ wpa_supplicant/wpa_gui-qt4/addinterface.cpp | 12 ++++-----
+ wpa_supplicant/wpa_gui-qt4/main.cpp         | 12 ++++-----
+ wpa_supplicant/wpa_gui-qt4/wpa_gui.pro      |  6 ++---
+ wpa_supplicant/wpa_gui-qt4/wpagui.cpp       | 20 +++++++--------
+ wpa_supplicant/wpa_gui-qt4/wpagui.h         |  8 +++---
+ 37 files changed, 155 insertions(+), 155 deletions(-)
+
+diff --git a/hostapd/Android.mk b/hostapd/Android.mk
+index dd8aa2450..5190ed422 100644
+--- a/hostapd/Android.mk
++++ b/hostapd/Android.mk
+@@ -64,7 +64,7 @@ endif
+ 
+ 
+ ifndef CONFIG_OS
+-ifdef CONFIG_NATIVE_WINDOWS
++ifdef CONFIG_WINDOWS
+ CONFIG_OS=win32
+ else
+ CONFIG_OS=unix
+@@ -75,8 +75,8 @@ ifeq ($(CONFIG_OS), internal)
+ L_CFLAGS += -DOS_NO_C_LIB_DEFINES
+ endif
+ 
+-ifdef CONFIG_NATIVE_WINDOWS
+-L_CFLAGS += -DCONFIG_NATIVE_WINDOWS
++ifdef CONFIG_WINDOWS
++L_CFLAGS += -DCONFIG_WINDOWS
+ LIBS += -lws2_32
+ endif
+ 
+diff --git a/hostapd/Makefile b/hostapd/Makefile
+index ac085fd10..e8c9f518d 100644
+--- a/hostapd/Makefile
++++ b/hostapd/Makefile
+@@ -43,7 +43,7 @@ CONFIG_WPS_TESTING=y
+ endif
+ 
+ ifndef CONFIG_OS
+-ifdef CONFIG_NATIVE_WINDOWS
++ifdef CONFIG_WINDOWS
+ CONFIG_OS=win32
+ else
+ CONFIG_OS=unix
+@@ -54,8 +54,8 @@ ifeq ($(CONFIG_OS), internal)
+ CFLAGS += -DOS_NO_C_LIB_DEFINES
+ endif
+ 
+-ifdef CONFIG_NATIVE_WINDOWS
+-CFLAGS += -DCONFIG_NATIVE_WINDOWS
++ifdef CONFIG_WINDOWS
++CFLAGS += -DCONFIG_WINDOWS
+ LIBS += -lws2_32
+ endif
+ 
+diff --git a/hostapd/config_file.c b/hostapd/config_file.c
+index 9bc1dc775..af87d640f 100644
+--- a/hostapd/config_file.c
++++ b/hostapd/config_file.c
+@@ -7,9 +7,9 @@
+  */
+ 
+ #include "utils/includes.h"
+-#ifndef CONFIG_NATIVE_WINDOWS
++#ifndef CONFIG_WINDOWS
+ #include <grp.h>
+-#endif /* CONFIG_NATIVE_WINDOWS */
++#endif /* CONFIG_WINDOWS */
+ 
+ #include "utils/common.h"
+ #include "utils/uuid.h"
+@@ -3079,7 +3079,7 @@ static int hostapd_config_fill(struct hostapd_config *conf,
+ 		os_free(bss->ctrl_interface);
+ 		bss->ctrl_interface = os_strdup(pos);
+ 	} else if (os_strcmp(buf, "ctrl_interface_group") == 0) {
+-#ifndef CONFIG_NATIVE_WINDOWS
++#ifndef CONFIG_WINDOWS
+ 		struct group *grp;
+ 		char *endp;
+ 		const char *group = pos;
+@@ -3103,7 +3103,7 @@ static int hostapd_config_fill(struct hostapd_config *conf,
+ 		bss->ctrl_interface_gid_set = 1;
+ 		wpa_printf(MSG_DEBUG, "ctrl_interface_group=%d",
+ 			   bss->ctrl_interface_gid);
+-#endif /* CONFIG_NATIVE_WINDOWS */
++#endif /* CONFIG_WINDOWS */
+ #endif /* CONFIG_NO_CTRL_IFACE */
+ #ifdef RADIUS_SERVER
+ 	} else if (os_strcmp(buf, "radius_server_clients") == 0) {
+diff --git a/hostapd/ctrl_iface.c b/hostapd/ctrl_iface.c
+index 4a2d60627..1609d503c 100644
+--- a/hostapd/ctrl_iface.c
++++ b/hostapd/ctrl_iface.c
+@@ -8,7 +8,7 @@
+ 
+ #include "utils/includes.h"
+ 
+-#ifndef CONFIG_NATIVE_WINDOWS
++#ifndef CONFIG_WINDOWS
+ 
+ #ifdef CONFIG_TESTING_OPTIONS
+ #ifdef __NetBSD__
+@@ -5262,4 +5262,4 @@ static void hostapd_ctrl_iface_send(struct hostapd_data *hapd, int level,
+ 	}
+ }
+ 
+-#endif /* CONFIG_NATIVE_WINDOWS */
++#endif /* CONFIG_WINDOWS */
+diff --git a/hostapd/main.c b/hostapd/main.c
+index 4f2d1f216..14c47bd6c 100644
+--- a/hostapd/main.c
++++ b/hostapd/main.c
+@@ -7,10 +7,10 @@
+  */
+ 
+ #include "utils/includes.h"
+-#ifndef CONFIG_NATIVE_WINDOWS
++#ifndef CONFIG_WINDOWS
+ #include <syslog.h>
+ #include <grp.h>
+-#endif /* CONFIG_NATIVE_WINDOWS */
++#endif /* CONFIG_WINDOWS */
+ 
+ #include "utils/common.h"
+ #include "utils/eloop.h"
+@@ -116,7 +116,7 @@ static void hostapd_logger_cb(void *ctx, const u8 *addr, unsigned int module,
+ 		wpa_printf(MSG_INFO, "%s", format);
+ 	}
+ 
+-#ifndef CONFIG_NATIVE_WINDOWS
++#ifndef CONFIG_WINDOWS
+ 	if ((conf_syslog & module) && level >= conf_syslog_level) {
+ 		int priority;
+ 		switch (level) {
+@@ -139,7 +139,7 @@ static void hostapd_logger_cb(void *ctx, const u8 *addr, unsigned int module,
+ 		}
+ 		syslog(priority, "%s", format);
+ 	}
+-#endif /* CONFIG_NATIVE_WINDOWS */
++#endif /* CONFIG_WINDOWS */
+ 
+ 	os_free(format);
+ }
+@@ -300,7 +300,7 @@ static void handle_term(int sig, void *signal_ctx)
+ }
+ 
+ 
+-#ifndef CONFIG_NATIVE_WINDOWS
++#ifndef CONFIG_WINDOWS
+ 
+ static int handle_reload_iface(struct hostapd_iface *iface, void *ctx)
+ {
+@@ -328,7 +328,7 @@ static void handle_dump_state(int sig, void *signal_ctx)
+ {
+ 	/* Not used anymore - ignore signal */
+ }
+-#endif /* CONFIG_NATIVE_WINDOWS */
++#endif /* CONFIG_WINDOWS */
+ 
+ 
+ static int hostapd_global_init(struct hapd_interfaces *interfaces,
+@@ -353,15 +353,15 @@ static int hostapd_global_init(struct hapd_interfaces *interfaces,
+ 
+ 	random_init(entropy_file);
+ 
+-#ifndef CONFIG_NATIVE_WINDOWS
++#ifndef CONFIG_WINDOWS
+ 	eloop_register_signal(SIGHUP, handle_reload, interfaces);
+ 	eloop_register_signal(SIGUSR1, handle_dump_state, interfaces);
+-#endif /* CONFIG_NATIVE_WINDOWS */
++#endif /* CONFIG_WINDOWS */
+ 	eloop_register_signal_terminate(handle_term, interfaces);
+ 
+-#ifndef CONFIG_NATIVE_WINDOWS
++#ifndef CONFIG_WINDOWS
+ 	openlog("hostapd", 0, LOG_DAEMON);
+-#endif /* CONFIG_NATIVE_WINDOWS */
++#endif /* CONFIG_WINDOWS */
+ 
+ 	for (i = 0; wpa_drivers[i]; i++)
+ 		global.drv_count++;
+@@ -398,9 +398,9 @@ static void hostapd_global_deinit(const char *pid_file, int eloop_initialized)
+ 	if (eloop_initialized)
+ 		eloop_destroy();
+ 
+-#ifndef CONFIG_NATIVE_WINDOWS
++#ifndef CONFIG_WINDOWS
+ 	closelog();
+-#endif /* CONFIG_NATIVE_WINDOWS */
++#endif /* CONFIG_WINDOWS */
+ 
+ 	eap_server_unregister_methods();
+ 
+@@ -541,7 +541,7 @@ static int hostapd_get_global_ctrl_iface(struct hapd_interfaces *interfaces,
+ static int hostapd_get_ctrl_iface_group(struct hapd_interfaces *interfaces,
+ 					const char *group)
+ {
+-#ifndef CONFIG_NATIVE_WINDOWS
++#ifndef CONFIG_WINDOWS
+ 	struct group *grp;
+ 	grp = getgrnam(group);
+ 	if (grp == NULL) {
+@@ -549,7 +549,7 @@ static int hostapd_get_ctrl_iface_group(struct hapd_interfaces *interfaces,
+ 		return -1;
+ 	}
+ 	interfaces->ctrl_iface_group = grp->gr_gid;
+-#endif /* CONFIG_NATIVE_WINDOWS */
++#endif /* CONFIG_WINDOWS */
+ 	return 0;
+ }
+ 
+diff --git a/src/ap/ap_config.h b/src/ap/ap_config.h
+index ced36f9cc..abfccd246 100644
+--- a/src/ap/ap_config.h
++++ b/src/ap/ap_config.h
+@@ -400,9 +400,9 @@ struct hostapd_bss_config {
+ #endif /* CONFIG_IEEE80211R_AP */
+ 
+ 	char *ctrl_interface; /* directory for UNIX domain sockets */
+-#ifndef CONFIG_NATIVE_WINDOWS
++#ifndef CONFIG_WINDOWS
+ 	gid_t ctrl_interface_gid;
+-#endif /* CONFIG_NATIVE_WINDOWS */
++#endif /* CONFIG_WINDOWS */
+ 	int ctrl_interface_gid_set;
+ 
+ 	char *ca_cert;
+diff --git a/src/ap/beacon.c b/src/ap/beacon.c
+index 15fc2b3db..755ac27c0 100644
+--- a/src/ap/beacon.c
++++ b/src/ap/beacon.c
+@@ -10,7 +10,7 @@
+ 
+ #include "utils/includes.h"
+ 
+-#ifndef CONFIG_NATIVE_WINDOWS
++#ifndef CONFIG_WINDOWS
+ 
+ #include "utils/common.h"
+ #include "common/ieee802_11_defs.h"
+@@ -1862,4 +1862,4 @@ int ieee802_11_update_beacons(struct hostapd_iface *iface)
+ 	return ret;
+ }
+ 
+-#endif /* CONFIG_NATIVE_WINDOWS */
++#endif /* CONFIG_WINDOWS */
+diff --git a/src/ap/hostapd.h b/src/ap/hostapd.h
+index 07d0aaa92..3e6f12f98 100644
+--- a/src/ap/hostapd.h
++++ b/src/ap/hostapd.h
+@@ -59,9 +59,9 @@ struct hapd_interfaces {
+ 	struct dl_list global_ctrl_dst;
+ 	char *global_iface_path;
+ 	char *global_iface_name;
+-#ifndef CONFIG_NATIVE_WINDOWS
++#ifndef CONFIG_WINDOWS
+ 	gid_t ctrl_iface_group;
+-#endif /* CONFIG_NATIVE_WINDOWS */
++#endif /* CONFIG_WINDOWS */
+ 	struct hostapd_iface **iface;
+ 
+ 	size_t terminate_on_error;
+diff --git a/src/ap/ieee802_11.c b/src/ap/ieee802_11.c
+index b404e84af..3aafa138b 100644
+--- a/src/ap/ieee802_11.c
++++ b/src/ap/ieee802_11.c
+@@ -8,7 +8,7 @@
+ 
+ #include "utils/includes.h"
+ 
+-#ifndef CONFIG_NATIVE_WINDOWS
++#ifndef CONFIG_WINDOWS
+ 
+ #include "utils/common.h"
+ #include "utils/eloop.h"
+@@ -7069,4 +7069,4 @@ u8 * hostapd_eid_wb_chsw_wrapper(struct hostapd_data *hapd, u8 *eid)
+ 	return eid;
+ }
+ 
+-#endif /* CONFIG_NATIVE_WINDOWS */
++#endif /* CONFIG_WINDOWS */
+diff --git a/src/crypto/tls_openssl.c b/src/crypto/tls_openssl.c
+index 345a35ee1..d1e1cc557 100644
+--- a/src/crypto/tls_openssl.c
++++ b/src/crypto/tls_openssl.c
+@@ -349,7 +349,7 @@ static X509_STORE * tls_crl_cert_reload(const char *ca_cert, int check_crl)
+ }
+ 
+ 
+-#ifdef CONFIG_NATIVE_WINDOWS
++#ifdef CONFIG_WINDOWS
+ 
+ /* Windows CryptoAPI and access to certificate stores */
+ #include <wincrypt.h>
+@@ -719,14 +719,14 @@ static int tls_cryptoapi_ca_cert(SSL_CTX *ssl_ctx, SSL *ssl, const char *name)
+ }
+ 
+ 
+-#else /* CONFIG_NATIVE_WINDOWS */
++#else /* CONFIG_WINDOWS */
+ 
+ static int tls_cryptoapi_cert(SSL *ssl, const char *name)
+ {
+ 	return -1;
+ }
+ 
+-#endif /* CONFIG_NATIVE_WINDOWS */
++#endif /* CONFIG_WINDOWS */
+ 
+ 
+ static void ssl_info_cb(const SSL *ssl, int where, int ret)
+@@ -1750,7 +1750,7 @@ static int tls_match_altsubject(X509 *cert, const char *match)
+ }
+ 
+ 
+-#ifndef CONFIG_NATIVE_WINDOWS
++#ifndef CONFIG_WINDOWS
+ static int domain_suffix_match(const u8 *val, size_t len, const char *match,
+ 			       size_t match_len, int full)
+ {
+@@ -1780,7 +1780,7 @@ static int domain_suffix_match(const u8 *val, size_t len, const char *match,
+ 	wpa_printf(MSG_DEBUG, "TLS: Reject due to incomplete label match");
+ 	return 0;
+ }
+-#endif /* CONFIG_NATIVE_WINDOWS */
++#endif /* CONFIG_WINDOWS */
+ 
+ 
+ struct tls_dn_field_order_cnt {
+@@ -1996,7 +1996,7 @@ static int tls_match_dn_field(X509 *cert, const char *match)
+ }
+ 
+ 
+-#ifndef CONFIG_NATIVE_WINDOWS
++#ifndef CONFIG_WINDOWS
+ static int tls_match_suffix_helper(X509 *cert, const char *match,
+ 				   size_t match_len, int full)
+ {
+@@ -2065,15 +2065,15 @@ static int tls_match_suffix_helper(X509 *cert, const char *match,
+ 		   full ? "": "suffix ");
+ 	return 0;
+ }
+-#endif /* CONFIG_NATIVE_WINDOWS */
++#endif /* CONFIG_WINDOWS */
+ 
+ 
+ static int tls_match_suffix(X509 *cert, const char *match, int full)
+ {
+-#ifdef CONFIG_NATIVE_WINDOWS
++#ifdef CONFIG_WINDOWS
+ 	/* wincrypt.h has conflicting X509_NAME definition */
+ 	return -1;
+-#else /* CONFIG_NATIVE_WINDOWS */
++#else /* CONFIG_WINDOWS */
+ 	const char *token, *last = NULL;
+ 
+ 	/* Process each match alternative separately until a match is found */
+@@ -2083,7 +2083,7 @@ static int tls_match_suffix(X509 *cert, const char *match, int full)
+ 	}
+ 
+ 	return 0;
+-#endif /* CONFIG_NATIVE_WINDOWS */
++#endif /* CONFIG_WINDOWS */
+ }
+ 
+ 
+@@ -2773,14 +2773,14 @@ static int tls_connection_ca_cert(struct tls_data *data,
+ 	}
+ #endif /* ANDROID */
+ 
+-#ifdef CONFIG_NATIVE_WINDOWS
++#ifdef CONFIG_WINDOWS
+ 	if (ca_cert && tls_cryptoapi_ca_cert(ssl_ctx, conn->ssl, ca_cert) ==
+ 	    0) {
+ 		wpa_printf(MSG_DEBUG, "OpenSSL: Added CA certificates from "
+ 			   "system certificate store");
+ 		return 0;
+ 	}
+-#endif /* CONFIG_NATIVE_WINDOWS */
++#endif /* CONFIG_WINDOWS */
+ 
+ 	if (ca_cert || ca_path) {
+ #ifndef OPENSSL_NO_STDIO
+diff --git a/src/drivers/driver_ndis.c b/src/drivers/driver_ndis.c
+index b5fff483e..533c7d8b0 100644
+--- a/src/drivers/driver_ndis.c
++++ b/src/drivers/driver_ndis.c
+@@ -2299,7 +2299,7 @@ static int wpa_driver_ndis_get_names(struct wpa_driver_ndis_data *drv)
+ }
+ 
+ 
+-#if defined(CONFIG_NATIVE_WINDOWS) || defined(__CYGWIN__)
++#if defined(CONFIG_WINDOWS) || defined(__CYGWIN__)
+ #ifndef _WIN32_WCE
+ /*
+  * These structures are undocumented for WinXP; only WinCE version is
+@@ -2664,7 +2664,7 @@ fail:
+ #endif /* _WIN32_WCE */
+ }
+ 
+-#else /* CONFIG_NATIVE_WINDOWS || __CYGWIN__ */
++#else /* CONFIG_WINDOWS || __CYGWIN__ */
+ 
+ static int wpa_driver_ndis_set_wzc(struct wpa_driver_ndis_data *drv,
+ 				   int enable)
+@@ -2672,7 +2672,7 @@ static int wpa_driver_ndis_set_wzc(struct wpa_driver_ndis_data *drv,
+ 	return 0;
+ }
+ 
+-#endif /* CONFIG_NATIVE_WINDOWS || __CYGWIN__ */
++#endif /* CONFIG_WINDOWS || __CYGWIN__ */
+ 
+ 
+ #ifdef CONFIG_USE_NDISUIO
+diff --git a/src/eap_peer/tncc.c b/src/eap_peer/tncc.c
+index c46098099..c14042f1f 100644
+--- a/src/eap_peer/tncc.c
++++ b/src/eap_peer/tncc.c
+@@ -7,9 +7,9 @@
+  */
+ 
+ #include "includes.h"
+-#ifndef CONFIG_NATIVE_WINDOWS
++#ifndef CONFIG_WINDOWS
+ #include <dlfcn.h>
+-#endif /* CONFIG_NATIVE_WINDOWS */
++#endif /* CONFIG_WINDOWS */
+ 
+ #include "common.h"
+ #include "base64.h"
+@@ -258,15 +258,15 @@ static void * tncc_get_sym(void *handle, char *func)
+ {
+ 	void *fptr;
+ 
+-#ifdef CONFIG_NATIVE_WINDOWS
++#ifdef CONFIG_WINDOWS
+ #ifdef _WIN32_WCE
+ 	fptr = GetProcAddressA(handle, func);
+ #else /* _WIN32_WCE */
+ 	fptr = GetProcAddress(handle, func);
+ #endif /* _WIN32_WCE */
+-#else /* CONFIG_NATIVE_WINDOWS */
++#else /* CONFIG_WINDOWS */
+ 	fptr = dlsym(handle, func);
+-#endif /* CONFIG_NATIVE_WINDOWS */
++#endif /* CONFIG_WINDOWS */
+ 
+ 	return fptr;
+ }
+@@ -399,7 +399,7 @@ static int tncc_load_imc(struct tnc_if_imc *imc)
+ 
+ 	wpa_printf(MSG_DEBUG, "TNC: Opening IMC: %s (%s)",
+ 		   imc->name, imc->path);
+-#ifdef CONFIG_NATIVE_WINDOWS
++#ifdef CONFIG_WINDOWS
+ #ifdef UNICODE
+ 	{
+ 		TCHAR *lib = wpa_strdup_tchar(imc->path);
+@@ -416,14 +416,14 @@ static int tncc_load_imc(struct tnc_if_imc *imc)
+ 			   imc->name, imc->path, (int) GetLastError());
+ 		return -1;
+ 	}
+-#else /* CONFIG_NATIVE_WINDOWS */
++#else /* CONFIG_WINDOWS */
+ 	imc->dlhandle = dlopen(imc->path, RTLD_LAZY);
+ 	if (imc->dlhandle == NULL) {
+ 		wpa_printf(MSG_ERROR, "TNC: Failed to open IMC '%s' (%s): %s",
+ 			   imc->name, imc->path, dlerror());
+ 		return -1;
+ 	}
+-#endif /* CONFIG_NATIVE_WINDOWS */
++#endif /* CONFIG_WINDOWS */
+ 
+ 	if (tncc_imc_resolve_funcs(imc) < 0) {
+ 		wpa_printf(MSG_ERROR, "TNC: Failed to resolve IMC functions");
+@@ -446,11 +446,11 @@ static void tncc_unload_imc(struct tnc_if_imc *imc)
+ 	tnc_imc[imc->imcID] = NULL;
+ 
+ 	if (imc->dlhandle) {
+-#ifdef CONFIG_NATIVE_WINDOWS
++#ifdef CONFIG_WINDOWS
+ 		FreeLibrary(imc->dlhandle);
+-#else /* CONFIG_NATIVE_WINDOWS */
++#else /* CONFIG_WINDOWS */
+ 		dlclose(imc->dlhandle);
+-#endif /* CONFIG_NATIVE_WINDOWS */
++#endif /* CONFIG_WINDOWS */
+ 	}
+ 	os_free(imc->name);
+ 	os_free(imc->path);
+@@ -876,7 +876,7 @@ enum tncc_process_res tncc_process_if_tnccs(struct tncc_data *tncc,
+ }
+ 
+ 
+-#ifdef CONFIG_NATIVE_WINDOWS
++#ifdef CONFIG_WINDOWS
+ static int tncc_read_config_reg(struct tncc_data *tncc, HKEY hive)
+ {
+ 	HKEY hk, hk2;
+@@ -999,7 +999,7 @@ static int tncc_read_config(struct tncc_data *tncc)
+ 	return 0;
+ }
+ 
+-#else /* CONFIG_NATIVE_WINDOWS */
++#else /* CONFIG_WINDOWS */
+ 
+ static struct tnc_if_imc * tncc_parse_imc(char *start, char *end, int *error)
+ {
+@@ -1111,7 +1111,7 @@ static int tncc_read_config(struct tncc_data *tncc)
+ 	return 0;
+ }
+ 
+-#endif /* CONFIG_NATIVE_WINDOWS */
++#endif /* CONFIG_WINDOWS */
+ 
+ 
+ struct tncc_data * tncc_init(void)
+diff --git a/src/l2_packet/l2_packet_pcap.c b/src/l2_packet/l2_packet_pcap.c
+index c2b17fcf8..fd2adcfaa 100644
+--- a/src/l2_packet/l2_packet_pcap.c
++++ b/src/l2_packet/l2_packet_pcap.c
+@@ -7,9 +7,9 @@
+  */
+ 
+ #include "includes.h"
+-#ifndef CONFIG_NATIVE_WINDOWS
++#ifndef CONFIG_WINDOWS
+ #include <sys/ioctl.h>
+-#endif /* CONFIG_NATIVE_WINDOWS */
++#endif /* CONFIG_WINDOWS */
+ #include <pcap.h>
+ #ifndef CONFIG_WINPCAP
+ #include <dnet.h>
+diff --git a/src/radius/radius_client.c b/src/radius/radius_client.c
+index 4f0ff0754..bbd4dac1d 100644
+--- a/src/radius/radius_client.c
++++ b/src/radius/radius_client.c
+@@ -339,7 +339,7 @@ void radius_client_set_interim_error_cb(struct radius_client_data *radius,
+ static int radius_client_handle_send_error(struct radius_client_data *radius,
+ 					   int s, RadiusType msg_type)
+ {
+-#ifndef CONFIG_NATIVE_WINDOWS
++#ifndef CONFIG_WINDOWS
+ 	int _errno = errno;
+ 	wpa_printf(MSG_INFO, "send[RADIUS,s=%d]: %s", s, strerror(errno));
+ 	if (_errno == ENOTCONN || _errno == EDESTADDRREQ || _errno == EINVAL ||
+@@ -357,7 +357,7 @@ static int radius_client_handle_send_error(struct radius_client_data *radius,
+ 			return 1;
+ 		}
+ 	}
+-#endif /* CONFIG_NATIVE_WINDOWS */
++#endif /* CONFIG_WINDOWS */
+ 
+ 	return 0;
+ }
+@@ -1229,7 +1229,7 @@ radius_change_server(struct radius_client_data *radius,
+ 		return -1;
+ 	}
+ 
+-#ifndef CONFIG_NATIVE_WINDOWS
++#ifndef CONFIG_WINDOWS
+ 	switch (nserv->addr.af) {
+ 	case AF_INET:
+ 		claddrlen = sizeof(claddr);
+@@ -1254,7 +1254,7 @@ radius_change_server(struct radius_client_data *radius,
+ 	}
+ #endif /* CONFIG_IPV6 */
+ 	}
+-#endif /* CONFIG_NATIVE_WINDOWS */
++#endif /* CONFIG_WINDOWS */
+ 
+ 	if (auth)
+ 		radius->auth_sock = sel_sock;
+diff --git a/src/utils/build_config.h b/src/utils/build_config.h
+index c6f4e4379..d73d20eaa 100644
+--- a/src/utils/build_config.h
++++ b/src/utils/build_config.h
+@@ -18,7 +18,7 @@
+ /* Insert configuration defines, e.g., #define EAP_MD5, here, if needed. */
+ 
+ #ifdef CONFIG_WIN32_DEFAULTS
+-#define CONFIG_NATIVE_WINDOWS
++#define CONFIG_WINDOWS
+ #define CONFIG_ANSI_C_EXTRA
+ #define CONFIG_WINPCAP
+ #define IEEE8021X_EAPOL
+diff --git a/src/utils/common.c b/src/utils/common.c
+index 2c1275193..8a320114c 100644
+--- a/src/utils/common.c
++++ b/src/utils/common.c
+@@ -438,7 +438,7 @@ int getopt(int argc, char *const argv[], const char *optstring)
+ #endif /* CONFIG_ANSI_C_EXTRA */
+ 
+ 
+-#ifdef CONFIG_NATIVE_WINDOWS
++#ifdef CONFIG_WINDOWS
+ /**
+  * wpa_unicode2ascii_inplace - Convert unicode string into ASCII
+  * @str: Pointer to string to convert
+@@ -471,7 +471,7 @@ TCHAR * wpa_strdup_tchar(const char *str)
+ 	return os_strdup(str);
+ #endif /* UNICODE */
+ }
+-#endif /* CONFIG_NATIVE_WINDOWS */
++#endif /* CONFIG_WINDOWS */
+ 
+ 
+ void printf_encode(char *txt, size_t maxlen, const u8 *data, size_t len)
+diff --git a/src/utils/common.h b/src/utils/common.h
+index 45f72bb30..7e4162b9e 100644
+--- a/src/utils/common.h
++++ b/src/utils/common.h
+@@ -62,7 +62,7 @@ static inline unsigned int bswap_32(unsigned int v)
+ #define bswap_32 CPU_swap_u32
+ #endif /* __rtems__ */
+ 
+-#ifdef CONFIG_NATIVE_WINDOWS
++#ifdef CONFIG_WINDOWS
+ #include <winsock.h>
+ 
+ typedef int socklen_t;
+@@ -71,7 +71,7 @@ typedef int socklen_t;
+ #define MSG_DONTWAIT 0 /* not supported */
+ #endif
+ 
+-#endif /* CONFIG_NATIVE_WINDOWS */
++#endif /* CONFIG_WINDOWS */
+ 
+ #ifdef _MSC_VER
+ #define inline __inline
+@@ -129,7 +129,7 @@ typedef int8_t s8;
+ 
+ /* Define platform specific byte swapping macros */
+ 
+-#if defined(__CYGWIN__) || defined(CONFIG_NATIVE_WINDOWS)
++#if defined(__CYGWIN__) || defined(CONFIG_WINDOWS)
+ 
+ static inline unsigned short wpa_swap_16(unsigned short v)
+ {
+@@ -154,7 +154,7 @@ static inline unsigned int wpa_swap_32(unsigned int v)
+ 
+ #define WPA_BYTE_SWAP_DEFINED
+ 
+-#endif /* __CYGWIN__ || CONFIG_NATIVE_WINDOWS */
++#endif /* __CYGWIN__ || CONFIG__WINDOWS */
+ 
+ 
+ #ifndef WPA_BYTE_SWAP_DEFINED
+@@ -493,13 +493,13 @@ int wpa_snprintf_hex_uppercase(char *buf, size_t buf_size, const u8 *data,
+ int hwaddr_mask_txt(char *buf, size_t len, const u8 *addr, const u8 *mask);
+ int ssid_parse(const char *buf, struct wpa_ssid_value *ssid);
+ 
+-#ifdef CONFIG_NATIVE_WINDOWS
++#ifdef CONFIG_WINDOWS
+ void wpa_unicode2ascii_inplace(TCHAR *str);
+ TCHAR * wpa_strdup_tchar(const char *str);
+-#else /* CONFIG_NATIVE_WINDOWS */
++#else /* CONFIG_WINDOWS */
+ #define wpa_unicode2ascii_inplace(s) do { } while (0)
+ #define wpa_strdup_tchar(s) strdup((s))
+-#endif /* CONFIG_NATIVE_WINDOWS */
++#endif /* CONFIG_WINDOWS */
+ 
+ void printf_encode(char *txt, size_t maxlen, const u8 *data, size_t len);
+ size_t printf_decode(u8 *buf, size_t maxlen, const char *str);
+diff --git a/src/utils/eloop.c b/src/utils/eloop.c
+index b353ab0e4..44daa0e80 100644
+--- a/src/utils/eloop.c
++++ b/src/utils/eloop.c
+@@ -958,7 +958,7 @@ int eloop_replenish_timeout(unsigned int req_secs, unsigned int req_usecs,
+ }
+ 
+ 
+-#ifndef CONFIG_NATIVE_WINDOWS
++#ifndef CONFIG_WINDOWS
+ static void eloop_handle_alarm(int sig)
+ {
+ 	wpa_printf(MSG_ERROR, "eloop: could not process SIGINT or SIGTERM in "
+@@ -968,14 +968,14 @@ static void eloop_handle_alarm(int sig)
+ 		   "Killing program forcefully.\n");
+ 	exit(1);
+ }
+-#endif /* CONFIG_NATIVE_WINDOWS */
++#endif /* CONFIG_WINDOWS */
+ 
+ 
+ static void eloop_handle_signal(int sig)
+ {
+ 	size_t i;
+ 
+-#ifndef CONFIG_NATIVE_WINDOWS
++#ifndef CONFIG_WINDOWS
+ 	if ((sig == SIGINT || sig == SIGTERM) && !eloop.pending_terminate) {
+ 		/* Use SIGALRM to break out from potential busy loops that
+ 		 * would not allow the program to be killed. */
+@@ -983,7 +983,7 @@ static void eloop_handle_signal(int sig)
+ 		signal(SIGALRM, eloop_handle_alarm);
+ 		alarm(2);
+ 	}
+-#endif /* CONFIG_NATIVE_WINDOWS */
++#endif /* CONFIG_WINDOWS */
+ 
+ 	eloop.signaled++;
+ 	for (i = 0; i < eloop.signal_count; i++) {
+@@ -1004,9 +1004,9 @@ static void eloop_process_pending_signals(void)
+ 	eloop.signaled = 0;
+ 
+ 	if (eloop.pending_terminate) {
+-#ifndef CONFIG_NATIVE_WINDOWS
++#ifndef CONFIG_WINDOWS
+ 		alarm(0);
+-#endif /* CONFIG_NATIVE_WINDOWS */
++#endif /* CONFIG_WINDOWS */
+ 		eloop.pending_terminate = 0;
+ 	}
+ 
+@@ -1055,11 +1055,11 @@ int eloop_register_signal_terminate(eloop_signal_handler handler,
+ int eloop_register_signal_reconfig(eloop_signal_handler handler,
+ 				   void *user_data)
+ {
+-#ifdef CONFIG_NATIVE_WINDOWS
++#ifdef CONFIG_WINDOWS
+ 	return 0;
+-#else /* CONFIG_NATIVE_WINDOWS */
++#else /* CONFIG_WINDOWS */
+ 	return eloop_register_signal(SIGHUP, handler, user_data);
+-#endif /* CONFIG_NATIVE_WINDOWS */
++#endif /* CONFIG_WINDOWS */
+ }
+ 
+ 
+diff --git a/src/utils/includes.h b/src/utils/includes.h
+index 741fc9c14..ba9fb6aab 100644
+--- a/src/utils/includes.h
++++ b/src/utils/includes.h
+@@ -33,7 +33,7 @@
+ #include <unistd.h>
+ #endif /* _MSC_VER */
+ 
+-#ifndef CONFIG_NATIVE_WINDOWS
++#ifndef CONFIG_WINDOWS
+ #include <sys/socket.h>
+ #include <netinet/in.h>
+ #include <arpa/inet.h>
+@@ -41,6 +41,6 @@
+ #include <sys/uio.h>
+ #include <sys/time.h>
+ #endif /* __vxworks */
+-#endif /* CONFIG_NATIVE_WINDOWS */
++#endif /* CONFIG_WINDOWS */
+ 
+ #endif /* INCLUDES_H */
+diff --git a/src/utils/ip_addr.c b/src/utils/ip_addr.c
+index 92a359039..cb821f46d 100644
+--- a/src/utils/ip_addr.c
++++ b/src/utils/ip_addr.c
+@@ -35,7 +35,7 @@ const char * hostapd_ip_txt(const struct hostapd_ip_addr *addr, char *buf,
+ 
+ int hostapd_parse_ip_addr(const char *txt, struct hostapd_ip_addr *addr)
+ {
+-#ifndef CONFIG_NATIVE_WINDOWS
++#ifndef CONFIG_WINDOWS
+ 	if (inet_aton(txt, &addr->u.v4)) {
+ 		addr->af = AF_INET;
+ 		return 0;
+@@ -47,7 +47,7 @@ int hostapd_parse_ip_addr(const char *txt, struct hostapd_ip_addr *addr)
+ 		return 0;
+ 	}
+ #endif /* CONFIG_IPV6 */
+-#endif /* CONFIG_NATIVE_WINDOWS */
++#endif /* CONFIG_WINDOWS */
+ 
+ 	return -1;
+ }
+diff --git a/src/utils/os_win32.c b/src/utils/os_win32.c
+index f9e4b308e..25087ecde 100644
+--- a/src/utils/os_win32.c
++++ b/src/utils/os_win32.c
+@@ -159,22 +159,22 @@ char * os_rel2abs_path(const char *rel_path)
+ 
+ int os_program_init(void)
+ {
+-#ifdef CONFIG_NATIVE_WINDOWS
++#ifdef CONFIG_WINDOWS
+ 	WSADATA wsaData;
+ 	if (WSAStartup(MAKEWORD(2, 0), &wsaData)) {
+ 		printf("Could not find a usable WinSock.dll\n");
+ 		return -1;
+ 	}
+-#endif /* CONFIG_NATIVE_WINDOWS */
++#endif /* CONFIG_WINDOWS */
+ 	return 0;
+ }
+ 
+ 
+ void os_program_deinit(void)
+ {
+-#ifdef CONFIG_NATIVE_WINDOWS
++#ifdef CONFIG_WINDOWS
+ 	WSACleanup();
+-#endif /* CONFIG_NATIVE_WINDOWS */
++#endif /* CONFIG_WINDOWS */
+ }
+ 
+ 
+diff --git a/src/utils/pcsc_funcs.c b/src/utils/pcsc_funcs.c
+index 383ed3ddf..189140186 100644
+--- a/src/utils/pcsc_funcs.c
++++ b/src/utils/pcsc_funcs.c
+@@ -519,11 +519,11 @@ struct scard_data * scard_init(const char *reader)
+ #endif
+ 	unsigned long pos;
+ 	struct scard_data *scard;
+-#ifdef CONFIG_NATIVE_WINDOWS
++#ifdef CONFIG_WINDOWS
+ 	TCHAR *readers = NULL;
+-#else /* CONFIG_NATIVE_WINDOWS */
++#else /* CONFIG_WINDOWS */
+ 	char *readers = NULL;
+-#endif /* CONFIG_NATIVE_WINDOWS */
++#endif /* CONFIG_WINDOWS */
+ 	unsigned char buf[100];
+ 	size_t blen;
+ 	int transaction = 0;
+diff --git a/wpa_supplicant/Android.mk b/wpa_supplicant/Android.mk
+index f539ce134..e323b28d5 100644
+--- a/wpa_supplicant/Android.mk
++++ b/wpa_supplicant/Android.mk
+@@ -117,7 +117,7 @@ OBJS_d =
+ OBJS_priv =
+ 
+ ifndef CONFIG_OS
+-ifdef CONFIG_NATIVE_WINDOWS
++ifdef CONFIG_WINDOWS
+ CONFIG_OS=win32
+ else
+ CONFIG_OS=unix
+@@ -853,7 +853,7 @@ L_CFLAGS += -DEAP_TNC
+ OBJS += src/eap_peer/eap_tnc.c
+ OBJS += src/eap_peer/tncc.c
+ NEED_BASE64=y
+-ifndef CONFIG_NATIVE_WINDOWS
++ifndef CONFIG_WINDOWS
+ ifndef CONFIG_DRIVER_BSD
+ LIBS += -ldl
+ endif
+@@ -989,7 +989,7 @@ ifdef CONFIG_PCSC
+ L_CFLAGS += -DPCSC_FUNCS -I/usr/include/PCSC
+ OBJS += src/utils/pcsc_funcs.c
+ # -lpthread may not be needed depending on how pcsc-lite was configured
+-ifdef CONFIG_NATIVE_WINDOWS
++ifdef CONFIG_WINDOWS
+ #Once MinGW gets support for WinScard, -lwinscard could be used instead of the
+ #dynamic symbol loading that is now used in pcsc_funcs.c
+ #LIBS += -lwinscard
+@@ -1208,7 +1208,7 @@ endif
+ 
+ ifdef TLS_FUNCS
+ ifdef CONFIG_SMARTCARD
+-ifndef CONFIG_NATIVE_WINDOWS
++ifndef CONFIG_WINDOWS
+ ifneq ($(CONFIG_L2_PACKET), freebsd)
+ LIBS += -ldl
+ endif
+@@ -1444,7 +1444,7 @@ endif
+ 
+ ifdef CONFIG_CTRL_IFACE
+ ifeq ($(CONFIG_CTRL_IFACE), y)
+-ifdef CONFIG_NATIVE_WINDOWS
++ifdef CONFIG_WINDOWS
+ CONFIG_CTRL_IFACE=named_pipe
+ else
+ CONFIG_CTRL_IFACE=unix
+@@ -1504,8 +1504,8 @@ OBJS_c += src/utils/edit_simple.c
+ endif
+ endif
+ 
+-ifdef CONFIG_NATIVE_WINDOWS
+-L_CFLAGS += -DCONFIG_NATIVE_WINDOWS
++ifdef CONFIG_WINDOWS
++L_CFLAGS += -DCONFIG_WINDOWS
+ LIBS += -lws2_32 -lgdi32 -lcrypt32
+ LIBS_c += -lws2_32
+ LIBS_p += -lws2_32 -lgdi32
+diff --git a/wpa_supplicant/ChangeLog b/wpa_supplicant/ChangeLog
+index a06a93b22..69a5576df 100644
+--- a/wpa_supplicant/ChangeLog
++++ b/wpa_supplicant/ChangeLog
+@@ -1416,7 +1416,7 @@ ChangeLog for wpa_supplicant
+ 	  are converted internally to the new format), but all drivers should
+ 	  start using the new get_scan_results2() to make them more likely to
+ 	  work with new features
+-	* Qt4 version of wpa_gui (wpa_gui-qt4 subdirectory) is now native Qt4
++	* Qt4 version of wpa_gui (wpa_gui-qt4 subdirectory) is now built-in Qt4
+ 	  application, i.e., it does not require Qt3Support anymore; Windows
+ 	  binary of wpa_gui.exe is now from this directory and only requires
+ 	  QtCore4.dll and QtGui4.dll libraries
+@@ -2108,7 +2108,7 @@ ChangeLog for wpa_supplicant
+ 	  only for driver_hostapd.c, but the changes should be trivial to add
+ 	  in associate() handler for other drivers, too (assuming the driver
+ 	  supports WPA-None)
+-	* added preliminary port for native Windows (i.e., no cygwin) using
++	* added preliminary port for built-in Windows (i.e., no cygwin) using
+ 	  mingw
+ 
+ 2005-01-02 - v0.3.3
+diff --git a/wpa_supplicant/Makefile b/wpa_supplicant/Makefile
+index 271f2aab3..c06055600 100644
+--- a/wpa_supplicant/Makefile
++++ b/wpa_supplicant/Makefile
+@@ -108,7 +108,7 @@ OBJS_c += ../src/common/cli.o
+ OBJS += wmm_ac.o
+ 
+ ifndef CONFIG_OS
+-ifdef CONFIG_NATIVE_WINDOWS
++ifdef CONFIG_WINDOWS
+ CONFIG_OS=win32
+ else
+ CONFIG_OS=unix
+@@ -864,7 +864,7 @@ CFLAGS += -DEAP_TNC
+ OBJS += ../src/eap_peer/eap_tnc.o
+ OBJS += ../src/eap_peer/tncc.o
+ NEED_BASE64=y
+-ifndef CONFIG_NATIVE_WINDOWS
++ifndef CONFIG_WINDOWS
+ ifndef CONFIG_DRIVER_BSD
+ LIBS += -ldl
+ endif
+@@ -1012,7 +1012,7 @@ ifdef CONFIG_PCSC
+ CFLAGS += -DPCSC_FUNCS -I/usr/include/PCSC
+ OBJS += ../src/utils/pcsc_funcs.o
+ # -lpthread may not be needed depending on how pcsc-lite was configured
+-ifdef CONFIG_NATIVE_WINDOWS
++ifdef CONFIG_WINDOWS
+ #Once MinGW gets support for WinScard, -lwinscard could be used instead of the
+ #dynamic symbol loading that is now used in pcsc_funcs.c
+ #LIBS += -lwinscard
+@@ -1294,7 +1294,7 @@ endif
+ 
+ ifdef TLS_FUNCS
+ ifdef CONFIG_SMARTCARD
+-ifndef CONFIG_NATIVE_WINDOWS
++ifndef CONFIG_WINDOWS
+ ifneq ($(CONFIG_L2_PACKET), freebsd)
+ LIBS += -ldl
+ endif
+@@ -1569,7 +1569,7 @@ endif
+ 
+ ifdef CONFIG_CTRL_IFACE
+ ifeq ($(CONFIG_CTRL_IFACE), y)
+-ifdef CONFIG_NATIVE_WINDOWS
++ifdef CONFIG_WINDOWS
+ CONFIG_CTRL_IFACE=named_pipe
+ else
+ CONFIG_CTRL_IFACE=unix
+@@ -1642,8 +1642,8 @@ OBJS_c += ../src/utils/edit_simple.o
+ endif
+ endif
+ 
+-ifdef CONFIG_NATIVE_WINDOWS
+-CFLAGS += -DCONFIG_NATIVE_WINDOWS
++ifdef CONFIG_WINDOWS
++CFLAGS += -DCONFIG_WINDOWS
+ LIBS += -lws2_32 -lgdi32 -lcrypt32
+ LIBS_c += -lws2_32
+ LIBS_p += -lws2_32 -lgdi32
+diff --git a/wpa_supplicant/README-Windows.txt b/wpa_supplicant/README-Windows.txt
+index 7288abd9a..8015c6701 100644
+--- a/wpa_supplicant/README-Windows.txt
++++ b/wpa_supplicant/README-Windows.txt
+@@ -191,7 +191,7 @@ scanning; this allows APs with hidden SSIDs to be used)
+ wpa_cli.exe and wpa_gui.exe can be used to interact with the
+ wpa_supplicant.exe program in the same way as with Linux. Note that
+ ctrl_interface is using UNIX domain sockets when built for cygwin, but
+-the native build for Windows uses named pipes and the contents of the
++the build for Windows uses named pipes and the contents of the
+ ctrl_interface configuration item is used to control access to the
+ interface. Anyway, this variable has to be included in the configuration
+ to enable the control interface.
+diff --git a/wpa_supplicant/android.config b/wpa_supplicant/android.config
+index 283f8eb0a..444f7b238 100644
+--- a/wpa_supplicant/android.config
++++ b/wpa_supplicant/android.config
+@@ -46,8 +46,8 @@ CONFIG_DRIVER_NL80211_QCA=y
+ #CONFIG_DRIVER_NDIS=y
+ #CFLAGS += -I/usr/include/w32api/ddk
+ #LIBS += -L/usr/local/lib
+-# For native build using mingw
+-#CONFIG_NATIVE_WINDOWS=y
++# For build using mingw
++#CONFIG_WINDOWS=y
+ # Additional directories for cross-compilation on Linux host for mingw target
+ #CFLAGS += -I/opt/mingw/mingw32/include/ddk
+ #LIBS += -L/opt/mingw/mingw32/lib
+diff --git a/wpa_supplicant/ctrl_iface.c b/wpa_supplicant/ctrl_iface.c
+index 4e8b30aba..2a82ea311 100644
+--- a/wpa_supplicant/ctrl_iface.c
++++ b/wpa_supplicant/ctrl_iface.c
+@@ -61,7 +61,7 @@
+ 
+ #ifdef __NetBSD__
+ #include <net/if_ether.h>
+-#elif !defined(__CYGWIN__) && !defined(CONFIG_NATIVE_WINDOWS)
++#elif !defined(__CYGWIN__) && !defined(CONFIG_WINDOWS)
+ #include <net/ethernet.h>
+ #endif
+ 
+diff --git a/wpa_supplicant/defconfig b/wpa_supplicant/defconfig
+index 708a82385..7524e60db 100644
+--- a/wpa_supplicant/defconfig
++++ b/wpa_supplicant/defconfig
+@@ -58,8 +58,8 @@ CONFIG_LIBNL32=y
+ #CONFIG_DRIVER_NDIS=y
+ #CFLAGS += -I/usr/include/w32api/ddk
+ #LIBS += -L/usr/local/lib
+-# For native build using mingw
+-#CONFIG_NATIVE_WINDOWS=y
++# For build using mingw
++#CONFIG_WINDOWS=y
+ # Additional directories for cross-compilation on Linux host for mingw target
+ #CFLAGS += -I/opt/mingw/mingw32/include/ddk
+ #LIBS += -L/opt/mingw/mingw32/lib
+diff --git a/wpa_supplicant/eapol_test.c b/wpa_supplicant/eapol_test.c
+index e256ac50e..9f1e8ba5f 100644
+--- a/wpa_supplicant/eapol_test.c
++++ b/wpa_supplicant/eapol_test.c
+@@ -1013,7 +1013,7 @@ static void wpa_init_conf(struct eapol_test_data *e,
+ 	e->radius_conf->num_auth_servers = 1;
+ 	as = os_zalloc(sizeof(struct hostapd_radius_server));
+ 	assert(as != NULL);
+-#if defined(CONFIG_NATIVE_WINDOWS) || defined(CONFIG_ANSI_C_EXTRA)
++#if defined(CONFIG_WINDOWS) || defined(CONFIG_ANSI_C_EXTRA)
+ 	{
+ 		int a[4];
+ 		u8 *pos;
+@@ -1025,13 +1025,13 @@ static void wpa_init_conf(struct eapol_test_data *e,
+ 		*pos++ = a[3];
+ 		as->addr.af = AF_INET;
+ 	}
+-#else /* CONFIG_NATIVE_WINDOWS or CONFIG_ANSI_C_EXTRA */
++#else /* CONFIG_WINDOWS or CONFIG_ANSI_C_EXTRA */
+ 	if (hostapd_parse_ip_addr(authsrv, &as->addr) < 0) {
+ 		wpa_printf(MSG_ERROR, "Invalid IP address '%s'",
+ 			   authsrv);
+ 		assert(0);
+ 	}
+-#endif /* CONFIG_NATIVE_WINDOWS or CONFIG_ANSI_C_EXTRA */
++#endif /* CONFIG_WINDOWS or CONFIG_ANSI_C_EXTRA */
+ 	as->port = port;
+ 	as->shared_secret = (u8 *) os_strdup(secret);
+ 	as->shared_secret_len = os_strlen(secret);
+diff --git a/wpa_supplicant/nmake.mak b/wpa_supplicant/nmake.mak
+index 617df036a..c119af1f4 100644
+--- a/wpa_supplicant/nmake.mak
++++ b/wpa_supplicant/nmake.mak
+@@ -23,7 +23,7 @@ OPENSSLDIR=C:\dev\openssl
+ CC = cl
+ OBJDIR = objs
+ 
+-CFLAGS = /DCONFIG_NATIVE_WINDOWS
++CFLAGS = /DCONFIG_WINDOWS
+ CFLAGS = $(CFLAGS) /DCONFIG_NDIS_EVENTS_INTEGRATED
+ CFLAGS = $(CFLAGS) /DCONFIG_ANSI_C_EXTRA
+ CFLAGS = $(CFLAGS) /DCONFIG_WINPCAP
+diff --git a/wpa_supplicant/rrm.c b/wpa_supplicant/rrm.c
+index cf107ebaf..975ea5165 100644
+--- a/wpa_supplicant/rrm.c
++++ b/wpa_supplicant/rrm.c
+@@ -99,7 +99,7 @@ void wpas_rrm_process_neighbor_rep(struct wpa_supplicant *wpa_s,
+ }
+ 
+ 
+-#if defined(__CYGWIN__) || defined(CONFIG_NATIVE_WINDOWS)
++#if defined(__CYGWIN__) || defined(CONFIG_WINDOWS)
+ /* Workaround different, undefined for Windows, error codes used here */
+ #ifndef ENOTCONN
+ #define ENOTCONN -1
+diff --git a/wpa_supplicant/wpa_gui-qt4/addinterface.cpp b/wpa_supplicant/wpa_gui-qt4/addinterface.cpp
+index 7d92f63d1..f8a3adf42 100644
+--- a/wpa_supplicant/wpa_gui-qt4/addinterface.cpp
++++ b/wpa_supplicant/wpa_gui-qt4/addinterface.cpp
+@@ -14,7 +14,7 @@
+ #include "wpagui.h"
+ #include "addinterface.h"
+ 
+-#ifdef CONFIG_NATIVE_WINDOWS
++#ifdef CONFIG_WINDOWS
+ #include <windows.h>
+ 
+ #ifndef WPA_KEY_ROOT
+@@ -23,7 +23,7 @@
+ #ifndef WPA_KEY_PREFIX
+ #define WPA_KEY_PREFIX TEXT("SOFTWARE\\wpa_supplicant")
+ #endif
+-#endif /* CONFIG_NATIVE_WINDOWS */
++#endif /* CONFIG_WINDOWS */
+ 
+ 
+ AddInterface::AddInterface(WpaGui *_wpagui, QWidget *parent)
+@@ -98,7 +98,7 @@ void AddInterface::addInterfaces()
+ }
+ 
+ 
+-#ifdef CONFIG_NATIVE_WINDOWS
++#ifdef CONFIG_WINDOWS
+ bool AddInterface::addRegistryInterface(const QString &ifname)
+ {
+ 	HKEY hk, ihk;
+@@ -176,7 +176,7 @@ bool AddInterface::addRegistryInterface(const QString &ifname)
+ 	RegCloseKey(ihk);
+ 	return true;
+ }
+-#endif /* CONFIG_NATIVE_WINDOWS */
++#endif /* CONFIG_WINDOWS */
+ 
+ 
+ void AddInterface::interfaceSelected(QTreeWidgetItem *sel)
+@@ -226,13 +226,13 @@ void AddInterface::interfaceSelected(QTreeWidgetItem *sel)
+ 
+ #endif /* CONFIG_CTRL_IFACE_NAMED_PIPE */
+ 
+-#ifdef CONFIG_NATIVE_WINDOWS
++#ifdef CONFIG_WINDOWS
+ 	if (!addRegistryInterface(sel->text(1))) {
+ 		QMessageBox::information(this, "wpa_gui",
+ 					 tr("Failed to add the interface into "
+ 					    "registry."));
+ 	}
+-#endif /* CONFIG_NATIVE_WINDOWS */
++#endif /* CONFIG_WINDOWS */
+ 
+ 	wpagui->selectAdapter(sel->text(1));
+ 	close();
+diff --git a/wpa_supplicant/wpa_gui-qt4/main.cpp b/wpa_supplicant/wpa_gui-qt4/main.cpp
+index bbd45c6e1..7fb6b25ec 100644
+--- a/wpa_supplicant/wpa_gui-qt4/main.cpp
++++ b/wpa_supplicant/wpa_gui-qt4/main.cpp
+@@ -6,9 +6,9 @@
+  * See README for more details.
+  */
+ 
+-#ifdef CONFIG_NATIVE_WINDOWS
++#ifdef CONFIG_WINDOWS
+ #include <winsock.h>
+-#endif /* CONFIG_NATIVE_WINDOWS */
++#endif /* CONFIG_WINDOWS */
+ #include <QApplication>
+ #include <QtCore/QLibraryInfo>
+ #include <QtCore/QTranslator>
+@@ -47,21 +47,21 @@ int main(int argc, char *argv[])
+ 
+ 	WpaGui w(&app);
+ 
+-#ifdef CONFIG_NATIVE_WINDOWS
++#ifdef CONFIG_WINDOWS
+ 	WSADATA wsaData;
+ 	if (WSAStartup(MAKEWORD(2, 0), &wsaData)) {
+ 		/* printf("Could not find a usable WinSock.dll\n"); */
+ 		return -1;
+ 	}
+-#endif /* CONFIG_NATIVE_WINDOWS */
++#endif /* CONFIG_WINDOWS */
+ 
+ 	app.w = &w;
+ 
+ 	ret = app.exec();
+ 
+-#ifdef CONFIG_NATIVE_WINDOWS
++#ifdef CONFIG_WINDOWS
+ 	WSACleanup();
+-#endif /* CONFIG_NATIVE_WINDOWS */
++#endif /* CONFIG_WINDOWS */
+ 
+ 	return ret;
+ }
+diff --git a/wpa_supplicant/wpa_gui-qt4/wpa_gui.pro b/wpa_supplicant/wpa_gui-qt4/wpa_gui.pro
+index 3fa734b57..5d51d90a0 100644
+--- a/wpa_supplicant/wpa_gui-qt4/wpa_gui.pro
++++ b/wpa_supplicant/wpa_gui-qt4/wpa_gui.pro
+@@ -9,18 +9,18 @@ DEFINES += CONFIG_CTRL_IFACE
+ 
+ win32 {
+   LIBS += -lws2_32 -static
+-  DEFINES += CONFIG_NATIVE_WINDOWS CONFIG_CTRL_IFACE_NAMED_PIPE
++  DEFINES += CONFIG_WINDOWS CONFIG_CTRL_IFACE_NAMED_PIPE
+   SOURCES += ../../src/utils/os_win32.c
+ } else:win32-g++ {
+   # cross compilation to win32
+   LIBS += -lws2_32 -static -mwindows
+-  DEFINES += CONFIG_NATIVE_WINDOWS CONFIG_CTRL_IFACE_NAMED_PIPE
++  DEFINES += CONFIG_WINDOWS CONFIG_CTRL_IFACE_NAMED_PIPE
+   SOURCES += ../../src/utils/os_win32.c
+   RESOURCES += icons_png.qrc
+ } else:win32-x-g++ {
+   # cross compilation to win32
+   LIBS += -lws2_32 -static -mwindows
+-  DEFINES += CONFIG_NATIVE_WINDOWS CONFIG_CTRL_IFACE_NAMED_PIPE
++  DEFINES += CONFIG_WINDOWS CONFIG_CTRL_IFACE_NAMED_PIPE
+   DEFINES += _X86_
+   SOURCES += ../../src/utils/os_win32.c
+   RESOURCES += icons_png.qrc
+diff --git a/wpa_supplicant/wpa_gui-qt4/wpagui.cpp b/wpa_supplicant/wpa_gui-qt4/wpagui.cpp
+index 9404ab424..caa318cfc 100644
+--- a/wpa_supplicant/wpa_gui-qt4/wpagui.cpp
++++ b/wpa_supplicant/wpa_gui-qt4/wpagui.cpp
+@@ -6,9 +6,9 @@
+  * See README for more details.
+  */
+ 
+-#ifdef CONFIG_NATIVE_WINDOWS
++#ifdef CONFIG_WINDOWS
+ #include <windows.h>
+-#endif /* CONFIG_NATIVE_WINDOWS */
++#endif /* CONFIG_WINDOWS */
+ 
+ #include <cstdio>
+ #include <unistd.h>
+@@ -40,7 +40,7 @@ WpaGui::WpaGui(QApplication *_app, QWidget *parent, const char *,
+ 	setupUi(this);
+ 	this->setWindowFlags(Qt::Dialog);
+ 
+-#ifdef CONFIG_NATIVE_WINDOWS
++#ifdef CONFIG_WINDOWS
+ 	fileStopServiceAction = new QAction(this);
+ 	fileStopServiceAction->setObjectName("Stop Service");
+ 	fileStopServiceAction->setIconText(tr("Stop Service"));
+@@ -62,7 +62,7 @@ WpaGui::WpaGui(QApplication *_app, QWidget *parent, const char *,
+ 
+ 	connect(addInterfaceAction, SIGNAL(triggered()), this,
+ 		SLOT(addInterface()));
+-#endif /* CONFIG_NATIVE_WINDOWS */
++#endif /* CONFIG_WINDOWS */
+ 
+ 	(void) statusBar();
+ 
+@@ -340,7 +340,7 @@ int WpaGui::openCtrlConnection(const char *ifname)
+ 	}
+ 
+ 	if (ctrl_iface == NULL) {
+-#ifdef CONFIG_NATIVE_WINDOWS
++#ifdef CONFIG_WINDOWS
+ 		static bool first = true;
+ 		if (first && !serviceRunning()) {
+ 			first = false;
+@@ -353,7 +353,7 @@ int WpaGui::openCtrlConnection(const char *ifname)
+ 			    QMessageBox::Yes)
+ 				startService();
+ 		}
+-#endif /* CONFIG_NATIVE_WINDOWS */
++#endif /* CONFIG_WINDOWS */
+ 		return -1;
+ 	}
+ 
+@@ -511,7 +511,7 @@ void WpaGui::updateStatus()
+ 		updateTrayIcon(TrayIconOffline);
+ 		signalMeterTimer->stop();
+ 
+-#ifdef CONFIG_NATIVE_WINDOWS
++#ifdef CONFIG_WINDOWS
+ 		static bool first = true;
+ 		if (first && connectedToService &&
+ 		    (ctrl_iface == NULL || *ctrl_iface == '\0')) {
+@@ -524,7 +524,7 @@ void WpaGui::updateStatus()
+ 			    QMessageBox::Yes)
+ 				addInterface();
+ 		}
+-#endif /* CONFIG_NATIVE_WINDOWS */
++#endif /* CONFIG_WINDOWS */
+ 		return;
+ 	}
+ 
+@@ -1760,7 +1760,7 @@ void WpaGui::stopWpsRun(bool success)
+ }
+ 
+ 
+-#ifdef CONFIG_NATIVE_WINDOWS
++#ifdef CONFIG_WINDOWS
+ 
+ #ifndef WPASVC_NAME
+ #define WPASVC_NAME TEXT("wpasvc")
+@@ -1886,7 +1886,7 @@ bool WpaGui::serviceRunning()
+ 	return running;
+ }
+ 
+-#endif /* CONFIG_NATIVE_WINDOWS */
++#endif /* CONFIG_WINDOWS */
+ 
+ 
+ void WpaGui::addInterface()
+diff --git a/wpa_supplicant/wpa_gui-qt4/wpagui.h b/wpa_supplicant/wpa_gui-qt4/wpagui.h
+index f0a34c97e..a210fe042 100644
+--- a/wpa_supplicant/wpa_gui-qt4/wpagui.h
++++ b/wpa_supplicant/wpa_gui-qt4/wpagui.h
+@@ -108,10 +108,10 @@ public slots:
+ 	virtual void wpsGeneratePin();
+ 	virtual void wpsApPinChanged(const QString &text);
+ 	virtual void wpsApPin();
+-#ifdef CONFIG_NATIVE_WINDOWS
++#ifdef CONFIG_WINDOWS
+ 	virtual void startService();
+ 	virtual void stopService();
+-#endif /* CONFIG_NATIVE_WINDOWS */
++#endif /* CONFIG_WINDOWS */
+ 	virtual void addInterface();
+ 
+ protected slots:
+@@ -161,12 +161,12 @@ private:
+ 	QTimer *signalMeterTimer;
+ 	int signalMeterInterval;
+ 
+-#ifdef CONFIG_NATIVE_WINDOWS
++#ifdef CONFIG_WINDOWS
+ 	QAction *fileStartServiceAction;
+ 	QAction *fileStopServiceAction;
+ 
+ 	bool serviceRunning();
+-#endif /* CONFIG_NATIVE_WINDOWS */
++#endif /* CONFIG_WINDOWS */
+ 
+ 	QAction *addInterfaceAction;
+ 	AddInterface *add_iface;
+-- 
+2.32.0.93.g670b81a890-goog
+
diff --git a/src/ap/acs.c b/src/ap/acs.c
index a11204536..593a6b8d2 100644
--- a/src/ap/acs.c
+++ b/src/ap/acs.c
@@ -309,8 +309,6 @@  acs_survey_interference_factor(struct freq_survey *survey, s8 min_nf)
 	else if (survey->filled & SURVEY_HAS_CHAN_TIME_RX)
 		busy = survey->channel_time_rx;
 	else {
-		/* This shouldn't really happen as survey data is checked in
-		 * acs_sanity_check() */
 		wpa_printf(MSG_ERROR, "ACS: Survey data missing");
 		return 0;
 	}
diff --git a/src/ap/wpa_auth_ft.c b/src/ap/wpa_auth_ft.c
index e80086b93..f91a2d2d5 100644
--- a/src/ap/wpa_auth_ft.c
+++ b/src/ap/wpa_auth_ft.c
@@ -455,7 +455,7 @@  static int wpa_ft_rrb_lin(const struct tlv_list *tlvs1,
 	pos += wpa_ft_tlv_lin(tlvs2, pos, endpos);
 	pos += wpa_ft_vlan_lin(vlan, pos, endpos);
 
-	/* sanity check */
+	/* validity check */
 	if (pos != endpos) {
 		wpa_printf(MSG_ERROR, "FT: Length error building RRB");
 		goto err;
@@ -3590,7 +3590,7 @@  int wpa_ft_action_rx(struct wpa_state_machine *sm, const u8 *data, size_t len)
 	}
 
 	/*
-	 * Do some sanity checking on the target AP address (not own and not
+	 * Do some validity checking on the target AP address (not own and not
 	 * broadcast. This could be extended to filter based on a list of known
 	 * APs in the MD (if such a list were configured).
 	 */
diff --git a/src/p2p/p2p_pd.c b/src/p2p/p2p_pd.c
index 05fd59349..338b47e4e 100644
--- a/src/p2p/p2p_pd.c
+++ b/src/p2p/p2p_pd.c
@@ -1425,7 +1425,7 @@  void p2p_process_prov_disc_resp(struct p2p_data *p2p, const u8 *sa,
 		 * Save the reported channel list and operating frequency.
 		 * Note that the specification mandates that the responder
 		 * should include in the channel list only channels reported by
-		 * the initiator, so this is only a sanity check, and if this
+		 * the initiator, so this is only a validity check, and if this
 		 * fails the flow would continue, although it would probably
 		 * fail. Same is true for the operating channel.
 		 */
diff --git a/src/pae/ieee802_1x_kay.c b/src/pae/ieee802_1x_kay.c
index 2fe88ac0c..7688a00a1 100644
--- a/src/pae/ieee802_1x_kay.c
+++ b/src/pae/ieee802_1x_kay.c
@@ -3057,11 +3057,11 @@  int ieee802_1x_kay_enable_new_info(struct ieee802_1x_kay *kay)
 
 
 /**
- * ieee802_1x_kay_mkpdu_sanity_check -
- * Sanity checks specified in IEEE Std 802.1X-2010, 11.11.2 (Validation of
+ * ieee802_1x_kay_mkpdu_validity_check -
+ * Validity checks specified in IEEE Std 802.1X-2010, 11.11.2 (Validation of
  * MKPDUs)
  */
-static int ieee802_1x_kay_mkpdu_sanity_check(struct ieee802_1x_kay *kay,
+static int ieee802_1x_kay_mkpdu_validity_check(struct ieee802_1x_kay *kay,
 					     const u8 *buf, size_t len)
 {
 	struct ieee8023_hdr *eth_hdr;
@@ -3215,7 +3215,7 @@  static int ieee802_1x_kay_decode_mkpdu(struct ieee802_1x_kay *kay,
 
 	wpa_printf(MSG_DEBUG, "KaY: Decode received MKPDU (ifname=%s)",
 		   kay->if_name);
-	if (ieee802_1x_kay_mkpdu_sanity_check(kay, buf, len))
+	if (ieee802_1x_kay_mkpdu_validity_check(kay, buf, len))
 		return -1;
 
 	/* handle basic parameter set */
diff --git a/tests/hwsim/test_fst_config.py b/tests/hwsim/test_fst_config.py
index 981340141..66b5a729c 100644
--- a/tests/hwsim/test_fst_config.py
+++ b/tests/hwsim/test_fst_config.py
@@ -269,7 +269,7 @@  def parse_ies(iehex, el=-1):
     iel = [iehex[i:i + 2] for i in range(0, len(iehex), 2)]
     for i in range(0, len(iel)):
          iel[i] = int(iel[i], 16)
-    # Sanity check
+    # Validity check
     i = 0
     res = []
     while i < len(iel):
diff --git a/tests/hwsim/test_wmediumd.py b/tests/hwsim/test_wmediumd.py
index ad38f03ce..8243e7ce3 100644
--- a/tests/hwsim/test_wmediumd.py
+++ b/tests/hwsim/test_wmediumd.py
@@ -1,4 +1,4 @@ 
-# wmediumd sanity checks
+# wmediumd validity checks
 # Copyright (c) 2015, Intel Deutschland GmbH
 #
 # This software may be distributed under the terms of the BSD license.
diff --git a/tests/remote/run-tests.py b/tests/remote/run-tests.py
index 67993a3c2..bae4262a0 100755
--- a/tests/remote/run-tests.py
+++ b/tests/remote/run-tests.py
@@ -33,7 +33,7 @@  from hwsim_wrapper import run_hwsim_test
 def usage():
     print("USAGE: " + sys.argv[0] + " -t devices")
     print("USAGE: " + sys.argv[0] + " -t check_devices")
-    print("USAGE: " + sys.argv[0] + " -d <dut_name> -t <all|sanity|tests_to_run> [-r <ref_name>] [-c <cfg_file.py>] [-m <all|monitor_name>] [-h hwsim_tests] [-f hwsim_modules][-R][-T][-P][-S][-v]")
+    print("USAGE: " + sys.argv[0] + " -d <dut_name> -t <all|validity|tests_to_run> [-r <ref_name>] [-c <cfg_file.py>] [-m <all|monitor_name>] [-h hwsim_tests] [-f hwsim_modules][-R][-T][-P][-S][-v]")
     print("USAGE: " + sys.argv[0])
 
 def get_devices(devices, duts, refs, monitors):
@@ -270,9 +270,9 @@  def main():
         tests_to_run = tests
     if requested_tests[0] == "help":
         pass
-    elif requested_tests[0] == "sanity":
+    elif requested_tests[0] == "validity":
         for test in tests:
-            if test.__name__.startswith("test_sanity_"):
+            if test.__name__.startswith("test_validity_"):
                 tests_to_run.append(test)
     else:
         for test in requested_tests:
diff --git a/wpa_supplicant/ctrl_iface.c b/wpa_supplicant/ctrl_iface.c
index 4e8b30aba..2b3243e5a 100644
--- a/wpa_supplicant/ctrl_iface.c
+++ b/wpa_supplicant/ctrl_iface.c
@@ -5918,7 +5918,7 @@  static struct p2ps_provision * p2p_parse_asp_provision_cmd(const char *cmd)
 	for (i = 0; p2ps_prov->cpt_priority[i]; i++)
 		p2ps_prov->cpt_mask |= p2ps_prov->cpt_priority[i];
 
-	/* force conncap with tstCap (no sanity checks) */
+	/* force conncap with tstCap (no validity checks) */
 	pos = os_strstr(cmd, "tstCap=");
 	if (pos) {
 		role = strtol(pos + 7, NULL, 16);
diff --git a/wpa_supplicant/p2p_supplicant_sd.c b/wpa_supplicant/p2p_supplicant_sd.c
index f8675e68b..b400cbaca 100644
--- a/wpa_supplicant/p2p_supplicant_sd.c
+++ b/wpa_supplicant/p2p_supplicant_sd.c
@@ -826,7 +826,7 @@  static void wpas_sd_p2ps_serv_response(struct wpa_supplicant *wpa_s,
 		size_t buf_len;
 		u8 svc_len;
 
-		/* Sanity check fixed length+svc_str */
+		/* Validity check fixed length+svc_str */
 		if (6 >= tlv_end - pos)
 			break;
 		svc_len = pos[6];
@@ -854,7 +854,7 @@  static void wpas_sd_p2ps_serv_response(struct wpa_supplicant *wpa_s,
 		buf_len = WPA_GET_LE16(pos);
 		pos += sizeof(u16);
 
-		/* Sanity check buffer length */
+		/* Validity check buffer length */
 		if (buf_len > (unsigned int) (tlv_end - pos))
 			break;