Closed zy101843 closed 5 months ago
@zy101843 if the application crashes and does not close the socket, zero-copy descriptors are left in an unknown state (zero-copy uses shared memory, it cannot be restored releasing and reallocating it). This unfortunately there is no way to recover the socket and the cluster should be created again.
I use zbalance_ipc for output, the command is as follows /zbalance_ipc -i zc:enp175s0f0 -n 3 -m 1 -c 1024
after user : ./pfdump -i zc:1024@1 -w /root/test.pcap
Among them, I commented out pfring_close ,in the pfdump.c line 377 //pfring_close(pd);
frist open is normal
the second time: show ./pfdump -i zc:1024@1 -w /root/test.pcap pfring_open error [No such device] (pf_ring not loaded or interface zc:1024@1 is down ?)
This is only done to simulate the abnormal exit of the program. Because when the program exits abnormally, is there a way to call pfring_close to close the opened pf, Is there any API that can clean up the opened port so that the program can be opened a second time?