You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When adding the "flow" traffic control filter in 'map' mode, the key parameter is processed incorrectly resulting in a NetlinkError: (22, 'Invalid argument') exception in many cases.
The problem is that in map mode (rather than hash mode), this function leaves keys as a plain string. When used with a value like "proto-src" this leads to the bits for both "proto-src" and "src" being combined rather than just "proto-src" since in will do a substring test when both its arguments are strings.
A potential fix would be:
if name == 'hash':
keys = keys.split(',')
+ else:+ keys = [keys]
The text was updated successfully, but these errors were encountered:
When adding the "flow" traffic control filter in 'map' mode, the
key
parameter is processed incorrectly resulting in aNetlinkError: (22, 'Invalid argument')
exception in many cases.For example, the following invocation:
Internally, this function uses
get_tca_keys
to convert the 'key' parameter into a bit-mask. For convenience, the implementation is reproduced below:The problem is that in map mode (rather than hash mode), this function leaves
keys
as a plain string. When used with a value like"proto-src"
this leads to the bits for both"proto-src"
and"src"
being combined rather than just"proto-src"
sincein
will do a substring test when both its arguments are strings.A potential fix would be:
The text was updated successfully, but these errors were encountered: