rtrlib / bird-rtrlib-cli

CLI that maintains ROA table in BIRD using RTRlib
GNU Lesser General Public License v3.0
11 stars 5 forks source link

Unsigned interger used? // Fails to communicate private 32bit ASN correctly to bird.ctl #16

Closed netravnen closed 5 years ago

netravnen commented 5 years ago

Results

bird-rtrlib-cli[29260]: To BIRD: add roa 172.23.177.32/27 max 28 as -52544060 table dn42_roa
bird-rtrlib-cli[29260]: Bird command add roa 172.23.177.32/27 max 28 as -52544060 table dn42_roa

Fails to communicate private 32bit ASN correctly to bird.ctl.

From ROA file

# grep '172.23.177.32/27' /var/lib/bird/bird_roa_dn42.conf 
roa 172.23.177.32/27 max 28 as 4242423236;

Notes

smlng commented 5 years ago

yeah looks like a wrong print statement see, here https://github.com/rtrlib/bird-rtrlib-cli/blob/master/bird-rtrlib-cli.c#L205

smlng commented 5 years ago

please try #17

smlng commented 5 years ago

btw. thanks for reporting this!

netravnen commented 5 years ago

please try #17

Yep. Now it works as expected. 👍

bird-rtrlib-cli[4308]: To BIRD: add roa 172.31.0.122/32 max 32 as 4242422480 table dn42_roa
bird-rtrlib-cli[4308]: From BIRD: 0000 
(...)
bird-rtrlib-cli[4308]: To BIRD: add roa 172.20.45.64/28 max 28 as 4242423667 table dn42_roa
bird-rtrlib-cli[4308]: From BIRD: 0000
# grep '172.31.0.122/32' /var/lib/bird/bird_roa_dn42.conf                  
roa 172.31.0.122/32 max 32 as 4242422480;

# grep '172.20.45.64/28' /var/lib/bird/bird_roa_dn42.conf                 
roa 172.20.45.64/28 max 28 as 4242423667;
netravnen commented 5 years ago

please try #17

Please merge #17 into master. :)

smlng commented 5 years ago

thx for reporting back (and that it works!)