Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Out of bounds auto generated sequence numbers in prefix lists #2150

Closed
mnejedlo-tds opened this issue May 1, 2018 · 3 comments
Closed

Out of bounds auto generated sequence numbers in prefix lists #2150

mnejedlo-tds opened this issue May 1, 2018 · 3 comments
Labels

Comments

@mnejedlo-tds
Copy link

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)

@donaldsharp
Copy link
Member

  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

@mnejedlo-tds
Copy link
Author

mnejedlo-tds commented May 1, 2018 via email

@qlyoung qlyoung added the bug label May 25, 2018
@ton31337
Copy link
Member

fixed by #2955

@qlyoung qlyoung closed this as completed Apr 24, 2019
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants