From 41b74993049a7e4edc599abc9575b74b4e222e83 Mon Sep 17 00:00:00 2001 From: Juan Olveira Date: Fri, 24 Apr 2026 19:07:18 +0000 Subject: [PATCH 1/7] cli: add tunnel_endpoint to user list output --- e2e/fixtures/ibrl/doublezero_user_list_user_added.tmpl | 4 ++-- .../doublezero_user_list_user_added.tmpl | 6 +++--- .../doublezero_user_list_user_removed.tmpl | 4 ++-- smartcontract/cli/src/user/list.rs | 6 ++++-- 4 files changed, 11 insertions(+), 9 deletions(-) diff --git a/e2e/fixtures/ibrl/doublezero_user_list_user_added.tmpl b/e2e/fixtures/ibrl/doublezero_user_list_user_added.tmpl index 54fbb2e680..c34af84625 100644 --- a/e2e/fixtures/ibrl/doublezero_user_list_user_added.tmpl +++ b/e2e/fixtures/ibrl/doublezero_user_list_user_added.tmpl @@ -1,2 +1,2 @@ - account | tenant | user_type | groups | device | location | cyoa_type | client_ip | dz_ip | accesspass | tunnel_id | tunnel_net | status | bgp_status | owner - IGNORED | | IBRL | | ny5-dz01 | New York | GREOverDIA | {{.ClientIP}} | {{.ClientIP}} | Prepaid: (MAX) | 500 | 169.254.0.0/31 | activated | unknown | {{.ClientPubkeyAddress}} + account | tenant | user_type | groups | device | location | cyoa_type | client_ip | dz_ip | accesspass | tunnel_id | tunnel_net | tunnel_endpoint | status | bgp_status | owner + IGNORED | | IBRL | | ny5-dz01 | New York | GREOverDIA | {{.ClientIP}} | {{.ClientIP}} | Prepaid: (MAX) | 500 | 169.254.0.0/31 | 0.0.0.0 | activated | unknown | {{.ClientPubkeyAddress}} diff --git a/e2e/fixtures/ibrl_with_allocated_addr/doublezero_user_list_user_added.tmpl b/e2e/fixtures/ibrl_with_allocated_addr/doublezero_user_list_user_added.tmpl index 0a45b48299..aabfce0d99 100644 --- a/e2e/fixtures/ibrl_with_allocated_addr/doublezero_user_list_user_added.tmpl +++ b/e2e/fixtures/ibrl_with_allocated_addr/doublezero_user_list_user_added.tmpl @@ -1,5 +1,5 @@ - account | tenant | user_type | groups | device | location | cyoa_type | client_ip | dz_ip | accesspass | tunnel_id | tunnel_net | status | bgp_status | owner + account | tenant | user_type | groups | device | location | cyoa_type | client_ip | dz_ip | accesspass | tunnel_id | tunnel_net | tunnel_endpoint | status | bgp_status | owner {{- range .IBRLUsers}} - IGNORED | | IBRL | | la2-dz01 | Los Angeles | GREOverDIA | {{.ClientIP}} | {{.ClientIP}} | Prepaid: (MAX) | {{.TunnelID}} | {{.TunnelNet}} | activated | unknown | {{$.ClientPubkeyAddress}} + IGNORED | | IBRL | | la2-dz01 | Los Angeles | GREOverDIA | {{.ClientIP}} | {{.ClientIP}} | Prepaid: (MAX) | {{.TunnelID}} | {{.TunnelNet}} | 0.0.0.0 | activated | unknown | {{$.ClientPubkeyAddress}} {{- end}} - IGNORED | | IBRLWithAllocatedIP | | ny5-dz01 | New York | GREOverDIA | {{.ClientIP}} | {{.ExpectedAllocatedClientIP}} | Prepaid: (MAX) | {{.AllocatedUserTunnelID}} | {{.AllocatedUserTunnelNet}} | activated | unknown | {{.ClientPubkeyAddress}} + IGNORED | | IBRLWithAllocatedIP | | ny5-dz01 | New York | GREOverDIA | {{.ClientIP}} | {{.ExpectedAllocatedClientIP}} | Prepaid: (MAX) | {{.AllocatedUserTunnelID}} | {{.AllocatedUserTunnelNet}} | 0.0.0.0 | activated | unknown | {{.ClientPubkeyAddress}} diff --git a/e2e/fixtures/ibrl_with_allocated_addr/doublezero_user_list_user_removed.tmpl b/e2e/fixtures/ibrl_with_allocated_addr/doublezero_user_list_user_removed.tmpl index 6b33f45470..1623dee618 100644 --- a/e2e/fixtures/ibrl_with_allocated_addr/doublezero_user_list_user_removed.tmpl +++ b/e2e/fixtures/ibrl_with_allocated_addr/doublezero_user_list_user_removed.tmpl @@ -1,4 +1,4 @@ - account | tenant | user_type | groups | device | location | cyoa_type | client_ip | dz_ip | accesspass | tunnel_id | tunnel_net | status | bgp_status | owner + account | tenant | user_type | groups | device | location | cyoa_type | client_ip | dz_ip | accesspass | tunnel_id | tunnel_net | tunnel_endpoint | status | bgp_status | owner {{- range .IBRLUsers}} - IGNORED | | IBRL | | la2-dz01 | Los Angeles | GREOverDIA | {{.ClientIP}} | {{if eq .ClientIP "3.4.5.6"}}0.0.0.0{{else}}{{.ClientIP}}{{end}} | Prepaid: (MAX) | {{.TunnelID}} | {{.TunnelNet}} | {{if eq .ClientIP "3.4.5.6"}}banned{{else}}activated{{end}} | unknown | {{$.ClientPubkeyAddress}} + IGNORED | | IBRL | | la2-dz01 | Los Angeles | GREOverDIA | {{.ClientIP}} | {{if eq .ClientIP "3.4.5.6"}}0.0.0.0{{else}}{{.ClientIP}}{{end}} | Prepaid: (MAX) | {{.TunnelID}} | {{.TunnelNet}} | 0.0.0.0 | {{if eq .ClientIP "3.4.5.6"}}banned{{else}}activated{{end}} | unknown | {{$.ClientPubkeyAddress}} {{- end}} diff --git a/smartcontract/cli/src/user/list.rs b/smartcontract/cli/src/user/list.rs index 97bd568740..00d03ad8b4 100644 --- a/smartcontract/cli/src/user/list.rs +++ b/smartcontract/cli/src/user/list.rs @@ -112,6 +112,7 @@ pub struct UserDisplay { pub accesspass: String, pub tunnel_id: u16, pub tunnel_net: NetworkV4, + pub tunnel_endpoint: Ipv4Addr, pub status: UserStatus, pub bgp_status: BGPStatus, #[serde(serialize_with = "serializer::serialize_pubkey_as_string")] @@ -362,6 +363,7 @@ impl ListUserCliCommand { }, tunnel_id: user.tunnel_id, tunnel_net: user.tunnel_net, + tunnel_endpoint: user.tunnel_endpoint, status: user.status, bgp_status: user.bgp_status, owner: user.owner, @@ -894,7 +896,7 @@ mod tests { .execute(&client, &mut output); assert!(res.is_ok()); let output_str = String::from_utf8(output).unwrap(); - assert_eq!(output_str, " account | tenant | user_type | groups | device | location | cyoa_type | client_ip | dz_ip | accesspass | tunnel_id | tunnel_net | status | bgp_status | owner \n 11111115RidqCHAoz6dzmXxGcfWLNzevYqNpaRAUo | 11111115q4EpJaTXAZWpCg3J2zppWGSZ46KXozzo9 | Multicast | S:m_code | device1_code | location1_name | GREOverDIA | 1.2.3.4 | 2.3.4.5 | Prepaid: (expires epoch 10) | 500 | 1.2.3.5/32 | activated | unknown | 11111115RidqCHAoz6dzmXxGcfWLNzevYqNpaRAUo \n"); + assert_eq!(output_str, " account | tenant | user_type | groups | device | location | cyoa_type | client_ip | dz_ip | accesspass | tunnel_id | tunnel_net | tunnel_endpoint | status | bgp_status | owner \n 11111115RidqCHAoz6dzmXxGcfWLNzevYqNpaRAUo | 11111115q4EpJaTXAZWpCg3J2zppWGSZ46KXozzo9 | Multicast | S:m_code | device1_code | location1_name | GREOverDIA | 1.2.3.4 | 2.3.4.5 | Prepaid: (expires epoch 10) | 500 | 1.2.3.5/32 | 0.0.0.0 | activated | unknown | 11111115RidqCHAoz6dzmXxGcfWLNzevYqNpaRAUo \n"); let mut output = Vec::new(); let res = ListUserCliCommand { @@ -922,7 +924,7 @@ mod tests { assert!(res.is_ok()); let output_str = String::from_utf8(output).unwrap(); - assert_eq!(output_str, "[{\"account\":\"11111115RidqCHAoz6dzmXxGcfWLNzevYqNpaRAUo\",\"tenant\":\"11111115q4EpJaTXAZWpCg3J2zppWGSZ46KXozzo9\",\"user_type\":\"Multicast\",\"device_pk\":\"11111115q4EpJaTXAZWpCg3J2zppWGSZ46KXozzo9\",\"multicast\":\"S:m_code\",\"publishers\":\"\",\"subscribers\":\"11111115q4EpJaTXAZWpCg3J2zppWGSZ46KXozzo8\",\"device_name\":\"device1_code\",\"location_code\":\"location1_code\",\"location_name\":\"location1_name\",\"cyoa_type\":\"GREOverDIA\",\"client_ip\":\"1.2.3.4\",\"dz_ip\":\"2.3.4.5\",\"accesspass\":\"Prepaid: (expires epoch 10)\",\"tunnel_id\":500,\"tunnel_net\":\"1.2.3.5/32\",\"status\":\"Activated\",\"bgp_status\":\"Unknown\",\"owner\":\"11111115RidqCHAoz6dzmXxGcfWLNzevYqNpaRAUo\"}]\n"); + assert_eq!(output_str, "[{\"account\":\"11111115RidqCHAoz6dzmXxGcfWLNzevYqNpaRAUo\",\"tenant\":\"11111115q4EpJaTXAZWpCg3J2zppWGSZ46KXozzo9\",\"user_type\":\"Multicast\",\"device_pk\":\"11111115q4EpJaTXAZWpCg3J2zppWGSZ46KXozzo9\",\"multicast\":\"S:m_code\",\"publishers\":\"\",\"subscribers\":\"11111115q4EpJaTXAZWpCg3J2zppWGSZ46KXozzo8\",\"device_name\":\"device1_code\",\"location_code\":\"location1_code\",\"location_name\":\"location1_name\",\"cyoa_type\":\"GREOverDIA\",\"client_ip\":\"1.2.3.4\",\"dz_ip\":\"2.3.4.5\",\"accesspass\":\"Prepaid: (expires epoch 10)\",\"tunnel_id\":500,\"tunnel_net\":\"1.2.3.5/32\",\"tunnel_endpoint\":\"0.0.0.0\",\"status\":\"Activated\",\"bgp_status\":\"Unknown\",\"owner\":\"11111115RidqCHAoz6dzmXxGcfWLNzevYqNpaRAUo\"}]\n"); let mut output = Vec::new(); let res = ListUserCliCommand { From fa47ed87cc6da831dc22e50c4ae9f4952d49b90b Mon Sep 17 00:00:00 2001 From: Juan Olveira Date: Fri, 24 Apr 2026 19:26:52 +0000 Subject: [PATCH 2/7] cli: use real tunnel_endpoint value in user list unit tests --- smartcontract/cli/src/user/list.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/smartcontract/cli/src/user/list.rs b/smartcontract/cli/src/user/list.rs index 00d03ad8b4..202d5fefb3 100644 --- a/smartcontract/cli/src/user/list.rs +++ b/smartcontract/cli/src/user/list.rs @@ -784,7 +784,7 @@ mod tests { publishers: vec![], subscribers: vec![], validator_pubkey: Pubkey::default(), - tunnel_endpoint: std::net::Ipv4Addr::UNSPECIFIED, + tunnel_endpoint: [1, 2, 3, 4].into(), tunnel_flags: 0, bgp_status: Default::default(), last_bgp_up_at: 0, @@ -826,7 +826,7 @@ mod tests { publishers: vec![], subscribers: vec![mgroup1_pubkey], validator_pubkey: Pubkey::default(), - tunnel_endpoint: std::net::Ipv4Addr::UNSPECIFIED, + tunnel_endpoint: [5, 6, 7, 8].into(), tunnel_flags: 0, bgp_status: Default::default(), last_bgp_up_at: 0, @@ -896,7 +896,7 @@ mod tests { .execute(&client, &mut output); assert!(res.is_ok()); let output_str = String::from_utf8(output).unwrap(); - assert_eq!(output_str, " account | tenant | user_type | groups | device | location | cyoa_type | client_ip | dz_ip | accesspass | tunnel_id | tunnel_net | tunnel_endpoint | status | bgp_status | owner \n 11111115RidqCHAoz6dzmXxGcfWLNzevYqNpaRAUo | 11111115q4EpJaTXAZWpCg3J2zppWGSZ46KXozzo9 | Multicast | S:m_code | device1_code | location1_name | GREOverDIA | 1.2.3.4 | 2.3.4.5 | Prepaid: (expires epoch 10) | 500 | 1.2.3.5/32 | 0.0.0.0 | activated | unknown | 11111115RidqCHAoz6dzmXxGcfWLNzevYqNpaRAUo \n"); + assert_eq!(output_str, " account | tenant | user_type | groups | device | location | cyoa_type | client_ip | dz_ip | accesspass | tunnel_id | tunnel_net | tunnel_endpoint | status | bgp_status | owner \n 11111115RidqCHAoz6dzmXxGcfWLNzevYqNpaRAUo | 11111115q4EpJaTXAZWpCg3J2zppWGSZ46KXozzo9 | Multicast | S:m_code | device1_code | location1_name | GREOverDIA | 1.2.3.4 | 2.3.4.5 | Prepaid: (expires epoch 10) | 500 | 1.2.3.5/32 | 5.6.7.8 | activated | unknown | 11111115RidqCHAoz6dzmXxGcfWLNzevYqNpaRAUo \n"); let mut output = Vec::new(); let res = ListUserCliCommand { @@ -924,7 +924,7 @@ mod tests { assert!(res.is_ok()); let output_str = String::from_utf8(output).unwrap(); - assert_eq!(output_str, "[{\"account\":\"11111115RidqCHAoz6dzmXxGcfWLNzevYqNpaRAUo\",\"tenant\":\"11111115q4EpJaTXAZWpCg3J2zppWGSZ46KXozzo9\",\"user_type\":\"Multicast\",\"device_pk\":\"11111115q4EpJaTXAZWpCg3J2zppWGSZ46KXozzo9\",\"multicast\":\"S:m_code\",\"publishers\":\"\",\"subscribers\":\"11111115q4EpJaTXAZWpCg3J2zppWGSZ46KXozzo8\",\"device_name\":\"device1_code\",\"location_code\":\"location1_code\",\"location_name\":\"location1_name\",\"cyoa_type\":\"GREOverDIA\",\"client_ip\":\"1.2.3.4\",\"dz_ip\":\"2.3.4.5\",\"accesspass\":\"Prepaid: (expires epoch 10)\",\"tunnel_id\":500,\"tunnel_net\":\"1.2.3.5/32\",\"tunnel_endpoint\":\"0.0.0.0\",\"status\":\"Activated\",\"bgp_status\":\"Unknown\",\"owner\":\"11111115RidqCHAoz6dzmXxGcfWLNzevYqNpaRAUo\"}]\n"); + assert_eq!(output_str, "[{\"account\":\"11111115RidqCHAoz6dzmXxGcfWLNzevYqNpaRAUo\",\"tenant\":\"11111115q4EpJaTXAZWpCg3J2zppWGSZ46KXozzo9\",\"user_type\":\"Multicast\",\"device_pk\":\"11111115q4EpJaTXAZWpCg3J2zppWGSZ46KXozzo9\",\"multicast\":\"S:m_code\",\"publishers\":\"\",\"subscribers\":\"11111115q4EpJaTXAZWpCg3J2zppWGSZ46KXozzo8\",\"device_name\":\"device1_code\",\"location_code\":\"location1_code\",\"location_name\":\"location1_name\",\"cyoa_type\":\"GREOverDIA\",\"client_ip\":\"1.2.3.4\",\"dz_ip\":\"2.3.4.5\",\"accesspass\":\"Prepaid: (expires epoch 10)\",\"tunnel_id\":500,\"tunnel_net\":\"1.2.3.5/32\",\"tunnel_endpoint\":\"5.6.7.8\",\"status\":\"Activated\",\"bgp_status\":\"Unknown\",\"owner\":\"11111115RidqCHAoz6dzmXxGcfWLNzevYqNpaRAUo\"}]\n"); let mut output = Vec::new(); let res = ListUserCliCommand { From a505a83c8dafe05f53fe02fd72d4f0140c273653 Mon Sep 17 00:00:00 2001 From: Juan Olveira Date: Fri, 24 Apr 2026 19:51:54 +0000 Subject: [PATCH 3/7] e2e: fix user list fixtures to use real tunnel_endpoint IP --- e2e/fixtures/ibrl/doublezero_user_list_user_added.tmpl | 2 +- .../doublezero_user_list_user_added.tmpl | 4 ++-- .../doublezero_user_list_user_removed.tmpl | 2 +- e2e/ibrl_test.go | 1 + 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/e2e/fixtures/ibrl/doublezero_user_list_user_added.tmpl b/e2e/fixtures/ibrl/doublezero_user_list_user_added.tmpl index c34af84625..69cf757f07 100644 --- a/e2e/fixtures/ibrl/doublezero_user_list_user_added.tmpl +++ b/e2e/fixtures/ibrl/doublezero_user_list_user_added.tmpl @@ -1,2 +1,2 @@ account | tenant | user_type | groups | device | location | cyoa_type | client_ip | dz_ip | accesspass | tunnel_id | tunnel_net | tunnel_endpoint | status | bgp_status | owner - IGNORED | | IBRL | | ny5-dz01 | New York | GREOverDIA | {{.ClientIP}} | {{.ClientIP}} | Prepaid: (MAX) | 500 | 169.254.0.0/31 | 0.0.0.0 | activated | unknown | {{.ClientPubkeyAddress}} + IGNORED | | IBRL | | ny5-dz01 | New York | GREOverDIA | {{.ClientIP}} | {{.ClientIP}} | Prepaid: (MAX) | 500 | 169.254.0.0/31 | {{.DeviceIP}} | activated | unknown | {{.ClientPubkeyAddress}} diff --git a/e2e/fixtures/ibrl_with_allocated_addr/doublezero_user_list_user_added.tmpl b/e2e/fixtures/ibrl_with_allocated_addr/doublezero_user_list_user_added.tmpl index aabfce0d99..f8b8f2e96c 100644 --- a/e2e/fixtures/ibrl_with_allocated_addr/doublezero_user_list_user_added.tmpl +++ b/e2e/fixtures/ibrl_with_allocated_addr/doublezero_user_list_user_added.tmpl @@ -1,5 +1,5 @@ account | tenant | user_type | groups | device | location | cyoa_type | client_ip | dz_ip | accesspass | tunnel_id | tunnel_net | tunnel_endpoint | status | bgp_status | owner {{- range .IBRLUsers}} - IGNORED | | IBRL | | la2-dz01 | Los Angeles | GREOverDIA | {{.ClientIP}} | {{.ClientIP}} | Prepaid: (MAX) | {{.TunnelID}} | {{.TunnelNet}} | 0.0.0.0 | activated | unknown | {{$.ClientPubkeyAddress}} + IGNORED | | IBRL | | la2-dz01 | Los Angeles | GREOverDIA | {{.ClientIP}} | {{.ClientIP}} | Prepaid: (MAX) | {{.TunnelID}} | {{.TunnelNet}} | 207.45.216.134 | activated | unknown | {{$.ClientPubkeyAddress}} {{- end}} - IGNORED | | IBRLWithAllocatedIP | | ny5-dz01 | New York | GREOverDIA | {{.ClientIP}} | {{.ExpectedAllocatedClientIP}} | Prepaid: (MAX) | {{.AllocatedUserTunnelID}} | {{.AllocatedUserTunnelNet}} | 0.0.0.0 | activated | unknown | {{.ClientPubkeyAddress}} + IGNORED | | IBRLWithAllocatedIP | | ny5-dz01 | New York | GREOverDIA | {{.ClientIP}} | {{.ExpectedAllocatedClientIP}} | Prepaid: (MAX) | {{.AllocatedUserTunnelID}} | {{.AllocatedUserTunnelNet}} | {{.DeviceIP}} | activated | unknown | {{.ClientPubkeyAddress}} diff --git a/e2e/fixtures/ibrl_with_allocated_addr/doublezero_user_list_user_removed.tmpl b/e2e/fixtures/ibrl_with_allocated_addr/doublezero_user_list_user_removed.tmpl index 1623dee618..136ef76ba5 100644 --- a/e2e/fixtures/ibrl_with_allocated_addr/doublezero_user_list_user_removed.tmpl +++ b/e2e/fixtures/ibrl_with_allocated_addr/doublezero_user_list_user_removed.tmpl @@ -1,4 +1,4 @@ account | tenant | user_type | groups | device | location | cyoa_type | client_ip | dz_ip | accesspass | tunnel_id | tunnel_net | tunnel_endpoint | status | bgp_status | owner {{- range .IBRLUsers}} - IGNORED | | IBRL | | la2-dz01 | Los Angeles | GREOverDIA | {{.ClientIP}} | {{if eq .ClientIP "3.4.5.6"}}0.0.0.0{{else}}{{.ClientIP}}{{end}} | Prepaid: (MAX) | {{.TunnelID}} | {{.TunnelNet}} | 0.0.0.0 | {{if eq .ClientIP "3.4.5.6"}}banned{{else}}activated{{end}} | unknown | {{$.ClientPubkeyAddress}} + IGNORED | | IBRL | | la2-dz01 | Los Angeles | GREOverDIA | {{.ClientIP}} | {{if eq .ClientIP "3.4.5.6"}}0.0.0.0{{else}}{{.ClientIP}}{{end}} | Prepaid: (MAX) | {{.TunnelID}} | {{.TunnelNet}} | 207.45.216.134 | {{if eq .ClientIP "3.4.5.6"}}banned{{else}}activated{{end}} | unknown | {{$.ClientPubkeyAddress}} {{- end}} diff --git a/e2e/ibrl_test.go b/e2e/ibrl_test.go index 28d718b975..b41c83e86b 100644 --- a/e2e/ibrl_test.go +++ b/e2e/ibrl_test.go @@ -178,6 +178,7 @@ func checkIBRLPostConnect(t *testing.T, dn *TestDevnet, device *devnet.Device, c data: map[string]any{ "ClientIP": client.CYOANetworkIP, "ClientPubkeyAddress": client.Pubkey, + "DeviceIP": device.CYOANetworkIP, }, cmd: []string{"doublezero", "user", "list"}, }, From 80ea17745b7eb374669efdeb24b670e28bbb1e8a Mon Sep 17 00:00:00 2001 From: Juan Olveira Date: Fri, 24 Apr 2026 20:03:01 +0000 Subject: [PATCH 4/7] changelog: add tunnel_endpoint user list entry --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0ca92204ad..27fa88c69f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,7 @@ All notable changes to this project will be documented in this file. ### Changes - CLI + - Add `tunnel_endpoint` field to `doublezero user list` output (table and JSON) showing the device-side GRE endpoint IP assigned to each user - Add `cyoa_ips` field to `doublezero device get` and `doublezero device list` output, showing the IP networks of interfaces with `user_tunnel_endpoint` enabled - Extend `doublezero resource verify` to check `MulticastPublisherBlock` against multicast publisher users' `dz_ip` allocations; legacy `dz_ip`s that fall outside the block's range are ignored so pre-existing users allocated before this extension existed do not produce false discrepancies - Fix `doublezero resource verify` to report missing `TunnelIds` resource extensions for all devices, including those without any users; previously the discrepancy was suppressed when a device had no users, hiding unallocated extensions From 9f2ae8313dd415f72338334209695d3a4b80fdb5 Mon Sep 17 00:00:00 2001 From: Juan Olveira Date: Sat, 25 Apr 2026 11:14:40 +0000 Subject: [PATCH 5/7] e2e: revert ibrl_with_allocated_addr fixtures to 0.0.0.0 tunnel_endpoint Users created via `user create` store 0.0.0.0 as a sentinel meaning "use device.public_ip". Only users created via `connect ibrl` have the endpoint resolved explicitly by select_tunnel_endpoint. --- .../doublezero_user_list_user_added.tmpl | 2 +- .../doublezero_user_list_user_removed.tmpl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/e2e/fixtures/ibrl_with_allocated_addr/doublezero_user_list_user_added.tmpl b/e2e/fixtures/ibrl_with_allocated_addr/doublezero_user_list_user_added.tmpl index f8b8f2e96c..bd586dd0b2 100644 --- a/e2e/fixtures/ibrl_with_allocated_addr/doublezero_user_list_user_added.tmpl +++ b/e2e/fixtures/ibrl_with_allocated_addr/doublezero_user_list_user_added.tmpl @@ -1,5 +1,5 @@ account | tenant | user_type | groups | device | location | cyoa_type | client_ip | dz_ip | accesspass | tunnel_id | tunnel_net | tunnel_endpoint | status | bgp_status | owner {{- range .IBRLUsers}} - IGNORED | | IBRL | | la2-dz01 | Los Angeles | GREOverDIA | {{.ClientIP}} | {{.ClientIP}} | Prepaid: (MAX) | {{.TunnelID}} | {{.TunnelNet}} | 207.45.216.134 | activated | unknown | {{$.ClientPubkeyAddress}} + IGNORED | | IBRL | | la2-dz01 | Los Angeles | GREOverDIA | {{.ClientIP}} | {{.ClientIP}} | Prepaid: (MAX) | {{.TunnelID}} | {{.TunnelNet}} | 0.0.0.0 | activated | unknown | {{$.ClientPubkeyAddress}} {{- end}} IGNORED | | IBRLWithAllocatedIP | | ny5-dz01 | New York | GREOverDIA | {{.ClientIP}} | {{.ExpectedAllocatedClientIP}} | Prepaid: (MAX) | {{.AllocatedUserTunnelID}} | {{.AllocatedUserTunnelNet}} | {{.DeviceIP}} | activated | unknown | {{.ClientPubkeyAddress}} diff --git a/e2e/fixtures/ibrl_with_allocated_addr/doublezero_user_list_user_removed.tmpl b/e2e/fixtures/ibrl_with_allocated_addr/doublezero_user_list_user_removed.tmpl index 136ef76ba5..1623dee618 100644 --- a/e2e/fixtures/ibrl_with_allocated_addr/doublezero_user_list_user_removed.tmpl +++ b/e2e/fixtures/ibrl_with_allocated_addr/doublezero_user_list_user_removed.tmpl @@ -1,4 +1,4 @@ account | tenant | user_type | groups | device | location | cyoa_type | client_ip | dz_ip | accesspass | tunnel_id | tunnel_net | tunnel_endpoint | status | bgp_status | owner {{- range .IBRLUsers}} - IGNORED | | IBRL | | la2-dz01 | Los Angeles | GREOverDIA | {{.ClientIP}} | {{if eq .ClientIP "3.4.5.6"}}0.0.0.0{{else}}{{.ClientIP}}{{end}} | Prepaid: (MAX) | {{.TunnelID}} | {{.TunnelNet}} | 207.45.216.134 | {{if eq .ClientIP "3.4.5.6"}}banned{{else}}activated{{end}} | unknown | {{$.ClientPubkeyAddress}} + IGNORED | | IBRL | | la2-dz01 | Los Angeles | GREOverDIA | {{.ClientIP}} | {{if eq .ClientIP "3.4.5.6"}}0.0.0.0{{else}}{{.ClientIP}}{{end}} | Prepaid: (MAX) | {{.TunnelID}} | {{.TunnelNet}} | 0.0.0.0 | {{if eq .ClientIP "3.4.5.6"}}banned{{else}}activated{{end}} | unknown | {{$.ClientPubkeyAddress}} {{- end}} From 47f69023a4ecd3bdbb54fbaa84978ae70329ca85 Mon Sep 17 00:00:00 2001 From: Juan Olveira Date: Sat, 25 Apr 2026 13:37:22 +0000 Subject: [PATCH 6/7] e2e: fix ibrl_with_allocated_addr fixtures to use real tunnel_endpoint IP The activator resolves the 0.0.0.0 sentinel to la2-dz01's public IP (207.45.216.134) during activation and writes it back to the onchain account, so the CLI shows the resolved IP. The previous revert was incorrect. --- .../doublezero_user_list_user_added.tmpl | 2 +- .../doublezero_user_list_user_removed.tmpl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/e2e/fixtures/ibrl_with_allocated_addr/doublezero_user_list_user_added.tmpl b/e2e/fixtures/ibrl_with_allocated_addr/doublezero_user_list_user_added.tmpl index bd586dd0b2..f8b8f2e96c 100644 --- a/e2e/fixtures/ibrl_with_allocated_addr/doublezero_user_list_user_added.tmpl +++ b/e2e/fixtures/ibrl_with_allocated_addr/doublezero_user_list_user_added.tmpl @@ -1,5 +1,5 @@ account | tenant | user_type | groups | device | location | cyoa_type | client_ip | dz_ip | accesspass | tunnel_id | tunnel_net | tunnel_endpoint | status | bgp_status | owner {{- range .IBRLUsers}} - IGNORED | | IBRL | | la2-dz01 | Los Angeles | GREOverDIA | {{.ClientIP}} | {{.ClientIP}} | Prepaid: (MAX) | {{.TunnelID}} | {{.TunnelNet}} | 0.0.0.0 | activated | unknown | {{$.ClientPubkeyAddress}} + IGNORED | | IBRL | | la2-dz01 | Los Angeles | GREOverDIA | {{.ClientIP}} | {{.ClientIP}} | Prepaid: (MAX) | {{.TunnelID}} | {{.TunnelNet}} | 207.45.216.134 | activated | unknown | {{$.ClientPubkeyAddress}} {{- end}} IGNORED | | IBRLWithAllocatedIP | | ny5-dz01 | New York | GREOverDIA | {{.ClientIP}} | {{.ExpectedAllocatedClientIP}} | Prepaid: (MAX) | {{.AllocatedUserTunnelID}} | {{.AllocatedUserTunnelNet}} | {{.DeviceIP}} | activated | unknown | {{.ClientPubkeyAddress}} diff --git a/e2e/fixtures/ibrl_with_allocated_addr/doublezero_user_list_user_removed.tmpl b/e2e/fixtures/ibrl_with_allocated_addr/doublezero_user_list_user_removed.tmpl index 1623dee618..136ef76ba5 100644 --- a/e2e/fixtures/ibrl_with_allocated_addr/doublezero_user_list_user_removed.tmpl +++ b/e2e/fixtures/ibrl_with_allocated_addr/doublezero_user_list_user_removed.tmpl @@ -1,4 +1,4 @@ account | tenant | user_type | groups | device | location | cyoa_type | client_ip | dz_ip | accesspass | tunnel_id | tunnel_net | tunnel_endpoint | status | bgp_status | owner {{- range .IBRLUsers}} - IGNORED | | IBRL | | la2-dz01 | Los Angeles | GREOverDIA | {{.ClientIP}} | {{if eq .ClientIP "3.4.5.6"}}0.0.0.0{{else}}{{.ClientIP}}{{end}} | Prepaid: (MAX) | {{.TunnelID}} | {{.TunnelNet}} | 0.0.0.0 | {{if eq .ClientIP "3.4.5.6"}}banned{{else}}activated{{end}} | unknown | {{$.ClientPubkeyAddress}} + IGNORED | | IBRL | | la2-dz01 | Los Angeles | GREOverDIA | {{.ClientIP}} | {{if eq .ClientIP "3.4.5.6"}}0.0.0.0{{else}}{{.ClientIP}}{{end}} | Prepaid: (MAX) | {{.TunnelID}} | {{.TunnelNet}} | 207.45.216.134 | {{if eq .ClientIP "3.4.5.6"}}banned{{else}}activated{{end}} | unknown | {{$.ClientPubkeyAddress}} {{- end}} From adc7a893082544267476a8d53d5a2505673750dd Mon Sep 17 00:00:00 2001 From: Juan Olveira Date: Sat, 25 Apr 2026 14:38:48 +0000 Subject: [PATCH 7/7] e2e: use dynamic tunnel_endpoint in ibrl_with_allocated_addr fixtures The activator resolves 0.0.0.0 to the device's public IP in stateful mode, but passes it through unchanged in stateless (onchain allocation) mode. Hardcoding either value causes failures depending on the env. Capture tunnel_endpoint via parseIBRLTunnelInfo and use it as a template variable, matching the existing pattern for tunnel_id and tunnel_net. --- .../doublezero_user_list_user_added.tmpl | 2 +- .../doublezero_user_list_user_removed.tmpl | 2 +- e2e/ibrl_with_allocated_ip_test.go | 14 ++++++++------ 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/e2e/fixtures/ibrl_with_allocated_addr/doublezero_user_list_user_added.tmpl b/e2e/fixtures/ibrl_with_allocated_addr/doublezero_user_list_user_added.tmpl index f8b8f2e96c..1e279ba5fb 100644 --- a/e2e/fixtures/ibrl_with_allocated_addr/doublezero_user_list_user_added.tmpl +++ b/e2e/fixtures/ibrl_with_allocated_addr/doublezero_user_list_user_added.tmpl @@ -1,5 +1,5 @@ account | tenant | user_type | groups | device | location | cyoa_type | client_ip | dz_ip | accesspass | tunnel_id | tunnel_net | tunnel_endpoint | status | bgp_status | owner {{- range .IBRLUsers}} - IGNORED | | IBRL | | la2-dz01 | Los Angeles | GREOverDIA | {{.ClientIP}} | {{.ClientIP}} | Prepaid: (MAX) | {{.TunnelID}} | {{.TunnelNet}} | 207.45.216.134 | activated | unknown | {{$.ClientPubkeyAddress}} + IGNORED | | IBRL | | la2-dz01 | Los Angeles | GREOverDIA | {{.ClientIP}} | {{.ClientIP}} | Prepaid: (MAX) | {{.TunnelID}} | {{.TunnelNet}} | {{.TunnelEndpoint}} | activated | unknown | {{$.ClientPubkeyAddress}} {{- end}} IGNORED | | IBRLWithAllocatedIP | | ny5-dz01 | New York | GREOverDIA | {{.ClientIP}} | {{.ExpectedAllocatedClientIP}} | Prepaid: (MAX) | {{.AllocatedUserTunnelID}} | {{.AllocatedUserTunnelNet}} | {{.DeviceIP}} | activated | unknown | {{.ClientPubkeyAddress}} diff --git a/e2e/fixtures/ibrl_with_allocated_addr/doublezero_user_list_user_removed.tmpl b/e2e/fixtures/ibrl_with_allocated_addr/doublezero_user_list_user_removed.tmpl index 136ef76ba5..9d86e63600 100644 --- a/e2e/fixtures/ibrl_with_allocated_addr/doublezero_user_list_user_removed.tmpl +++ b/e2e/fixtures/ibrl_with_allocated_addr/doublezero_user_list_user_removed.tmpl @@ -1,4 +1,4 @@ account | tenant | user_type | groups | device | location | cyoa_type | client_ip | dz_ip | accesspass | tunnel_id | tunnel_net | tunnel_endpoint | status | bgp_status | owner {{- range .IBRLUsers}} - IGNORED | | IBRL | | la2-dz01 | Los Angeles | GREOverDIA | {{.ClientIP}} | {{if eq .ClientIP "3.4.5.6"}}0.0.0.0{{else}}{{.ClientIP}}{{end}} | Prepaid: (MAX) | {{.TunnelID}} | {{.TunnelNet}} | 207.45.216.134 | {{if eq .ClientIP "3.4.5.6"}}banned{{else}}activated{{end}} | unknown | {{$.ClientPubkeyAddress}} + IGNORED | | IBRL | | la2-dz01 | Los Angeles | GREOverDIA | {{.ClientIP}} | {{if eq .ClientIP "3.4.5.6"}}0.0.0.0{{else}}{{.ClientIP}}{{end}} | Prepaid: (MAX) | {{.TunnelID}} | {{.TunnelNet}} | {{.TunnelEndpoint}} | {{if eq .ClientIP "3.4.5.6"}}banned{{else}}activated{{end}} | unknown | {{$.ClientPubkeyAddress}} {{- end}} diff --git a/e2e/ibrl_with_allocated_ip_test.go b/e2e/ibrl_with_allocated_ip_test.go index 3c5bfbcfa8..e5f27061c1 100644 --- a/e2e/ibrl_with_allocated_ip_test.go +++ b/e2e/ibrl_with_allocated_ip_test.go @@ -20,9 +20,10 @@ import ( // ibrlUserTunnelInfo holds tunnel assignment info for an IBRL user, parsed from user list output. type ibrlUserTunnelInfo struct { - ClientIP string - TunnelID string - TunnelNet string + ClientIP string + TunnelID string + TunnelNet string + TunnelEndpoint string } // parseIBRLTunnelInfo parses user list output and returns tunnel info for IBRL and IBRLWithAllocatedIP users. @@ -32,9 +33,10 @@ func parseIBRLTunnelInfo(output []byte) (ibrlUsers []ibrlUserTunnelInfo, allocUs switch row["user_type"] { case "IBRL": ibrlUsers = append(ibrlUsers, ibrlUserTunnelInfo{ - ClientIP: row["client_ip"], - TunnelID: row["tunnel_id"], - TunnelNet: row["tunnel_net"], + ClientIP: row["client_ip"], + TunnelID: row["tunnel_id"], + TunnelNet: row["tunnel_net"], + TunnelEndpoint: row["tunnel_endpoint"], }) case "IBRLWithAllocatedIP": allocUserTunnelID = row["tunnel_id"]