gNMIc fails to connect to targets using IPv6 link-local addresses that include a zone index (e.g. %eth0). Although address resolution appears correct in gRPC logs, the connection fails during transport creation because the zone index is URL-reencoded and passed incorrectly to the OS socket layer.
This results in network is unreachable errors even when the address and interface are valid and reachable (e.g. ping6 fe80::…%eth0 succeeds).
If I explicitly try with passthrough, I am getting the error:
Attempt 1: without adding scope identifier before network interface name
gnmic -a "passthrough:///[fe80::xxxx%eth0]:9339" --mode stream --stream-mode sample --sample-interval 30s sub --path :/interfaces/interface[name=eth0]/state --insecure --debug
2026/02/10 00:24:00.023698 /home/runner/work/gnmic/gnmic/pkg/app/subscribe.go:254: [gnmic] starting target "passthrough:///[fe80::xxxx%eth0]:9339" listener
2026/02/10 00:24:00.023782 /home/runner/work/gnmic/gnmic/pkg/app/gnmi_client_subscribe.go:207: [gnmic] failed to initialize target "passthrough:///[fe80::xxxx%eth0]:9339": [passthrough:///[fe80::xxxx%eth0]:9339]:57400: parse "passthrough:///[passthrough:///[fe80::xxxx%eth0]:9339]:57400": invalid URL escape "%et"
Attempt 2: with scopr identifier before network interface name
gnmic -a "passthrough:///[fe80::xxxx%25eth0]:9339" --mode stream --stream-mode sample --sample-interval 30s sub --path :/interfaces/interface[name="eth0"]/state --insecure --debug
2026/02/10 00:25:21.615469 /home/runner/work/gnmic/gnmic/pkg/app/subscribe.go:313: [gnmic] target "passthrough:///[fe80::xxxx%25eth0]:9339": subscription default-1770683120 rcv error: failed to create a subscribe client, target='passthrough:///[fe80::xxxx%25eth0]:9339', retry in 10000000000. err=rpc error: code = Unavailable desc = connection error: desc = "transport: Error while dialing: dial tcp: address [passthrough:///[fe80::xxxx%25eth0]:9339]:57400: too many colons in address"
gNMIc fails to connect to targets using IPv6 link-local addresses that include a zone index (e.g. %eth0). Although address resolution appears correct in gRPC logs, the connection fails during transport creation because the zone index is URL-reencoded and passed incorrectly to the OS socket layer.
This results in network is unreachable errors even when the address and interface are valid and reachable (e.g. ping6 fe80::…%eth0 succeeds).
If I explicitly try with passthrough, I am getting the error:
Attempt 1: without adding scope identifier before network interface name
gnmic -a "passthrough:///[fe80::xxxx%eth0]:9339" --mode stream --stream-mode sample --sample-interval 30s sub --path :/interfaces/interface[name=eth0]/state --insecure --debug
2026/02/10 00:24:00.023698 /home/runner/work/gnmic/gnmic/pkg/app/subscribe.go:254: [gnmic] starting target "passthrough:///[fe80::xxxx%eth0]:9339" listener
2026/02/10 00:24:00.023782 /home/runner/work/gnmic/gnmic/pkg/app/gnmi_client_subscribe.go:207: [gnmic] failed to initialize target "passthrough:///[fe80::xxxx%eth0]:9339": [passthrough:///[fe80::xxxx%eth0]:9339]:57400: parse "passthrough:///[passthrough:///[fe80::xxxx%eth0]:9339]:57400": invalid URL escape "%et"
Attempt 2: with scopr identifier before network interface name
gnmic -a "passthrough:///[fe80::xxxx%25eth0]:9339" --mode stream --stream-mode sample --sample-interval 30s sub --path :/interfaces/interface[name="eth0"]/state --insecure --debug
2026/02/10 00:25:21.615469 /home/runner/work/gnmic/gnmic/pkg/app/subscribe.go:313: [gnmic] target "passthrough:///[fe80::xxxx%25eth0]:9339": subscription default-1770683120 rcv error: failed to create a subscribe client, target='passthrough:///[fe80::xxxx%25eth0]:9339', retry in 10000000000. err=rpc error: code = Unavailable desc = connection error: desc = "transport: Error while dialing: dial tcp: address [passthrough:///[fe80::xxxx%25eth0]:9339]:57400: too many colons in address"