2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-31 14:25:26 +00:00

ofp-util: Zero out padding bytes in ofputil_ipfix_stats_to_reply().

Otherwise IPFIX statistics leak memory from ovs-vswitchd.

Reported-by: William Tu <u9012063@gmail.com>
Reported-at: http://openvswitch.org/pipermail/dev/2016-June/073769.html
Acked-by: William Tu <u9012063@gmail.com>
Tested-by: Daniel Ye <daniely@vmware.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
This commit is contained in:
Ben Pfaff
2016-06-26 14:54:04 -07:00
parent 676caaf730
commit 05e81316ca

View File

@@ -7982,6 +7982,7 @@ ofputil_ipfix_stats_to_reply(const struct ofputil_ipfix_stats *ois,
reply->ipv6_error_pkts = htonll(ois->ipv6_error_pkts);
reply->tx_pkts = htonll(ois->tx_pkts);
reply->tx_errors = htonll(ois->tx_errors);
memset(reply->pad, 0, sizeof reply->pad);
}
/* Encode a ipfix stat for 'ois' and append it to 'replies'. */