forked from osmocom/wireshark
RadioTap: skip present bits for vendor NS.
An error messages was shown when more than 1 present bits was set for a vendor NS because these bits were not skipped properly. Closes https://gitlab.com/wireshark/wireshark/-/issues/17047
(cherry picked from commit 96e31cb116
)
This commit is contained in:
parent
787e19080e
commit
c2d9eb4cfd
|
@ -346,6 +346,7 @@ return_tlv:
|
||||||
}
|
}
|
||||||
if (!align) {
|
if (!align) {
|
||||||
/* skip all subsequent data */
|
/* skip all subsequent data */
|
||||||
|
int skip_size = IEEE80211_RADIOTAP_RADIOTAP_NAMESPACE - (iterator->_arg_index % 32);
|
||||||
/* XXX - we should report an expert info here */
|
/* XXX - we should report an expert info here */
|
||||||
if (!iterator->_next_ns_data)
|
if (!iterator->_next_ns_data)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
@ -353,6 +354,9 @@ return_tlv:
|
||||||
/* give up on this namespace */
|
/* give up on this namespace */
|
||||||
iterator->current_namespace = NULL;
|
iterator->current_namespace = NULL;
|
||||||
iterator->_next_ns_data = NULL;
|
iterator->_next_ns_data = NULL;
|
||||||
|
// Remove 1 because jump to next_entry will also shift bitmap by 1
|
||||||
|
iterator->_bitmap_shifter >>= skip_size - 1;
|
||||||
|
iterator->_arg_index += skip_size - 1;
|
||||||
/* XXX - we should report an expert info here */
|
/* XXX - we should report an expert info here */
|
||||||
if (!ITERATOR_VALID(iterator, 0))
|
if (!ITERATOR_VALID(iterator, 0))
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
Loading…
Reference in New Issue