Closed paulc11 closed 3 years ago
Without the fix, the drop monitor HW drop will never be enabled. Since both sizeof(struct genlmsghdr) and sizeof( struct nlattr) are 4 bytes, Kernel will think the netlink message only has one attribute and will not take the second attribute.
Add some debug prints in kernel function net_dm_cmd_trace inside net/core/drop_monitor.c, you will see set_hw is false even if the host-sflow agent tries to enable it.
Merged. Thanks!
Please see implementation of function genlmsg_put of libnl.