]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
net: sched: Remove TCA_OPTIONS from policy
authorDavid Ahern <dsahern@gmail.com>
Wed, 24 Oct 2018 15:32:49 +0000 (08:32 -0700)
committerJuerg Haefliger <juergh@canonical.com>
Wed, 24 Jul 2019 01:57:58 +0000 (19:57 -0600)
BugLink: https://bugs.launchpad.net/bugs/1836802
commit e72bde6b66299602087c8c2350d36a525e75d06e upstream.

Marco reported an error with hfsc:
root@Calimero:~# tc qdisc add dev eth0 root handle 1:0 hfsc default 1
Error: Attribute failed policy validation.

Apparently a few implementations pass TCA_OPTIONS as a binary instead
of nested attribute, so drop TCA_OPTIONS from the policy.

Fixes: 8b4c3cdd9dd8 ("net: sched: Add policy validation for tc attributes")
Reported-by: Marco Berizzi <pupilla@libero.it>
Signed-off-by: David Ahern <dsahern@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
net/sched/sch_api.c

index 267f88398bc46fddbc5a0b66eb26fdc09099647a..60e90a1b1c1385c07a15d64a76f6936d237802ba 100644 (file)
@@ -1207,7 +1207,6 @@ check_loop_fn(struct Qdisc *q, unsigned long cl, struct qdisc_walker *w)
 
 const struct nla_policy rtm_tca_policy[TCA_MAX + 1] = {
        [TCA_KIND]              = { .type = NLA_STRING },
-       [TCA_OPTIONS]           = { .type = NLA_NESTED },
        [TCA_RATE]              = { .type = NLA_BINARY,
                                    .len = sizeof(struct tc_estimator) },
        [TCA_STAB]              = { .type = NLA_NESTED },