dumpcap: check return value from adding interface
PATCH 1/1 dumpcap: check return value from adding interface
The rte_pcapng_add_interface could fail.
For example: running out of space for the file.
Covertity issue: 446742
Signed-off-by Stephen Hemminger <[email protected]>
--- app/dumpcap/main.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
app/dumpcap/main.c +3 -3
@@ -800,9 +800,9 @@ static dumpcap_out_t create_output(void)free (os); TAILQ_FOREACH(intf, &interfaces, next) { -rte_pcapng_add_interface (ret.pcapng, intf->port, - intf->ifname, intf->ifdescr, - intf->opts.filter); +if (rte_pcapng_add_interface (ret.pcapng, intf->port, intf->ifname, + intf->ifdescr, intf->opts.filter) <0 ) +rte_exit (EXIT_FAILURE ,"pcapng_add_interface %u failed\n" , intf->port); } }else {pcap_t *pcap;
Signature · 1 line
2.45.2
Acked-by Morten Brørup <[email protected]>
Acked-by Chengwen Feng <[email protected]>
Quoted 5 lines · Stephen Hemminger
The
rte_pcapng_add_interfacecould fail.
For example: running out of space for the file.Covertity issue: 446742
Signed-off-by Stephen Hemminger <[email protected]>
David Marchand
AppliedQuoted 5 lines · Stephen Hemminger
The
rte_pcapng_add_interfacecould fail.
For example: running out of space for the file.Covertity issue: 446742
Coverity*
Quoted 1 line
Signed-off-by Stephen Hemminger <[email protected]>
Applied, thanks.
Signature · 1 line
David Marchand