Although the documentation states clearly, that passing a NULL pointer
as device is okay and handled like "any", doing so will crash the daemon
on some systems, most notably *BSDs but Linux users have reported this
behavior, too.
This patch passes "any" when the pointer it NULL, which reportedly
resulted in a different behavior, but still crashing the daemon. We'll
keep trying ;)
/* Passing `pcap_device == NULL' is okay and the same as passign "any" */
DEBUG ("Creating PCAP object..");
- pcap_obj = pcap_open_live (pcap_device,
+ pcap_obj = pcap_open_live ((pcap_device != NULL) ? pcap_device : "any",
PCAP_SNAPLEN,
0 /* Not promiscuous */,
interval_g,