summaryrefslogtreecommitdiff
path: root/lib/command.c
diff options
context:
space:
mode:
authorTrey Aspelund <taspelund@nvidia.com>2023-03-31 17:46:21 -0400
committerMergify <37929162+mergify[bot]@users.noreply.github.com>2023-04-04 15:23:22 +0000
commit8c3619c791b94e0f90d5969be389ec20c7a0ea29 (patch)
tree346d118bc7d63b19cc8cc73d8ab2f54b02488f01 /lib/command.c
parentc9628fd3012783ce48312bd181b9888a825af093 (diff)
bgpd: fix ecommunity parsing for AS4
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 b571d79d6482217c599c53976cb8cf0ec77b847f)
Diffstat (limited to 'lib/command.c')
0 files changed, 0 insertions, 0 deletions