{"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":1,"created_at":"2018-07-31T01:14:24Z","updated_at":"2018-08-07T18:40:18Z","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/411159265","html_url":"https://github.com/bwssytems/ha-bridge/pull/981#issuecomment-411159265","issue_url":"https://api.github.com/repos/bwssytems/ha-bridge/issues/981","id":411159265,"node_id":"MDEyOklzc3VlQ29tbWVudDQxMTE1OTI2NQ==","user":{"login":"bwssytems","id":13528314,"node_id":"MDQ6VXNlcjEzNTI4MzE0","avatar_url":"https://avatars1.githubusercontent.com/u/13528314?v=4","gravatar_id":"","url":"https://api.github.com/users/bwssytems","html_url":"https://github.com/bwssytems","followers_url":"https://api.github.com/users/bwssytems/followers","following_url":"https://api.github.com/users/bwssytems/following{/other_user}","gists_url":"https://api.github.com/users/bwssytems/gists{/gist_id}","starred_url":"https://api.github.com/users/bwssytems/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bwssytems/subscriptions","organizations_url":"https://api.github.com/users/bwssytems/orgs","repos_url":"https://api.github.com/users/bwssytems/repos","events_url":"https://api.github.com/users/bwssytems/events{/privacy}","received_events_url":"https://api.github.com/users/bwssytems/received_events","type":"User","site_admin":false},"created_at":"2018-08-07T18:40:18Z","updated_at":"2018-08-07T18:40:18Z","author_association":"OWNER","body":"Now that I take a look at this, I try to do this in the setup of bridge settings. If there is no upnp config address, I try to find one by looping through the interfaces and picking a valid ipv4 addr. Since the http address is always defaulted to 0.0.0.0 on start up, this usually is not an issue."}}
{"actor":{"display_login":"bwssytems"}}