]> git.proxmox.com Git - mirror_ovs.git/commit - lib/tc.h
tc: Fix using uninitialized id chain.
authorIlya Maximets <i.maximets@ovn.org>
Fri, 3 Jan 2020 18:48:18 +0000 (19:48 +0100)
committerSimon Horman <simon.horman@netronome.com>
Tue, 7 Jan 2020 08:54:35 +0000 (09:54 +0100)
commite64fe4e4c2c9df7954f2efda0db3ee240f69572a
tree84d4038af89eb5b574b7bdd8c1f6dea99820d6e0
parentaeee33444ca8849b60fbe1bb36001b7a8c56b9e5
tc: Fix using uninitialized id chain.

tc_make_tcf_id() doesn't initialize the 'chain' field leaving it with a
random value from the stack.  This makes request_from_tcf_id() create
request with random TCA_CHAIN included.  These requests are obviously
doesn't work as needed leading to broken flow dump and various other
issues.  Fix that by using designated initializer instead.

Fixes: acdd544c4c9a ("tc: Introduce tcf_id to specify a tc filter")
Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
Acked-by: Roi Dayan <roid@mellanox.com>
Signed-off-by: Simon Horman <simon.horman@netronome.com>
lib/tc.h