diff options
author | Lluís Batlle i Rossell <viric@viric.name> | 2014-05-28 15:22:51 +0200 |
---|---|---|
committer | Lluís Batlle i Rossell <viric@viric.name> | 2014-05-28 15:23:36 +0200 |
commit | 338969701c0cbfd868d39278fd36c73cfaa491eb (patch) | |
tree | cf24e422188e0d28e3e7ec2e44940057b361f74c /pkgs/applications/networking/syncthing | |
parent | a8c9c11f9ec5b0d0d5eec279b66da84a89008f61 (diff) | |
download | nixlib-338969701c0cbfd868d39278fd36c73cfaa491eb.tar nixlib-338969701c0cbfd868d39278fd36c73cfaa491eb.tar.gz nixlib-338969701c0cbfd868d39278fd36c73cfaa491eb.tar.bz2 nixlib-338969701c0cbfd868d39278fd36c73cfaa491eb.tar.lz nixlib-338969701c0cbfd868d39278fd36c73cfaa491eb.tar.xz nixlib-338969701c0cbfd868d39278fd36c73cfaa491eb.tar.zst nixlib-338969701c0cbfd868d39278fd36c73cfaa491eb.zip |
Fixing upnp in syncthing
Diffstat (limited to 'pkgs/applications/networking/syncthing')
-rw-r--r-- | pkgs/applications/networking/syncthing/default.nix | 2 | ||||
-rw-r--r-- | pkgs/applications/networking/syncthing/upnp.patch | 28 |
2 files changed, 30 insertions, 0 deletions
diff --git a/pkgs/applications/networking/syncthing/default.nix b/pkgs/applications/networking/syncthing/default.nix index 12aa98758ad6..28603daa9c67 100644 --- a/pkgs/applications/networking/syncthing/default.nix +++ b/pkgs/applications/networking/syncthing/default.nix @@ -12,6 +12,8 @@ stdenv.mkDerivation rec { buildInputs = [ go ]; + patches = [ ./upnp.patch ]; + buildPhase = '' mkdir -p "./dependencies/src/github.com/calmh/syncthing" diff --git a/pkgs/applications/networking/syncthing/upnp.patch b/pkgs/applications/networking/syncthing/upnp.patch new file mode 100644 index 000000000000..f4164b4f6bc3 --- /dev/null +++ b/pkgs/applications/networking/syncthing/upnp.patch @@ -0,0 +1,28 @@ +Trying to fix upnp for miniupnpd: +https://github.com/calmh/syncthing/issues/211 + +diff --git a/upnp/upnp.go b/upnp/upnp.go +index 9de719a..9c85b23 100644 +--- a/upnp/upnp.go ++++ b/upnp/upnp.go +@@ -60,14 +60,12 @@ func Discover() (*IGD, error) { + return nil, err + } + +- search := []byte(` +-M-SEARCH * HTTP/1.1 +-Host: 239.255.255.250:1900 +-St: urn:schemas-upnp-org:device:InternetGatewayDevice:1 +-Man: "ssdp:discover" +-Mx: 3 +- +-`) ++ search := []byte("M-SEARCH * HTTP/1.1\r\n" + ++"Host: 239.255.255.250:1900\r\n" + ++"St: urn:schemas-upnp-org:device:InternetGatewayDevice:1\r\n" + ++"Man: \"ssdp:discover\"\r\n" + ++"Mx: 3\r\n" + ++"\r\n") + + _, err = socket.WriteTo(search, ssdp) + if err != nil { |