Module Name: src
Committed By: roy
Date: Tue Apr 11 14:15:08 UTC 2017
Modified Files:
src/external/bsd/wpa/dist/src/drivers: driver_bsd.c
Log Message:
Use RO_MSGFILTER.
To generate a diff of this commit:
cvs rdiff -u -r1.28 -r1.29 src/external/bsd/wpa/dist/src/drivers/driver_bsd.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/external/bsd/wpa/dist/src/drivers/driver_bsd.c
diff -u src/external/bsd/wpa/dist/src/drivers/driver_bsd.c:1.28 src/external/bsd/wpa/dist/src/drivers/driver_bsd.c:1.29
--- src/external/bsd/wpa/dist/src/drivers/driver_bsd.c:1.28 Tue Apr 11 14:13:01 2017
+++ src/external/bsd/wpa/dist/src/drivers/driver_bsd.c Tue Apr 11 14:15:08 2017
@@ -1696,6 +1696,14 @@ static void *
bsd_global_init(void *ctx)
{
struct bsd_driver_global *global;
+#ifdef RO_MSGFILTER
+ unsigned char msgfilter[] = {
+ RTM_IEEE80211,
+#ifndef HOSTAPD
+ RTM_IFINFO, RTM_IFANNOUNCE,
+#endif
+ };
+#endif
global = os_zalloc(sizeof(*global));
if (global == NULL)
@@ -1718,6 +1726,13 @@ bsd_global_init(void *ctx)
goto fail;
}
+#ifdef RO_MSGFILTER
+ if (setsockopt(global->route, PF_ROUTE, RO_MSGFILTER,
+ &msgfilter, sizeof(msgfilter)) < 0)
+ wpa_printf(MSG_ERROR, "setsockopt[PF_ROUTE,RO_MSGFILTER]: %s",
+ strerror(errno));
+#endif
+
#ifdef HOSTAPD
eloop_register_read_sock(global->route, bsd_wireless_event_receive,
NULL, global);