]>
git.puffer.fish Git - matthieu/frr.git/commit
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>