diff options
author | David Härdeman <david@hardeman.nu> | 2020-06-22 13:40:00 +0200 |
---|---|---|
committer | David Härdeman <david@hardeman.nu> | 2020-06-22 13:40:00 +0200 |
commit | 39e8956d056b6b3cb886cdc2ff7eae8b07b53fcc (patch) | |
tree | 5d9741121a414a29450357388eb9b70270ce59d3 /igmp.c | |
parent | 6a0ce89e1110cb49ed1c00bec2d96073b9378cb3 (diff) |
Properly hook up igmp with announce
Diffstat (limited to 'igmp.c')
-rw-r--r-- | igmp.c | 17 |
1 files changed, 7 insertions, 10 deletions
@@ -12,12 +12,10 @@ #include <errno.h> #include <sys/ioctl.h> -/* FIXME: Remove later */ -#include <time.h> - #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 |