-
I'd like to use u32 filters with clsact qdisc.
But when I try to do it use pyroute2, I get error:
Of course the interface exists.
I'd appreciate it if you could help me find my mistake. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
There was a wrong parent; the kernel expects there ip.tc("add-filter", "u32", dev_index,
parent=0xfffffff2, # <--- here was a wrong parent
prio=2,
protocol=protocols.ETH_P_IP,
target=0x800,
keys=[f"{dst_ip_hex}/{dst_mask_hex}+{offset}"],
action=dict(kind="gact", action="ok")
) Just for reference: https://github.com/iproute2/iproute2/blob/41710ace5e8fadff354f3dba67bf27ed3a3c5ae7/include/uapi/linux/pkt_sched.h#L80 There is a significant lack of user-friendliness in pyroute2 when it comes to traffic control management, so any contributions in this area are highly welcome. |
Beta Was this translation helpful? Give feedback.
-
Thank you! |
Beta Was this translation helpful? Give feedback.
There was a wrong parent; the kernel expects there
0xfffffff2
in this case.Just for reference: https://github.com/iproute2/iproute2/blob/41710ace5e8fadff354f3dba67bf27ed3a3c5ae7/include/uapi/linux/pkt_sched.h#L80
There is a significant lack of user-friendliness in pyroute2 when it comes to traffic control management, so any contributions in this area are highly welcome.