ng_tag can operate on arbitrary data of mbuf_tags.
This should work for any data sets.
ngctl + mkpeer . tag t t + msg t sethookin { thisHook="t" tag_len=4 tag_data=[1] }
works. But the following does not:
+ msg t sethookin { thisHook="t" tag_len=1 tag_data=[1] } ngctl: send msg: Invalid argument
Especially in the case of checking for mbuf_tag values, the length
of checked data is important.
The reason behind this behavior is, that the record size
is padded to the next multiple of the alignment. Therefore
it's sufficient to check for large enough data received.
PR: 241462