[ovs-dev] [PATCH 1/2] netdev: Properly clear 'details' when iterating in NETDEV_QOS_FOR_EACH.
Ben Pfaff
blp at ovn.org
Tue Oct 2 23:02:59 UTC 2018
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 at sysclose.org>
Signed-off-by: Ben Pfaff <blp at ovn.org>
---
lib/netdev.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/lib/netdev.c b/lib/netdev.c
index 690d284092d4..722ea89bfeba 100644
--- a/lib/netdev.c
+++ b/lib/netdev.c
@@ -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;
}
--
2.16.1
More information about the dev
mailing list