diff options
author | Donatas Abraitis <donatas@opensourcerouting.org> | 2024-05-16 22:27:34 +0200 |
---|---|---|
committer | Donatas Abraitis <donatas@opensourcerouting.org> | 2024-05-21 13:23:15 +0200 |
commit | 043cff5286f63dd62b7aaf9f4a0d7deaef5659db (patch) | |
tree | 6309552a5e61e14bac57d248eafc31f043646436 /tests/topotests/bgp_rpki_topo1 | |
parent | Merge pull request #16014 from pguibert6WIND/nexthop_rework (diff) | |
download | frr-043cff5286f63dd62b7aaf9f4a0d7deaef5659db.tar.xz frr-043cff5286f63dd62b7aaf9f4a0d7deaef5659db.zip |
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 'tests/topotests/bgp_rpki_topo1')
-rw-r--r-- | tests/topotests/bgp_rpki_topo1/r2/bgpd.conf | 2 | ||||
-rw-r--r-- | tests/topotests/bgp_rpki_topo1/test_bgp_rpki_topo1.py | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/tests/topotests/bgp_rpki_topo1/r2/bgpd.conf b/tests/topotests/bgp_rpki_topo1/r2/bgpd.conf index 87d721497..4de177dc2 100644 --- a/tests/topotests/bgp_rpki_topo1/r2/bgpd.conf +++ b/tests/topotests/bgp_rpki_topo1/r2/bgpd.conf @@ -21,5 +21,5 @@ router bgp 65002 vrf vrf10 ! rpki rpki retry_interval 5 - rpki cache 192.0.2.1 15432 preference 1 + rpki cache tcp 192.0.2.1 15432 preference 1 exit diff --git a/tests/topotests/bgp_rpki_topo1/test_bgp_rpki_topo1.py b/tests/topotests/bgp_rpki_topo1/test_bgp_rpki_topo1.py index a12204f24..f52b28a06 100644 --- a/tests/topotests/bgp_rpki_topo1/test_bgp_rpki_topo1.py +++ b/tests/topotests/bgp_rpki_topo1/test_bgp_rpki_topo1.py @@ -189,7 +189,7 @@ def test_show_bgp_rpki_prefixes_no_rpki_cache(): """ configure rpki - no rpki cache 192.0.2.1 15432 preference 1 + no rpki cache tcp 192.0.2.1 15432 preference 1 exit """ ) @@ -219,7 +219,7 @@ def test_show_bgp_rpki_prefixes_reconnect(): """ configure rpki - rpki cache 192.0.2.1 15432 preference 1 + rpki cache tcp 192.0.2.1 15432 preference 1 exit """ ) @@ -319,7 +319,7 @@ def test_show_bgp_rpki_prefixes_vrf(): configure vrf vrf10 rpki - rpki cache 192.0.2.3 15432 preference 1 + rpki cache tcp 192.0.2.3 15432 preference 1 exit exit """ |