From: Felix Fietkau <nbd@nbd.name>
To: netdev@vger.kernel.org
Subject: [PATCH 1/2] sch_cake: allow setting TCA_CAKE_NAT with value 0 if conntrack is disabled
Date: Mon, 7 Mar 2022 19:26:01 +0100 [thread overview]
Message-ID: <20220307182602.16978-1-nbd@nbd.name> (raw)
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)
next reply other threads:[~2022-03-07 18:26 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-07 18:26 Felix Fietkau [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220307182602.16978-1-nbd@nbd.name \
--to=nbd@nbd.name \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).