[Bug 241462] netgraph/ng_tag: Variable length data can not be set for all length
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Thu Oct 24 11:33:26 UTC 2019
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=241462
Bug ID: 241462
Summary: netgraph/ng_tag: Variable length data can not be set
for all length
Product: Base System
Version: CURRENT
Hardware: Any
OS: Any
Status: New
Severity: Affects Some People
Priority: ---
Component: kern
Assignee: bugs at FreeBSD.org
Reporter: lutz at donnerhacke.de
ng_tag does can operator on arbitary data of mbuf_tags.
This only works for any data sets.
+ 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.
Patch is in review D22140
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the freebsd-bugs
mailing list