-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bgpd: Split rpki cache
command into separate per SSH/TCP
#16023
bgpd: Split rpki cache
command into separate per SSH/TCP
#16023
Conversation
5f3feaf
to
d268501
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not directly related to the fix but SSH server public key is actually known host path
server_pubkey_XX variable naming is incorrect
Would you like me changing the naming only? |
Yes if you don't mind. The code is correct |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good, waiting on other comments
d268501
to
e4cf30d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Thank you for the renaming
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>
SERVER_PUBKEY is not the best name to describe what it really is. Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
e4cf30d
to
d536fb6
Compare
Closes #16013