mz: Make access to pcap init functions thread safe
mz fails to start in cli mode and prints each time different pcap errors:
$ mz -x -V
fatal flex scanner internal error--end of buffer missed
rx_arp: [ERROR] Error calling pcap_compile
or simply shuts down. Sometimes it successfully gets up.
Seems some initialization pcap functions are not thread safer.
Fixed by using mutex locking before entering pcap_loop()
Signed-off-by: Vadim Kochan <vadim4j@gmail.com>
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>