diff mbox series

[1/2] sch_cake: allow setting TCA_CAKE_NAT with value 0 if conntrack is disabled

Message ID 20220307182602.16978-1-nbd@nbd.name (mailing list archive)
State Changes Requested
Delegated to: Netdev Maintainers
Headers show
Series [1/2] sch_cake: allow setting TCA_CAKE_NAT with value 0 if conntrack is disabled | expand

Checks

Context Check Description
netdev/tree_selection success Guessed tree name to be net-next
netdev/fixes_present success Fixes tag not required for -next series
netdev/subject_prefix warning Target tree name not specified in the subject
netdev/cover_letter success Single patches do not need cover letters
netdev/patch_count success Link
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 0 this patch: 0
netdev/cc_maintainers fail 7 maintainers not CCed: jiri@resnulli.us kuba@kernel.org toke@toke.dk jhs@mojatatu.com cake@lists.bufferbloat.net xiyou.wangcong@gmail.com davem@davemloft.net
netdev/build_clang success Errors and warnings before: 0 this patch: 0
netdev/module_param success Was 0 now: 0
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 0 this patch: 0
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 14 lines checked
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

Felix Fietkau March 7, 2022, 6:26 p.m. UTC
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(-)

Comments

Toke Høiland-Jørgensen March 7, 2022, 8:37 p.m. UTC | #1
Felix Fietkau <nbd@nbd.name> writes:

> Allows the 'nonat' option to be specified
>
> Signed-off-by: Felix Fietkau <nbd@nbd.name>

Right, makes sense!

Acked-by: Toke Høiland-Jørgensen <toke@toke.dk>
diff mbox series

Patch

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
 	}