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/wpa_supplicant wpa_supplicant: Don't r...



details:   https://anonhg.NetBSD.org/src/rev/192a39dadbdc
branches:  trunk
changeset: 936213:192a39dadbdc
user:      roy <roy%NetBSD.org@localhost>
date:      Tue Jul 21 12:19:52 2020 +0000

description:
wpa_supplicant: Don't report an error when there are no op classes to add

Instead, log a diagnostic so that noise to the user is reduced.

diffstat:

 external/bsd/wpa/dist/wpa_supplicant/op_classes.c |  8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diffs (19 lines):

diff -r ea02b7afc4c2 -r 192a39dadbdc external/bsd/wpa/dist/wpa_supplicant/op_classes.c
--- a/external/bsd/wpa/dist/wpa_supplicant/op_classes.c Tue Jul 21 10:34:16 2020 +0000
+++ b/external/bsd/wpa/dist/wpa_supplicant/op_classes.c Tue Jul 21 12:19:52 2020 +0000
@@ -309,9 +309,13 @@
        }
 
        *ie_len = wpabuf_len(buf) - 2;
-       if (*ie_len < 2 || wpabuf_len(buf) > len) {
+       if (*ie_len < 2) {
+               wpa_printf(MSG_DEBUG,
+                          "No supported operating classes IE to add");
+               res = 0;
+       } else if (wpabuf_len(buf) > len) {
                wpa_printf(MSG_ERROR,
-                          "Failed to add supported operating classes IE");
+                          "Supported operating classes IE exceed length");
                res = 0;
        } else {
                os_memcpy(pos, wpabuf_head(buf), wpabuf_len(buf));



Home | Main Index | Thread Index | Old Index