From 7eb4d75bbf4b55c70d0cdf9c1a2db43319ff8fd4 Mon Sep 17 00:00:00 2001 From: Lan Tian Date: Tue, 1 Jul 2025 00:04:03 -0700 Subject: [PATCH] frontend: handle protocol names starting with number --- frontend/webserver.go | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/frontend/webserver.go b/frontend/webserver.go index 84a19a9..0a4da15 100644 --- a/frontend/webserver.go +++ b/frontend/webserver.go @@ -18,13 +18,13 @@ import ( var primitiveMap = map[string]string{ "summary": "show protocols", - "detail": "show protocols all %s", - "route_from_protocol": "show route protocol %s", - "route_from_protocol_all": "show route protocol %s all", - "route_from_protocol_primary": "show route protocol %s primary", - "route_from_protocol_all_primary": "show route protocol %s all primary", - "route_filtered_from_protocol": "show route filtered protocol %s", - "route_filtered_from_protocol_all": "show route filtered protocol %s all", + "detail": "show protocols all \"%s\"", + "route_from_protocol": "show route protocol \"%s\"", + "route_from_protocol_all": "show route protocol \"%s\" all", + "route_from_protocol_primary": "show route protocol \"%s\" primary", + "route_from_protocol_all_primary": "show route protocol \"%s\" all primary", + "route_filtered_from_protocol": "show route filtered protocol \"%s\"", + "route_filtered_from_protocol_all": "show route filtered protocol \"%s\" all", "route_from_origin": "show route where bgp_path.last = %s", "route_from_origin_all": "show route where bgp_path.last = %s all", "route_from_origin_primary": "show route where bgp_path.last = %s primary",