summaryrefslogtreecommitdiff
path: root/tests/topotests/example_test/test_example.py
diff options
context:
space:
mode:
authorDonatas Abraitis <donatas.abraitis@gmail.com>2021-08-24 10:58:20 +0300
committerDonatas Abraitis <donatas.abraitis@gmail.com>2021-08-29 21:10:27 +0300
commit8bcaad3dedcacab1cc7fdf9914d538427d497db8 (patch)
tree72359452c599cc16aeb280a8738fb87379e41fa6 /tests/topotests/example_test/test_example.py
parent26bf593efba77bebd3c6dbfab2d9ac8542d039be (diff)
bgpd: Use IEEE-754 Floating Point for storing extcommunity bandwidth
https://datatracker.ietf.org/doc/html/draft-ietf-idr-link-bandwidth-07 says: The bandwidth of the link is expressed as 4 octets in IEEE floating point format, units being bytes (not bits!) per second. It is carried in the Local Administrator subfield of the Value Field. Before: ``` Extended Community (16), length: 8, Flags [OT]: unknown extd community typecode (0x0004), Flags [none] 0x0000: 0004 fdeb 0001 e848 0x0000: 0004 fdeb 0001 e848 Updated routes: 172.16.16.1/32 ``` 0001 e848 - means 125000 (1Mbps), which is encoded incorrect. After: ``` Extended Community (16), length: 8, Flags [OT]: unknown extd community typecode (0x0004), Flags [none] 0x0000: 0004 fdeb 47f4 2400 0x0000: 0004 fdeb 47f4 2400 Updated routes: 172.16.16.1/32 ``` 47f4 2400 - means the same, but in floating point format. Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
Diffstat (limited to 'tests/topotests/example_test/test_example.py')
0 files changed, 0 insertions, 0 deletions