提交 bcddc196 编写于 作者: S Steen Hegelund 提交者: David S. Miller

net: microchip: sparx5: Ensure L3 protocol has a default value

This ensures that the l3_proto always have a valid value and that any
dissector parsing errors causes the flower rule to be discarded.
Signed-off-by: NSteen Hegelund <steen.hegelund@microchip.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 418e0721
......@@ -648,7 +648,11 @@ static int sparx5_tc_flower_replace(struct net_device *ndev,
return PTR_ERR(vrule);
vrule->cookie = fco->cookie;
sparx5_tc_use_dissectors(fco, admin, vrule, &l3_proto);
l3_proto = ETH_P_ALL;
err = sparx5_tc_use_dissectors(fco, admin, vrule, &l3_proto);
if (err)
goto out;
err = sparx5_tc_add_rule_counter(admin, vrule);
if (err)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册