fix: persist empty POST in TR-069 trace when CPE uses a new TCP port
Build & Deploy / build (push) Successful in 38s
Build & Deploy / docker (push) Successful in 1m5s
Build & Deploy / deploy (push) Successful in 23s

When a CPE sends an empty POST (polling) on a new TCP connection, the
remoteKey (IP:port) differs from the one registered during Inform.
Add StateMachineManager.getHashIdForRemoteIp() to find the device by
IP alone as a fallback, so cwmpDeviceId is resolved and the exchange
is properly stored in the trace (cwmpMethod: Empty, dashed arrow).
This commit is contained in:
Kevin L'Hereec committed 2026-07-17 14:24:44 +02:00
1 parent 3bb85d9031
commit d44d896556
2 files changed
+28

No files matched your search

+3
View File
@@ -40,7 +40,10 @@ export default class CwmpController {
try {
if (isEmpty) {
const rebound = manager.ensureSessionForRemote(remoteKey, sessionId)
// Try exact remoteKey first (same TCP connection), then fall back to IP-only
// (CPE may open a new TCP port for the empty POST)
const hashId = manager.getHashIdForRemote(remoteKey)
?? manager.getHashIdForRemoteIp(request.ip())
if (hashId) ctx.cwmpDeviceId = hashId
logger.debug(