Previously, not all variable length offsets had an is_variable flag
- this knowledge was essentially encoded in the generating logic.
Now that the offset code has been generalized, the flag has been
included for these cases as well and it needs to be set appropriately.
The radio code was missing it for the link headers so this adds it.
off_nl_nosnap = 3; /* 802.2 */
break;
off_nl_nosnap = 3; /* 802.2 */
break;
case DLT_PRISM_HEADER:
case DLT_IEEE802_11_RADIO_AVS:
case DLT_IEEE802_11_RADIO:
case DLT_PRISM_HEADER:
case DLT_IEEE802_11_RADIO_AVS:
case DLT_IEEE802_11_RADIO:
+ off_linkhdr.is_variable = 1;
+ /* Fall through, 802.11 doesn't have a variable link
+ * prefix but is otherwise the same. */
+
+ case DLT_IEEE802_11:
/*
* 802.11 doesn't really have a link-level type field.
* We set "off_linktype" to the offset of the LLC header.
/*
* 802.11 doesn't really have a link-level type field.
* We set "off_linktype" to the offset of the LLC header.
off_linktype = 24;
off_linkpl.constant_part = 0; /* link-layer header is variable-length */
off_linkpl.is_variable = 1;
off_linktype = 24;
off_linkpl.constant_part = 0; /* link-layer header is variable-length */
off_linkpl.is_variable = 1;
+ off_linkhdr.is_variable = 1;
off_nl = 8; /* 802.2+SNAP */
off_nl_nosnap = 3; /* 802.2 */
break;
off_nl = 8; /* 802.2+SNAP */
off_nl_nosnap = 3; /* 802.2 */
break;