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
1 changed files with 1 additions and 1 deletions

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;
}
}