From 39e8956d056b6b3cb886cdc2ff7eae8b07b53fcc Mon Sep 17 00:00:00 2001 From: David Härdeman Date: Mon, 22 Jun 2020 13:40:00 +0200 Subject: Properly hook up igmp with announce --- igmp.c | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) (limited to 'igmp.c') diff --git a/igmp.c b/igmp.c index 2fb75a2..a9a8980 100644 --- a/igmp.c +++ b/igmp.c @@ -12,12 +12,10 @@ #include #include -/* FIXME: Remove later */ -#include - #include "main.h" #include "uring.h" #include "igmp.h" +#include "announce.h" struct igmp { struct uring_task task; @@ -173,13 +171,12 @@ csum_valid(const char *buf, size_t len) static void igmp_match() { - /* Sent with approx 120-130 sec intervals */ - time_t t = time(NULL); - struct tm *tm = localtime(&t); - char s[64]; - strftime(s, sizeof(s), "%c", tm); - debug(DBG_IGMP, "multicast request discovered at: %s", s); - //start announce + debug(DBG_IGMP, "multicast request discovered"); + /* + * IGMP messages are sent with approx 120-130 sec intervals, + * so set time to 5 minutes to allow some slack. + */ + announce_start(5 * 60); } static void -- cgit v1.2.3