diff --git a/src/VERSION b/src/VERSION index 2aba272e3..f97d35bb7 100755 --- a/src/VERSION +++ b/src/VERSION @@ -1,6 +1,6 @@ #!/bin/sh # program: dpvs -# Sep 13, 2024 # +# Sep 19, 2024 # ## # Features # - dpvs: Support QUIC/HTTP3, add nginx patches and facilitating code snippets for use of quic. @@ -22,6 +22,7 @@ # - dpvs: Fix segmentation fault problem when running on machines whose cpu number is over DPVS_MAX_LCORE. # - dpvs: Refactor netif_rte_port_alloc with netif_alloc. # - dpvs: Fix prolems in IPv6 all-nodes and all-routers address initialization. +# - dpvs: Fix memory corruption problem when retrieving nic's xstats. # - tools: Fix concurrency racing problem when dpvs-agent and healthcheck changing rs simultaneously. # - tools: Fix healthchech bad icmp checksum problem ocasionally appeared in udp and udpping checkers. # - tools: Fix keepalived quorum up script not excuted problem when old rs removed and new ones added in a reload. diff --git a/src/netif.c b/src/netif.c index 5d8fe0b3d..0a071a1dc 100644 --- a/src/netif.c +++ b/src/netif.c @@ -3371,7 +3371,7 @@ static int netif_op_get_xstats(struct netif_port *dev, netif_nic_xstats_get_t ** if (nentries < 0) return EDPVS_DPDKAPIFAIL; - get = rte_calloc("xstats_get", 1, nentries * sizeof(struct netif_nic_xstats_entry), 0); + get = rte_calloc("xstats_get", 1, sizeof(*get) + nentries * sizeof(struct netif_nic_xstats_entry), 0); if (unlikely(!get)) return EDPVS_NOMEM; xstats = rte_calloc("xstats", 1, nentries * sizeof(struct rte_eth_xstat), 0);