From d72da506c585ec6b761cc4276254b7c7127c53b2 Mon Sep 17 00:00:00 2001 From: David Hill Date: Sat, 26 Apr 2014 14:46:17 -0400 Subject: [PATCH] Some UPNP devices require the protocol to be uppercase. This matches what miniupnpc sends. --- upnp.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/upnp.go b/upnp.go index 86a2748c..04d504cf 100644 --- a/upnp.go +++ b/upnp.go @@ -361,7 +361,7 @@ func (n *upnpNAT) AddPortMapping(protocol string, externalPort, internalPort int // A single concatenation would break ARM compilation. message := "\r\n" + "" + strconv.Itoa(externalPort) - message += "" + protocol + "" + message += "" + strings.ToUpper(protocol) + "" message += "" + strconv.Itoa(internalPort) + "" + "" + n.ourIP + "" + "1" @@ -389,7 +389,7 @@ func (n *upnpNAT) DeletePortMapping(protocol string, externalPort, internalPort message := "\r\n" + "" + strconv.Itoa(externalPort) + - "" + protocol + "" + + "" + strings.ToUpper(protocol) + "" + "" response, err := soapRequest(n.serviceURL, "DeletePortMapping", message)