[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220307182602.16978-1-nbd@nbd.name>
Date: Mon, 7 Mar 2022 19:26:01 +0100
From: Felix Fietkau <nbd@....name>
To: netdev@...r.kernel.org
Subject: [PATCH 1/2] sch_cake: allow setting TCA_CAKE_NAT with value 0 if conntrack is disabled
Allows the 'nonat' option to be specified
Signed-off-by: Felix Fietkau <nbd@....name>
---
net/sched/sch_cake.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/net/sched/sch_cake.c b/net/sched/sch_cake.c
index a43a58a73d09..57c0095a831b 100644
--- a/net/sched/sch_cake.c
+++ b/net/sched/sch_cake.c
@@ -2583,9 +2583,11 @@ static int cake_change(struct Qdisc *sch, struct nlattr *opt,
q->flow_mode |= CAKE_FLOW_NAT_FLAG *
!!nla_get_u32(tb[TCA_CAKE_NAT]);
#else
- NL_SET_ERR_MSG_ATTR(extack, tb[TCA_CAKE_NAT],
- "No conntrack support in kernel");
- return -EOPNOTSUPP;
+ if (nla_get_u32(tb[TCA_CAKE_NAT])) {
+ NL_SET_ERR_MSG_ATTR(extack, tb[TCA_CAKE_NAT],
+ "No conntrack support in kernel");
+ return -EOPNOTSUPP;
+ }
#endif
}
--
2.32.0 (Apple Git-132)
Powered by blists - more mailing lists