Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 24 Oct 2019 11:33:25 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 241462] netgraph/ng_tag: Variable length data can not be set for all length
Message-ID:  <bug-241462-227@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D241462

            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@FreeBSD.org
          Reporter: lutz@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=3D"t" tag_len=3D4 tag_data=3D[1] }

works. But the following does not:

+ msg t sethookin { thisHook=3D"t" tag_len=3D1 tag_data=3D[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

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-241462-227>