summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: da70cd0)
raw | patch | inline | side by side (parent: da70cd0)
author | Florian Forster <octo@leeloo.lan.home.verplant.org> | |
Sat, 28 Feb 2009 09:29:08 +0000 (10:29 +0100) | ||
committer | Florian Forster <octo@leeloo.lan.home.verplant.org> | |
Sat, 28 Feb 2009 09:29:08 +0000 (10:29 +0100) |
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 ;)
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 ;)
src/dns.c | patch | blob | history |
diff --git a/src/dns.c b/src/dns.c
index c04169fec8a4809cb9e7b5516b5011e8d49a6e3a..4d3106b7f8752684efc49698982bac6dcab68699 100644 (file)
--- a/src/dns.c
+++ b/src/dns.c
/* 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,