You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fixing #2126 exposed that the auto generation of sequence numbers does not do any bounds checking.
If a rule already exists at sequence #4294967295, adding a new rule using the automatic sequence numbers will place that rule at seq 4294967300, which is out of bounds. Additional auto sequenced rules will continue to grow into disallowed sequence numbers.
The simple solution is probably to bounds check the automatically generated sequence numbers and throw an error if they are too high (or less than 1). A more interesting to me solution would be to bounds check, but also to exclude 4294967295 (or some small space at the top of the sequence number range) when calculating the current maximum seq. num. This would allow lists to auto sequence inserts while having a default at the end of the list. (e.g. for what I'm trying to do, I'm using prefix lists with automatically added permit rules and a default deny at the end (which is how I discovered #2126 in the first place). It would be nice if I could just use the auto sequencing and didn't have to code my own sequencing and collision avoidance)
The text was updated successfully, but these errors were encountered:
Not sure what you mean by #1. #2 is what I was expecting, I just wanted to suggest an alternative that would have been convenient for what I'm trying to do.
From: Donald Sharp [mailto:notifications@github.com]
Sent: Tuesday, May 01, 2018 10:22 AM
To: FRRouting/frr
Cc: Nejedlo, Mark; Author
Subject: Re: [FRRouting/frr] Out of bounds auto generated sequence numbers in prefix lists (#2150)
1. Have a command to renumber?
2. We think we should fail the install if no sequence number is specified and it would be larger than MAX_UINT
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<#2150 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/Ak-Lgzcg-XPC5FDXB1tOS-2We6PbECxlks5tuH2egaJpZM4TuB0j>.
Fixing #2126 exposed that the auto generation of sequence numbers does not do any bounds checking.
If a rule already exists at sequence #4294967295, adding a new rule using the automatic sequence numbers will place that rule at seq 4294967300, which is out of bounds. Additional auto sequenced rules will continue to grow into disallowed sequence numbers.
The simple solution is probably to bounds check the automatically generated sequence numbers and throw an error if they are too high (or less than 1). A more interesting to me solution would be to bounds check, but also to exclude 4294967295 (or some small space at the top of the sequence number range) when calculating the current maximum seq. num. This would allow lists to auto sequence inserts while having a default at the end of the list. (e.g. for what I'm trying to do, I'm using prefix lists with automatically added permit rules and a default deny at the end (which is how I discovered #2126 in the first place). It would be nice if I could just use the auto sequencing and didn't have to code my own sequencing and collision avoidance)
The text was updated successfully, but these errors were encountered: