| Igmpproxy has timer functionality to perform periodic actions like sending |
| general/group specific igmp queries and aging out active routes. Timer logic |
| is incorrect while computing remaining time to invoke callbacks, this causes |
| more frequent igmp queries. Fixed the issue by correcting the timer logic. |
| |
| Reviewed on https://chromium-review.googlesource.com/2210133 |
| |
| --- |
| diff -Naur --show-c-function a/src/igmpproxy.c b/src/igmpproxy.c |
| --- a/src/igmpproxy.c 2020-05-19 23:05:57.902280428 -0700 |
| +++ b/src/igmpproxy.c 2020-05-19 23:17:41.215848372 -0700 |
| @@ -338,7 +338,7 @@ void igmpProxyRun(void) { |
| * call gettimeofday. |
| */ |
| if (Rt == 0) { |
| - curtime.tv_sec = lasttime.tv_sec + secs; |
| + curtime.tv_sec = lasttime.tv_sec + ((secs > 3) ? 3 : secs); |
| curtime.tv_nsec = lasttime.tv_nsec; |
| Rt = -1; /* don't do this next time through the loop */ |
| } else { |