bgpd: fix ecommunity parsing for AS4 (backport #13181) - #13212
Conversation
The parser for extended communities was incorrectly disallowing an operator from configuring "Route Origin" extended communities (e.g. RD/RT/SoO) with a 4-byte value matching BGP_AS4_MAX (UINT32_MAX) and allowed the user to overflow UINT32_MAX. This updates the parser to read the value as a uint64_t so that we can do proper checks on the upper bounds (> BGP_AS4_MAX || errno). before: ``` TORC11(config-router-af)# neighbor uplink-1 soo 4294967296:65 TORC11(config-router-af)# do sh run | include soo neighbor uplink-1 soo 0:65 TORC11(config-router-af)# neighbor uplink-1 soo 4294967295:65 % Malformed SoO extended community TORC11(config-router-af)# ``` after: ``` TORC11(config-router-af)# neighbor uplink-1 soo 4294967296:65 % Malformed SoO extended community TORC11(config-router-af)# neighbor uplink-1 soo 4294967295:65 TORC11(config-router-af)# do sh run | include soo neighbor uplink-1 soo 4294967295:65 TORC11(config-router-af)# ``` Signed-off-by: Trey Aspelund <taspelund@nvidia.com> (cherry picked from commit b571d79)
Signed-off-by: Trey Aspelund <taspelund@nvidia.com> (cherry picked from commit f615e6d)
Continuous Integration Result: FAILEDContinuous Integration Result: FAILEDSee below for issues. This is a comment from an automated CI system. Get source / Pull Request: SuccessfulBuilding Stage: SuccessfulBasic Tests: FailedTopotests debian 10 amd64 part 0: Failed (click for details)Topology Test Results are at https://ci1.netdef.org/browse/FRR-PULLREQ2-TOPO0DEB10AMD64-10645/test Topology Tests failed for Topotests debian 10 amd64 part 0 Topotests debian 10 amd64 part 9: Failed (click for details)Topotests debian 10 amd64 part 9: Unknown Log URL: https://ci1.netdef.org/browse/FRR-PULLREQ2-10645/artifact/TOPO9DEB10AMD64/TopotestLogs/ Topotests debian 10 amd64 part 9: Unknown Log URL: https://ci1.netdef.org/browse/FRR-PULLREQ2-10645/artifact/TOPO9DEB10AMD64/TopotestDetails/ Topotests debian 10 amd64 part 9: No useful log foundSuccessful on other platforms/tests
|
Continuous Integration Result: SUCCESSFULCongratulations, this patch passed basic tests Tested-by: NetDEF / OpenSourceRouting.org CI System CI System Testrun URL: https://ci1.netdef.org/browse/FRR-PULLREQ2-10645/ This is a comment from an automated CI system. |
This is an automatic backport of pull request #13181 done by Mergify.
Mergify commands and options
More conditions and actions can be found in the documentation.
You can also trigger Mergify actions by commenting on this pull request:
@Mergifyio refreshwill re-evaluate the rules@Mergifyio rebasewill rebase this PR on its base branch@Mergifyio updatewill merge the base branch into this PR@Mergifyio backport <destination>will backport this PR on<destination>branchAdditionally, on Mergify dashboard you can:
Finally, you can contact us on https://mergify.com