netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] sch_cake: allow setting TCA_CAKE_NAT with value 0 if conntrack is disabled
@ 2022-03-07 18:26 Felix Fietkau
  2022-03-07 18:26 ` [PATCH 2/2] sch_fq_codel: fix running with classifiers that don't set a classid Felix Fietkau
  2022-03-07 20:37 ` [PATCH 1/2] sch_cake: allow setting TCA_CAKE_NAT with value 0 if conntrack is disabled Toke Høiland-Jørgensen
  0 siblings, 2 replies; 5+ messages in thread
From: Felix Fietkau @ 2022-03-07 18:26 UTC (permalink / raw)
  To: netdev

Allows the 'nonat' option to be specified

Signed-off-by: Felix Fietkau <nbd@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)


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-03-07 22:43 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-03-07 18:26 [PATCH 1/2] sch_cake: allow setting TCA_CAKE_NAT with value 0 if conntrack is disabled Felix Fietkau
2022-03-07 18:26 ` [PATCH 2/2] sch_fq_codel: fix running with classifiers that don't set a classid Felix Fietkau
2022-03-07 20:41   ` Toke Høiland-Jørgensen
2022-03-07 22:43     ` Eric Dumazet
2022-03-07 20:37 ` [PATCH 1/2] sch_cake: allow setting TCA_CAKE_NAT with value 0 if conntrack is disabled Toke Høiland-Jørgensen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).