From: Baowen Zheng Date: Mon, 13 Dec 2021 14:46:04 +0000 (+0100) Subject: flow_offload: return EOPNOTSUPP for the unsupported mpls action type X-Git-Tag: baikal/mips/sdk6.1~6857^2~21 X-Git-Url: https://git.baikalelectronics.ru/sdk/?a=commitdiff_plain;h=e4f9e64b82b55f07c4f870f2571be60f1d0ca80b;p=kernel.git flow_offload: return EOPNOTSUPP for the unsupported mpls action type We need to return EOPNOTSUPP for the unsupported mpls action type when setup the flow action. In the original implement, we will return 0 for the unsupported mpls action type, actually we do not setup it and the following actions to the flow action entry. Fixes: bc5052d8e47f ("net: sched: take rtnl lock in tc_setup_flow_action()") Signed-off-by: Baowen Zheng Signed-off-by: Simon Horman Acked-by: Jamal Hadi Salim Signed-off-by: David S. Miller --- diff --git a/net/sched/cls_api.c b/net/sched/cls_api.c index 2ef8f5a6205a9..e54f0a42270c1 100644 --- a/net/sched/cls_api.c +++ b/net/sched/cls_api.c @@ -3687,6 +3687,7 @@ int tc_setup_flow_action(struct flow_action *flow_action, entry->mpls_mangle.ttl = tcf_mpls_ttl(act); break; default: + err = -EOPNOTSUPP; goto err_out_locked; } } else if (is_tcf_skbedit_ptype(act)) {