hostapd: adjust patches to work with git am
[openwrt/openwrt.git] / package / network / services / hostapd / patches / 381-hostapd_cli_UNKNOWN-COMMAND.patch
index e9083f6ecc6d583d3575826605d7daf4c5c935af..b7d2e2b6592ad47e46563d54b4ca6e170ce70b42 100644 (file)
@@ -1,3 +1,14 @@
+From: Denton Gentry <denny@geekhold.com>
+Date: Wed, 30 May 2018 15:05:42 +0000
+Subject: [PATCH] hostapd: make cli treat UNKNOWN COMMAND as failing
+
+Avoid infinite loop at 100% CPU when running hostapd_cli
+if CONFIG_CTRL_IFACE_MIB is not defined.
+
+  _newselect(4, [3], NULL, NULL, ...)
+  recvfrom(3, "UNKNOWN COMMAND\n", 4095, 0, NULL, NULL) = 16
+  sendto(3, "STA-NEXT UNKNOWN COMMAND", 24, 0, NULL, 0) = 24
+
 --- a/hostapd/hostapd_cli.c
 +++ b/hostapd/hostapd_cli.c
 @@ -757,7 +757,7 @@ static int wpa_ctrl_command_sta(struct w