Commit 0e94489
committed
nat: fix async_upnp_client compatibility — traverse embedded devices, fix bool type, deduplicate
- Guard on_response with early return if _service already found (SSDP
sends one response per device sub-type, so the callback fires ~9x)
- Extract location from CaseInsensitiveDict headers (newer
async_upnp_client passes headers dict, not a response object)
- Recursively traverse embedded_devices to find WANIPConnection service
(root device only exposes Layer3Forwarding; WANIPConnection lives in
the InternetGatewayDevice → WANDevice → WANConnectionDevice subtree)
- Pass NewEnabled=True (bool) instead of 1; async_upnp_client validates
the UPnP boolean type strictly1 parent e40687e commit 0e94489
1 file changed
+14
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
114 | 114 | | |
115 | 115 | | |
116 | 116 | | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
117 | 123 | | |
118 | | - | |
| 124 | + | |
119 | 125 | | |
120 | | - | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
121 | 132 | | |
122 | 133 | | |
123 | 134 | | |
| |||
149 | 160 | | |
150 | 161 | | |
151 | 162 | | |
152 | | - | |
| 163 | + | |
153 | 164 | | |
154 | 165 | | |
155 | 166 | | |
| |||
0 commit comments