diff options
| author | Trey Aspelund <taspelund@nvidia.com> | 2023-03-31 17:46:21 -0400 |
|---|---|---|
| committer | Trey Aspelund <taspelund@nvidia.com> | 2023-04-03 18:59:35 +0000 |
| commit | b571d79d6482217c599c53976cb8cf0ec77b847f (patch) | |
| tree | fdbcf7402c2183d7c788fb41b69519e7a0d3c2b2 /tools/render_md.py | |
| parent | bdf62ec61b343adc007a93a66081d26d1483950a (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>
Diffstat (limited to 'tools/render_md.py')
0 files changed, 0 insertions, 0 deletions
