{"action":"created","issue":{"url":"https://api.github.com/repos/bwssytems/ha-bridge/issues/981","repository_url":"https://api.github.com/repos/bwssytems/ha-bridge","labels_url":"https://api.github.com/repos/bwssytems/ha-bridge/issues/981/labels{/name}","comments_url":"https://api.github.com/repos/bwssytems/ha-bridge/issues/981/comments","events_url":"https://api.github.com/repos/bwssytems/ha-bridge/issues/981/events","html_url":"https://github.com/bwssytems/ha-bridge/pull/981","id":345998179,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA0OTcwOTg0","number":981,"title":"Make LOCATION header use a reasonable IP in UPNP responses","user":{"login":"pvint","id":608740,"node_id":"MDQ6VXNlcjYwODc0MA==","avatar_url":"https://avatars1.githubusercontent.com/u/608740?v=4","gravatar_id":"","url":"https://api.github.com/users/pvint","html_url":"https://github.com/pvint","followers_url":"https://api.github.com/users/pvint/followers","following_url":"https://api.github.com/users/pvint/following{/other_user}","gists_url":"https://api.github.com/users/pvint/gists{/gist_id}","starred_url":"https://api.github.com/users/pvint/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pvint/subscriptions","organizations_url":"https://api.github.com/users/pvint/orgs","repos_url":"https://api.github.com/users/pvint/repos","events_url":"https://api.github.com/users/pvint/events{/privacy}","received_events_url":"https://api.github.com/users/pvint/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2018-07-31T01:14:24Z","updated_at":"2018-08-22T22:26:36Z","closed_at":null,"author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/bwssytems/ha-bridge/pulls/981","html_url":"https://github.com/bwssytems/ha-bridge/pull/981","diff_url":"https://github.com/bwssytems/ha-bridge/pull/981.diff","patch_url":"https://github.com/bwssytems/ha-bridge/pull/981.patch"},"body":"See Issue #980 \r\n\r\nThe LOCATION header in UPNP replies can be set to the wrong IP when you have `useUpnpIface: false` set. and you have multiple IP addresses. \r\n\r\nExample:\r\n\r\n```\r\nU 192.168.1.73:1900 -> 192.168.1.75:50000\r\nHTTP/1.1 200 OK.\r\nHOST: 239.255.255.250:1900.\r\nCACHE-CONTROL: max-age=100.\r\nEXT:.\r\nLOCATION: http://10.36.12.186:8088/description.xml.\r\nSERVER: Linux/3.14.0 UPnP/1.0 IpBridge/1.19.0.\r\nhue-bridgeid: 000088FFFE00BBEE.\r\nST: uuid:2f402f80-da50-11e1-9b23-00008800bbee.\r\nUSN: uuid:2f402f80-da50-11e1-9b23-00008800bbee.\r\n.\r\n```\r\n\r\nIt appears that it will always reply on the appropriate interface, however when setting the LOCATION header it simply uses the IP of the last interface that it found (which in my case was the tun0 interface which cannot work).\r\n\r\nAfter this change, it works and devices can be discovered:\r\n\r\n```\r\nU 192.168.1.73:1900 -> 192.168.1.75:50000\r\nHTTP/1.1 200 OK.\r\nHOST: 239.255.255.250:1900.\r\nCACHE-CONTROL: max-age=100.\r\nEXT:.\r\nLOCATION: http://192.168.1.73:8088/description.xml.\r\nSERVER: Linux/3.14.0 UPnP/1.0 IpBridge/1.19.0.\r\nhue-bridgeid: 000088FFFE00BBEE.\r\nST: uuid:2f402f80-da50-11e1-9b23-00008800bbee.\r\nUSN: uuid:2f402f80-da50-11e1-9b23-00008800bbee.\r\n```"},"comment":{"url":"https://api.github.com/repos/bwssytems/ha-bridge/issues/comments/415202473","html_url":"https://github.com/bwssytems/ha-bridge/pull/981#issuecomment-415202473","issue_url":"https://api.github.com/repos/bwssytems/ha-bridge/issues/981","id":415202473,"node_id":"MDEyOklzc3VlQ29tbWVudDQxNTIwMjQ3Mw==","user":{"login":"pvint","id":608740,"node_id":"MDQ6VXNlcjYwODc0MA==","avatar_url":"https://avatars1.githubusercontent.com/u/608740?v=4","gravatar_id":"","url":"https://api.github.com/users/pvint","html_url":"https://github.com/pvint","followers_url":"https://api.github.com/users/pvint/followers","following_url":"https://api.github.com/users/pvint/following{/other_user}","gists_url":"https://api.github.com/users/pvint/gists{/gist_id}","starred_url":"https://api.github.com/users/pvint/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pvint/subscriptions","organizations_url":"https://api.github.com/users/pvint/orgs","repos_url":"https://api.github.com/users/pvint/repos","events_url":"https://api.github.com/users/pvint/events{/privacy}","received_events_url":"https://api.github.com/users/pvint/received_events","type":"User","site_admin":false},"created_at":"2018-08-22T22:26:36Z","updated_at":"2018-08-22T22:26:36Z","author_association":"NONE","body":"I took a look at that, and yes, that may be a better way to go. It conceivably still could be wrong in the event that you have more than one IP on the same subnet, but that would be a relatively rare case (and also would imply static IP addresses, in which case you could set the upnp address explicitly)\r\n\r\nI may test this idea, but it will likely be a while before I really have time."}}
{"actor":{"display_login":"pvint"}}