- vnet_feature_enable_disable ("device-input", "policer-input", sw_if_index,
- apply, 0, 0);
+ if (dir == VLIB_RX)
+ {
+ vnet_feature_enable_disable ("device-input", "policer-input",
+ sw_if_index, apply, 0, 0);
+ }
+ else
+ {
+ vnet_feature_enable_disable ("ip4-output", "policer-output", sw_if_index,
+ apply, 0, 0);
+ vnet_feature_enable_disable ("ip6-output", "policer-output", sw_if_index,
+ apply, 0, 0);
+ }