In the simplest case host may change TTL to some different value. It's
the most important for the goodbye packets though.
Consider situation when host (for which we have no no cached entries)
restarts. First it sends goodbye with TTL 0 (we cache it), then seconds
later it announces with standard TTL values (but we keep TTL 0).
It results in wrong cache state and could cause dropping valid entries.
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Acked-by: John Crispin <john@phrozen.org>
if (!strcmp(s->entry, entry)) {
s->refresh = 50;
s->time = monotonic_time();
+ s->ttl = ttl;
return s;
}