host-sflow
host-sflow copied to clipboard
pcap: fix race condition when add bpf socket
This pull requests fixed two issues:
- "check-then-act" race condition in
addBPFSocketwhich may cause multiple bpf sockets added for a single device. tap_closemark thefdwrongly, which causesEVSocketClosefails to locate the socket