3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-10-04 02:18:49 +02:00

p2putil: Fix logic in required attribute check

The logic here intended to check whether all required attributes were
available.  However, it set the parse_error to true instead of
have_required to false as intended.
This commit is contained in:
Denis Kenzior 2019-10-17 17:38:53 -05:00
parent 5dbccee798
commit a533734471

View File

@ -720,7 +720,7 @@ static int p2p_parse_attrs(const uint8_t *pdu, size_t len, int type, ...)
entry = e->data;
if (!entry->present && (entry->flags & ATTR_FLAG_REQUIRED)) {
parse_error = true;
have_required = false;
goto done;
}
}