When filter removal does not empty access-list, restore its name #6
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Preface:
Details:
On Ubuntu 20.04 with quagga 1.2.4-4build1 I observed that removing a single filter from an access list with a command in the form of
no access-list $list_name permit $ip/32
resulted in the remaining filters in the list being migrated to a(null)
access-list and the access-list being operated on vanished. This was confirmed with quagga 1.2.4 on FreeBSD 12 as well, just to try to rule out anything Ubuntu or Linux.I believe this bug was introduced in commit
cfbdd869687dc076256bce455d03b2ccf04b4a77
. It seems that basically what's happening is that insideaccess_list_filter_delete
the name of the access list being modified is set toNULL
so that it won't be found during lookups while it's being manipulated, but in the case where the list is not fully empty after manipulation, the name is not set back which results in the list effectively being renamed toNULL
.