netsniff-ng trafgen: check return value of pull_and_flush_ring
commitd040e1715d0afb74a474bcf1552e250cbceb8966
authorDaniel Borkmann <dborkman@redhat.com>
Sat, 16 Mar 2013 13:25:20 +0000 (16 14:25 +0100)
committerDaniel Borkmann <dborkman@redhat.com>
Sat, 16 Mar 2013 13:25:20 +0000 (16 14:25 +0100)
treeadd26ad6639c1a89cc32c67fe92c86ba31521e69
parent79a5df56848ccacf1ab0202e969a8a5206ecaafe
netsniff-ng trafgen: check return value of pull_and_flush_ring

Let us check the return value when the timer triggers a TX flush
request to the kernel. However, ignore the case of BADFS and NOBUFS.
The socket could already have been closed before the timer triggers
in the first case, and in the second, we just let the next timer
continue processing if currently the buffer space is exhausted.

Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
netsniff-ng.c
trafgen.c