sd-radv: if lifetime < SD_RADV_DEFAULT_MAX_TIMEOUT_USEC, adjust timeout (#13491)
authorGeorg Müller <georgmueller@gmx.net>
Fri, 20 Sep 2019 08:23:45 +0000 (10:23 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Sat, 21 Sep 2019 21:07:00 +0000 (23:07 +0200)
commitd4cd0e9d3242f85141d835dd5a78d880b47a0817
treecab79625bf829642076024156231eba318534186
parentdbefe592596fd31581958fb2a556989c8c2621cf
sd-radv: if lifetime < SD_RADV_DEFAULT_MAX_TIMEOUT_USEC, adjust timeout (#13491)

The RFC states that lifetime (AdvDefaultLifetime) must be at least
MaxRtrAdvInterval (which more or less corresponds to SD_RADV_DEFAULT_MAX_TIMEOUT_USEC
in systemd).

To fulfill this limit, virtually lower MaxRtrAdvInterval and MinRtrAdvInterval
accordingly.

Also check that min is not lower than 3s and max is not lower than 4s.

(cherry picked from commit ef90b6a4fb9509f61b9b917bbe4db7343afe1853)
src/libsystemd-network/sd-radv.c