aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormarino <marino@FreeBSD.org>2014-10-13 20:56:04 +0800
committermarino <marino@FreeBSD.org>2014-10-13 20:56:04 +0800
commitb5c343b7f5e1825fc5f6f29dc49373049f781112 (patch)
tree3dea70dc296010f93b54c83b1008eee553811355
parent601a0a165c34860115589f3b451ff3fa4a96c8ed (diff)
downloadfreebsd-ports-gnome-b5c343b7f5e1825fc5f6f29dc49373049f781112.tar.gz
freebsd-ports-gnome-b5c343b7f5e1825fc5f6f29dc49373049f781112.tar.zst
freebsd-ports-gnome-b5c343b7f5e1825fc5f6f29dc49373049f781112.zip
wpa/supplicant: Fix driver list with NDIS, take 2
It turns out the driver list was only showing "null" for NDIS when -h (help) or an unknown switch was passed to wpa_supplicant. The cause is that the NDIS driver is the only that that has to be initialized, and the initialization wasn't occurring in the above case. The fix is the move the NDIS driver initialization before the command switches are examined in case wpa_supplicant aborts to usage early.
-rw-r--r--security/wpa_supplicant/Makefile2
-rw-r--r--security/wpa_supplicant/files/patch-wpa__supplicant_main.c14
-rw-r--r--security/wpa_supplicant/files/patch-wpa__supplicant_wpa__supplicant.c11
3 files changed, 26 insertions, 1 deletions
diff --git a/security/wpa_supplicant/Makefile b/security/wpa_supplicant/Makefile
index f193e7f71f4b..48624769793d 100644
--- a/security/wpa_supplicant/Makefile
+++ b/security/wpa_supplicant/Makefile
@@ -2,7 +2,7 @@
PORTNAME= wpa_supplicant
PORTVERSION= 2.3
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= security net
MASTER_SITES= http://w1.fi/releases/
diff --git a/security/wpa_supplicant/files/patch-wpa__supplicant_main.c b/security/wpa_supplicant/files/patch-wpa__supplicant_main.c
new file mode 100644
index 000000000000..7ddc41de535d
--- /dev/null
+++ b/security/wpa_supplicant/files/patch-wpa__supplicant_main.c
@@ -0,0 +1,14 @@
+--- wpa_supplicant/main.c.orig 2014-10-09 14:41:31 UTC
++++ wpa_supplicant/main.c
+@@ -173,6 +173,11 @@ int main(int argc, char *argv[])
+
+ wpa_supplicant_fd_workaround(1);
+
++#ifdef CONFIG_DRIVER_NDIS
++ void driver_ndis_init_ops(void);
++ driver_ndis_init_ops();
++#endif /* CONFIG_DRIVER_NDIS */
++
+ for (;;) {
+ c = getopt(argc, argv,
+ "b:Bc:C:D:de:f:g:G:hi:I:KLm:No:O:p:P:qsTtuvW");
diff --git a/security/wpa_supplicant/files/patch-wpa__supplicant_wpa__supplicant.c b/security/wpa_supplicant/files/patch-wpa__supplicant_wpa__supplicant.c
new file mode 100644
index 000000000000..36f894fd193a
--- /dev/null
+++ b/security/wpa_supplicant/files/patch-wpa__supplicant_wpa__supplicant.c
@@ -0,0 +1,11 @@
+--- wpa_supplicant/wpa_supplicant.c.orig 2014-10-09 14:41:31 UTC
++++ wpa_supplicant/wpa_supplicant.c
+@@ -4098,7 +4098,7 @@ struct wpa_global * wpa_supplicant_init(
+ if (params == NULL)
+ return NULL;
+
+-#ifdef CONFIG_DRIVER_NDIS
++#ifdef XXXCONFIG_DRIVER_NDIS
+ {
+ void driver_ndis_init_ops(void);
+ driver_ndis_init_ops();