Repository navigation
Labels
not-our-bugUsed only when we want to keep an issue open for visibility, but the real problem is somewhere else
Description
What happened?
After upgrade from syncthing v2.0.14 to syncthing v2.0.15, syncthing panics immediately at startup if I'm connected to the VPN on my system.
- It works fine if I disconnect the VPN and then start Syncthing, but appears to start panicking at some point after that. (I assume when the discovery functionality re-triggers).
- It works fine if I downgrade back to v2.0.14.
- The VPN in question is an F5 BIG-IP APM Edge client. A notable observation is that the 'route print' output reports the gateway for 0.0.0.0 as "On-link".
I suspect this correlates to the upgrade to jackpal/[email protected]. For reference, below is the lightly-obfuscated route print 0.0.0.0 output, as well as the ipconfig output for the same VPN interface.
===========================================================================
Interface List
43..........................._Common_na_vpn
50...00 42 42 42 42 42 ......Hyper-V Virtual Ethernet Adapter
13...42 42 42 42 42 42 ......Intel(R) Wi-Fi otters #2
10...42 42 42 42 42 48 ......Intel(R) Wi-Fi otters #5
12...42 42 42 42 42 42 ......Intel(R) Wi-Fi otters
8...42 42 42 42 42 40 ......Bluetooth Device (Personal Area Network)
1...........................Software Loopback Interface 1
===========================================================================
IPv4 Route Table
===========================================================================
Active Routes:
Network Destination Netmask Gateway Interface Metric
0.0.0.0 0.0.0.0 On-link 192.0.2.5 1
===========================================================================
Persistent Routes:
None
IPv6 Route Table
===========================================================================
Active Routes:
None
Persistent Routes:
None
Windows IP Configuration
PPP adapter _Common_na_vpn:
Connection-specific DNS Suffix . : example.com
IPv6 Address. . . . . . . . . . . : fd42:4242:4242::9645
Link-local IPv6 Address . . . . . : fe80::9645%43
IPv4 Address. . . . . . . . . . . : 192.0.2.5
Subnet Mask . . . . . . . . . . . : 255.255.255.255
Default Gateway . . . . . . . . . : ::
0.0.0.0
Syncthing version
2.0.15
Platform & operating system
Windows amd64
Browser version
not applicable
Relevant log output
Panic at 2026-03-06T11:15:06-08:00
panic: runtime error: index out of range [0] with length 0
goroutine 216 [running]:
github.com/jackpal/gateway.DiscoverGateway()
github.com/jackpal/[email protected]/gateway.go:50 +0x4d
github.com/syncthing/syncthing/lib/netutil.Gateway()
github.com/syncthing/syncthing/lib/netutil/netutil.go:29 +0x1f
github.com/syncthing/syncthing/lib/pmp.Discover.func1()
github.com/syncthing/syncthing/lib/pmp/pmp.go:33 +0x1b
github.com/syncthing/syncthing/lib/svcutil.CallWithContext.func1()
github.com/syncthing/syncthing/lib/svcutil/svcutil.go:231 +0x2c
created by github.com/syncthing/syncthing/lib/svcutil.CallWithContext in goroutine 213
github.com/syncthing/syncthing/lib/svcutil/svcutil.go:230 +0xb3
[...]
goroutine 213 [select]:
github.com/syncthing/syncthing/lib/svcutil.CallWithContext({0x7ff6714bfcb0, 0xc000485310}, 0xc0003685a0)
github.com/syncthing/syncthing/lib/svcutil/svcutil.go:234 +0xff
github.com/syncthing/syncthing/lib/pmp.Discover({0x7ff6714bfcb0, 0xc000485310}, 0x1a3185c5000, 0x2540be400)
github.com/syncthing/syncthing/lib/pmp/pmp.go:31 +0xce
github.com/syncthing/syncthing/lib/nat.discoverAll.func1(0x0?)
github.com/syncthing/syncthing/lib/nat/registry.go:33 +0x7f
created by github.com/syncthing/syncthing/lib/nat.discoverAll in goroutine 32
github.com/syncthing/syncthing/lib/nat/registry.go:31 +0x95Metadata
Metadata
Assignees
Labels
not-our-bugUsed only when we want to keep an issue open for visibility, but the real problem is somewhere else
Activity
marbens-arch commentedon Mar 6, 2026
As you say, in dc2a77a (contained in 2.0.15) there was a version bump of
jackpal/gateway.In the gateway library, there seems to be a bug that causes "success" (rather than
ErrNoGateway) if all default routes have anOn-linkgateway, in theparseWindowsGatewayIPsfunction.marbens-arch commentedon Mar 6, 2026
Are you willing to test whether this build fixes it? https://github.com/syncthing/syncthing/actions/runs/22782105939/artifacts/5805528719
darkrain42 commentedon Mar 6, 2026
yep, v2.0.16-rc.1.dev.3.g113cf08a (113cf08) is able to start up and run without issue. Thanks!
Return `ErrNoGateway` when all default routes have an `On-link` gateway
Return `ErrNoGateway` when all default routes have an `On-link` gateway
Return `ErrNoGateway` when all default routes have an `On-link` gateway
build(deps): temporarily switch to fork of gateway discovery library (f…
build(deps): temporarily switch to fork of gateway discovery library (f…
build(deps): temporarily switch to fork of gateway discovery library (f…
[codex] Merge upstream stable v2.1.1 into main (#23)