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 |
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 --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 }
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(-)