Skip to content

Commit

Permalink
netdev: Properly clear 'details' when iterating in NETDEV_QOS_FOR_EACH.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
blp committed Oct 3, 2018
1 parent 5e932ac commit 63cf14c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/netdev.c
Expand Up @@ -1801,8 +1801,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;
}
Expand Down

0 comments on commit 63cf14c

Please sign in to comment.