diff options
author | Ben Pfaff <blp@ovn.org> | 2018-10-02 16:02:59 -0700 |
---|---|---|
committer | Ben Pfaff <blp@ovn.org> | 2018-10-03 14:09:38 -0700 |
commit | e99623722736b4b99fdcf97f66b3c6d20fe6a381 (patch) | |
tree | 73102eefd2b02f4bc06d465363fa61d0a4864c76 | |
parent | 801491e0aff839453a4a4c51debb1ec48c4d2d4a (diff) | |
download | openvswitch-e99623722736b4b99fdcf97f66b3c6d20fe6a381.tar.gz |
netdev: Properly clear 'details' when iterating in NETDEV_QOS_FOR_EACH.
The function comment for netdev_queue_dump_next() said that it cleared its
'detail' argument, but it didn't actually do that, which meant that details
could be incorrectly carried along from one queue to the next.
Reported-by: Flavio Leitner <fbl@sysclose.org>
Signed-off-by: Ben Pfaff <blp@ovn.org>
Acked-by: Eelco Chaudron <echaudro@redhat.com>
Acked-by: Flavio Leitner <fbl@sysclose.org>
-rw-r--r-- | lib/netdev.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/netdev.c b/lib/netdev.c index c0e4548b7..d52f7278e 100644 --- a/lib/netdev.c +++ b/lib/netdev.c @@ -1637,8 +1637,9 @@ bool netdev_queue_dump_next(struct netdev_queue_dump *dump, unsigned int *queue_id, struct smap *details) { - const struct netdev *netdev = dump->netdev; + smap_clear(details); + const struct netdev *netdev = dump->netdev; if (dump->error) { return false; } |