From 393798098c08dc76c00d87f96565b6e41c122547 Mon Sep 17 00:00:00 2001 From: Audrius Butkevicius Date: Sat, 9 Apr 2016 01:06:55 +0000 Subject: [PATCH] cmd/syncthing: Listening on a 0 port is not valid (fixes #2926) --- cmd/syncthing/main.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cmd/syncthing/main.go b/cmd/syncthing/main.go index bba23f95..2e6e9b1d 100644 --- a/cmd/syncthing/main.go +++ b/cmd/syncthing/main.go @@ -721,6 +721,9 @@ func syncthingMain(runtimeOptions RuntimeOptions) { if err != nil { l.Fatalln("Bad listen address:", err) } + if addr.Port == 0 { + l.Fatalf("Listen address %s: invalid port", uri) + } // Start UPnP var upnpService *upnp.Service