From bf40dadf048edbf0bbe123134791ed3d6454703c Mon Sep 17 00:00:00 2001
From: Audrius Butkevicius <audrius.butkevicius@gmail.com>
Date: Tue, 30 Dec 2014 21:46:48 +0000
Subject: [PATCH] Use unique names for UPnP mappings (fixes #1100, fixes #1128)

---
 cmd/syncthing/main.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/cmd/syncthing/main.go b/cmd/syncthing/main.go
index 184f29c25..b4b6a02bc 100644
--- a/cmd/syncthing/main.go
+++ b/cmd/syncthing/main.go
@@ -795,7 +795,7 @@ func setupExternalPort(igd *upnp.IGD, port int) int {
 
 	for i := 0; i < 10; i++ {
 		r := 1024 + predictableRandom.Intn(65535-1024)
-		err := igd.AddPortMapping(upnp.TCP, r, port, "syncthing", cfg.Options().UPnPLease*60)
+		err := igd.AddPortMapping(upnp.TCP, r, port, fmt.Sprintf("syncthing-%d", r), cfg.Options().UPnPLease*60)
 		if err == nil {
 			return r
 		}