]> git.meshlink.io Git - catta/blobdiff - avahi-core/multicast-lookup.c
add an extra validity check when parsing mDNS queries and records in packets
[catta] / avahi-core / multicast-lookup.c
index 4ba48b4e752525b928c106277c23030921244c91..c3afcb0094e8fd3391ae3ed15e194dfefcb6a9df 100644 (file)
 #include <config.h>
 #endif
 
+#include <stdlib.h>
+
 #include <avahi-common/malloc.h>
+#include <avahi-common/timeval.h>
 
-#include "server.h"
+#include "internal.h"
 #include "browse.h"
 #include "socket.h"
 #include "log.h"
 #include "hashmap.h"
 #include "multicast-lookup.h"
+#include "rr-util.h"
 
 struct AvahiMulticastLookup {
     AvahiMulticastLookupEngine *engine;
@@ -112,9 +116,10 @@ AvahiMulticastLookup *avahi_multicast_lookup_new(
     avahi_querier_add_for_all(e->server, interface, protocol, l->key, &tv);
     l->queriers_added = 1;
 
-    /* add a second */
+    /* Add a second */
     avahi_timeval_add(&tv, 1000000);
 
+    /* Issue the ALL_FOR_NOW event one second after the querier was initially created */
     l->all_for_now_event = avahi_time_event_new(e->server->time_event_queue, &tv, all_for_now_callback, l);
     
     return l;