3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-12-22 21:22:37 +01: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; entry = e->data;
if (!entry->present && (entry->flags & ATTR_FLAG_REQUIRED)) { if (!entry->present && (entry->flags & ATTR_FLAG_REQUIRED)) {
parse_error = true; have_required = false;
goto done; goto done;
} }
} }