diff options
author | Trey Aspelund <taspelund@nvidia.com> | 2022-09-30 22:47:54 +0200 |
---|---|---|
committer | Trey Aspelund <taspelund@nvidia.com> | 2022-10-04 17:20:44 +0200 |
commit | 820a9cadb2b3ad4c57c9e193455cd26a3cc081d4 (patch) | |
tree | a590c6bbb608044766ed3c6c8ee152341cce83a1 /zebra/rtadv.c | |
parent | zebra: show local/rx values in RA mismatch debugs (diff) | |
download | frr-820a9cadb2b3ad4c57c9e193455cd26a3cc081d4.tar.xz frr-820a9cadb2b3ad4c57c9e193455cd26a3cc081d4.zip |
zebra: ignore unspec RetransTimer in RA validation
Section 6.2.7 of RFC 4861 states that a router SHOULD log
inconsistencies in RA information detected on a given link:
```
- Cur Hop Limit values (except for the unspecified value of zero
other inconsistencies SHOULD be logged to system network
management).
- Values of the M or O flags.
- Reachable Time values (except for the unspecified value of zero).
- Retrans Timer values (except for the unspecified value of zero).
- Values in the MTU options.
- Preferred and Valid Lifetimes for the same prefix. If
AdvPreferredLifetime and/or AdvValidLifetime decrement in real
time as specified in Section 6.2.1 then the comparison of the
lifetimes cannot compare the content of the fields in the Router
Advertisement, but must instead compare the time at which the
prefix will become deprecated and invalidated, respectively. Due
to link propagation delays and potentially poorly synchronized
clocks between the routers such comparison SHOULD allow some time
skew.
```
We were not logging inconsistencies if "the unspecified value of zero"
was used for Reachable Time but were logging them for Retrans Timer.
This updates the validation check to also skip the logging of Retrans
Timer inconsistencies if either local/rx value is 0.
Signed-off-by: Trey Aspelund <taspelund@nvidia.com>
Diffstat (limited to '')
-rw-r--r-- | zebra/rtadv.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/zebra/rtadv.c b/zebra/rtadv.c index 8059a545e..127888d65 100644 --- a/zebra/rtadv.c +++ b/zebra/rtadv.c @@ -713,7 +713,8 @@ static void rtadv_process_advert(uint8_t *msg, unsigned int len, monotime(&zif->rtadv.lastadvreachabletime); } - if ((ntohl(radvert->nd_ra_retransmit) != + if ((radvert->nd_ra_retransmit && zif->rtadv.AdvRetransTimer) && + (ntohl(radvert->nd_ra_retransmit) != (unsigned int)zif->rtadv.AdvRetransTimer) && (monotime_since(&zif->rtadv.lastadvretranstimer, NULL) > SIXHOUR2USEC || |