summaryrefslogtreecommitdiff
path: root/lib/if.c
diff options
context:
space:
mode:
authorDonatas Abraitis <donatas@opensourcerouting.org>2024-05-16 23:27:34 +0300
committerDonatas Abraitis <donatas@opensourcerouting.org>2024-05-21 14:23:15 +0300
commit043cff5286f63dd62b7aaf9f4a0d7deaef5659db (patch)
tree6309552a5e61e14bac57d248eafc31f043646436 /lib/if.c
parent03e3da09a8521ef5aad82aad1635515d69e46ae0 (diff)
bgpd: Split `rpki cache` command into separate per SSH/TCP
Current command (bundled two into one) is absolutely wrong. When you configure TCP session with the source, the command thinks, that it's a SSH session with a username. It's much better to split this into two separate commands where it's much easier to do the changes in the future (if more options comes in). Yes, this is a breaking change, but there is no other proper way to overcome this. Bonus note how it looks, which also can lead to crashes (due to port 0x0): ``` (gdb) p *cache->tr_config.ssh_config $11 = {host = 0x5555562f9cd0 "1.1.1.1", port = 0, bindaddr = 0x0, username = 0x55555629ad00 "", server_hostkey_path = 0x7ffff53667a0 <rpki_create_socket> "Uf\017\357\300H\211\345AWAVAUATSH\201", <incomplete sequence \354\230>, client_privkey_path = 0x0, data = 0x0, new_socket = 0x51, connect_timeout = 4143762592, password = 0x7ffff6fccca0 <main_arena+96> "\300\"0VUU"} (gdb) p *cache->tr_config.tcp_config $12 = {host = 0x5555562f9cd0 "1.1.1.1", port = 0x0, bindaddr = 0x0, data = 0x55555629ad00, new_socket = 0x7ffff53667a0 <rpki_create_socket>, connect_timeout = 0} ``` Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
Diffstat (limited to 'lib/if.c')
0 files changed, 0 insertions, 0 deletions