mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-04 16:50:17 +01:00
platform: use u32 netlink type for TCA_FQ_CODEL_ECN
In practice, there is no difference when representing 0 or 1 as signed/unsigned 32
bit integer. But still use the correct type that also kernel uses.
Also, the implicit conversation from uint32 to bool was correct already.
Still, explicitly convert the uint32 value to boolean in _new_from_nl_qdisc().
It's no change in behavior.
(cherry picked from commit a1099a1fab)
This commit is contained in:
parent
366d3af009
commit
ef2b660bb8
1 changed files with 2 additions and 2 deletions
|
|
@ -3547,7 +3547,7 @@ _new_from_nl_qdisc (struct nlmsghdr *nlh, gboolean id_only)
|
|||
obj->qdisc.fq_codel.memory = nla_get_u32 (options_attr);
|
||||
break;
|
||||
case TCA_FQ_CODEL_ECN:
|
||||
obj->qdisc.fq_codel.ecn = nla_get_u32 (options_attr);
|
||||
obj->qdisc.fq_codel.ecn = !!nla_get_u32 (options_attr);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -4244,7 +4244,7 @@ _nl_msg_new_qdisc (int nlmsg_type,
|
|||
if (qdisc->fq_codel.memory != -1)
|
||||
NLA_PUT_U32 (msg, TCA_FQ_CODEL_MEMORY_LIMIT, qdisc->fq_codel.memory);
|
||||
if (qdisc->fq_codel.ecn)
|
||||
NLA_PUT_S32 (msg, TCA_FQ_CODEL_ECN, qdisc->fq_codel.ecn);
|
||||
NLA_PUT_U32 (msg, TCA_FQ_CODEL_ECN, qdisc->fq_codel.ecn);
|
||||
}
|
||||
|
||||
nla_nest_end (msg, tc_options);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue