radvd-project / radvd

radvd | Official repository: https://github.com/radvd-project/radvd
https://radvd.litech.org/
Other
203 stars 107 forks source link

Fix error message for preferred lifetime exceeding valid lifetime #181

Closed initramfs closed 2 years ago

initramfs commented 2 years ago

The displayed error message when a prefix's preferred lifetime exceeds it's valid lifetime begins with:

AdvValidLifeTime must be greater than AdvPreferredLifetime...

this is inconsistent with RFC 4861 § 4.6.2 where the preferred lifetime cannot exceed valid lifetime but can equal it.

The actual code/logic exhibits correct behaviour but the error message is misleading, and has led to at least one incorrect implementation utilizing radvd (VyOS, see relevant implementation error here).

This PR adds the text "or equal to" to the error message to clarify the true constraint, such that the error now starts with:

AdvValidLifeTime must be greater than or equal to AdvPreferredLifetime...

Neustradamus commented 2 years ago

@robbat2, @stappersg: What do you think?