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
pyroute2.tc offers support for u32 filter. However, is there a way I can provide negative offset value (eg: for destination MAC address matching) ? Providing negative offset in the following syntax value installs wrong filter configuration:
@ffourcot Thanks for pointing to #656. I tried the fix provided by @Vic063 and it might need a small update which I have mentioned as comment in the commit.
However, even with the fix, the config that I am trying to install wouldn't work i.e.
Executing ip.tc('add-filter', 'u32', idx, parent=0x10000, protocol=socket.AF_INET, target=0x10011, keys=['0x00000303/0x0000ffff-16',]) would result in a match match 03030000/ffff0000 at -16 (success 0 )
whereas executing sudo tc filter add dev $ifname protocol all parent 1:0 prio 1 u32 match u32 0x00000303 0x0000ffff at -16 classid 1:11 results in match 00000303/0000ffff at -16 (success 0 )
Hello,
pyroute2.tc offers support for u32 filter. However, is there a way I can provide negative offset value (eg: for destination MAC address matching) ? Providing negative offset in the following syntax value installs wrong filter configuration:
However, configuring the same using linux iproute seems to work fine as seen below:
Basically, when -14 is given, pyroute2.tc seems to install a filter match at (256 - 14) offset, where 256 is the length of the array used in the code.
Is there another syntax that works for negative offset value? Thanks in advance for any guidance with respect to this!
The text was updated successfully, but these errors were encountered: