Skip to content

Commit

Permalink
Fix NAT option handling
Browse files Browse the repository at this point in the history
Regression introduced with b119882

Don't overwrite CAKE_FLOW_NAT_FLAG in flow_mode with TCA_CAKE_FLOW_MODE.

Signed-off-by: Ryan Mounce <ryan@mounce.com.au>
  • Loading branch information
rmounce committed Jun 26, 2018
1 parent 8da93e1 commit 0520a6c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion sch_cake.c
Original file line number Diff line number Diff line change
Expand Up @@ -2549,7 +2549,9 @@ static int cake_change(struct Qdisc *sch, struct nlattr *opt,
}

if (tb[TCA_CAKE_FLOW_MODE])
q->flow_mode = nla_get_u32(tb[TCA_CAKE_FLOW_MODE]);
q->flow_mode = (q->flow_mode & CAKE_FLOW_NAT_FLAG) |
(nla_get_u32(tb[TCA_CAKE_FLOW_MODE]) &
~CAKE_FLOW_NAT_FLAG);

if (tb[TCA_CAKE_OVERHEAD]) {
q->rate_overhead = nla_get_s32(tb[TCA_CAKE_OVERHEAD]);
Expand Down

0 comments on commit 0520a6c

Please sign in to comment.