diff options
author | Pablo Neira Ayuso <pablo@netfilter.org> | 2023-03-17 10:16:40 +0100 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2023-03-28 10:26:34 +0200 |
commit | edecd58755a84dbe8f36795f619189490eeb3ef1 (patch) | |
tree | 8314b45f383d6213023df14d709a783be89bf7d2 /INSTALL | |
parent | cd2d1fc4e8b114f8526b0ce61cfd5cfce8eacac6 (diff) |
evaluate: support shifts larger than the width of the left operand
If we want to left-shift a value of narrower type and assign the result
to a variable of a wider type, we are constrained to only shifting up to
the width of the narrower type. Thus:
add rule t c meta mark set ip dscp << 2
works, but:
add rule t c meta mark set ip dscp << 8
does not, even though the lvalue is large enough to accommodate the
result.
Upgrade the maximum length based on the statement datatype length, which
is provided via context, if it is larger than expression lvalue.
Update netlink_delinearize.c to handle the case where the length of a
shift expression does not match that of its left-hand operand.
Based on patch from Jeremy Sowden.
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'INSTALL')
0 files changed, 0 insertions, 0 deletions