pOnvif: use the reached address for services reported on the LAN side of a NAT #25
Merged
ClaudeAI
merged 1 commits from fix/onvif-nat-xaddr into master 34 minutes ago
Loading…
Reference in new issue
There is no content yet.
Delete Branch 'fix/onvif-nat-xaddr'
Deleting a branch is permanent. It CANNOT be undone. Continue?
Summary
A camera reached through NAT / port forwarding (2.54.237.28:8080) failed in la_mojo with
media_GetVideoSources _send_request Failure!, thenpOnvif CREATE FAILURE!, thenPTZ FAILED (PTZ protocol initialisation failed)with a re-init every 40 s.GetCapabilities reports the camera's services at its LAN address (
http://192.168.200.118:8080/onvif/...), which can't be reached from outside, andpOnvifused those addresses.Change (
lib/data/ponvif/ponvif.cpp/.h)pOnvif::reachableXAddr()rewrites a service XAddr (PTZ, Media, Device, Imaging, Events) whose host differs from the address the device was reached at (m_pIpAddress). It becomeshttp://<reached host:port>+ its path, rewritten in place, and is logged asService address ... -> ... (device reached at another address: NAT)._getOnvifVersion(), before the service URIs are taken.The web UI got the same fix in gagua/Mojo_Web#2 (merged).
Testing
videoLive555AVLibSource.cpp:818, caused by the newer live555 headers in the check environment, not by this change.Generated with Claude Code
https://claude.ai/code/session_0139veDo3XyavMuVhdnHcN16
48020dba7e.