CWMP Cookie problem

Hello,

It seems that after InformResponse CWMP doesn’t send cookie anymore in the TCP session. Below is the detailed description. It can than result in 400 invalid session. This doesn’t seem as a CPE issue as CPE sends the Cookie in order of Session.

  1. CPE sends inform
  2. ACS replys with infrom response with cookie
  3. CPE reply with with cookie and content length 0
  4. ACS replys with GPV and no cookie
  5. CPE replys with result and cookie
  6. ACS replys with GPV and no cookie
  7. CPE replys with result and cookie
  8. ACS replys with no content and no cookie

This kind of behaviour will/might/should always result in invalid session. It is not vendor related. I also have a .pcap trace file recorded directly on the ACS server which I can share.

// CPE REQUEST
POST / HTTP/1.1
Host: 1.1.1.1:7547
User-Agent: BCM3383wvg–0813.1
Connection: keep-alive
SOAPAction:
Content-Type: text/xml
Content-Length: 2372

<SOAP-ENV:Envelope
xmlns:SOAP-ENV=“http://schemas.xmlsoap.org/soap/envelope/”
xmlns:SOAP-ENC=“http://schemas.xmlsoap.org/soap/encoding/”
xmlns:xsd=“http://www.w3.org/2001/XMLSchema”
xmlns:xsi=“http://www.w3.org/2001/XMLSchema-instance”
xmlns:cwmp=“urn:dslforum-org:cwmp-1-3”>
SOAP-ENV:Header
<cwmp:ID SOAP-ENV:mustUnderstand=“1”>300933305</cwmp:ID>
</SOAP-ENV:Header>
SOAP-ENV:Body
cwmp:Inform

Technicolor
28BE9B
CGA2121
383FB36280B6

6 CONNECTION REQUEST

1
2020-10-08T12:48:45
0

Device.DeviceInfo.HardwareVersion
1.0

Device.DeviceInfo.SoftwareVersion
CGA2121E-ES-13-E113C5-c7410r5714-190513

Device.DeviceInfo.ProvisioningCode

Device.ManagementServer.ConnectionRequestURL
http://1.1.1.1:7547/

Device.ManagementServer.ParameterKey

Device.ManagementServer.AliasBasedAddressing
false

</cwmp:Inform>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

// GENIEACS REPLY WITH COOKIE

HTTP/1.1 200 OK
Content-Length: 529
Server: GenieACS/1.2.2+20201008104452
SOAPServer: GenieACS/1.2.2+20201008104452
Content-Type: text/xml; charset=“utf-8”
Set-Cookie: session=6cc1828b629278c8
Date: Thu, 08 Oct 2020 10:48:55 GMT
Connection: keep-alive

<?xml version="1.0" encoding="UTF-8"?>

<soap-env:Envelope xmlns:soap-enc=“http://schemas.xmlsoap.org/soap/encoding/” xmlns:soap-env=“http://schemas.xmlsoap.org/soap/envelope/” xmlns:xsd=“http://www.w3.org/2001/XMLSchema” xmlns:xsi=“http://www.w3.org/2001/XMLSchema-instance” xmlns:cwmp=“urn:dslforum-org:cwmp-1-3”>soap-env:Header<cwmp:ID soap-env:mustUnderstand=“1”>300933305</cwmp:ID></soap-env:Header>soap-env:Bodycwmp:InformResponse1</cwmp:InformResponse></soap-env:Body></soap-env:Envelope>

// CPE REPLY WITH COOKIE

POST / HTTP/1.1
Host: 1.1.1.1:7547
User-Agent: BCM3383wvg–0813.1
Connection: keep-alive
Cookie: session=6cc1828b629278c8
Content-Length: 0

// GENIEACS REPLY WITH NO COOKIE

HTTP/1.1 200 OK
Content-Length: 643
Server: GenieACS/1.2.2+20201008104452
SOAPServer: GenieACS/1.2.2+20201008104452
Content-Type: text/xml; charset=“utf-8”
Date: Thu, 08 Oct 2020 10:48:55 GMT
Connection: keep-alive

<?xml version="1.0" encoding="UTF-8"?>

<soap-env:Envelope xmlns:soap-enc=“http://schemas.xmlsoap.org/soap/encoding/” xmlns:soap-env=“http://schemas.xmlsoap.org/soap/envelope/” xmlns:xsd=“http://www.w3.org/2001/XMLSchema” xmlns:xsi=“http://www.w3.org/2001/XMLSchema-instance” xmlns:cwmp=“urn:dslforum-org:cwmp-1-3”>soap-env:Header<cwmp:ID soap-env:mustUnderstand=“1”>17507d3ff8b0000</cwmp:ID></soap-env:Header>soap-env:Bodycwmp:GetParameterValuesDevice.IP.Interface.1.IPv4Address.1.IPAddress</cwmp:GetParameterValues></soap-env:Body></soap-env:Envelope>

// CPE REPLY WITH COOKIE

POST / HTTP/1.1
Host: 1.1.1.1:7547
User-Agent: BCM3383wvg–0813.1
Connection: keep-alive
SOAPAction:
Cookie: session=6cc1828b629278c8
Content-Type: text/xml
Content-Length: 758

<SOAP-ENV:Envelope
xmlns:SOAP-ENV=“http://schemas.xmlsoap.org/soap/envelope/”
xmlns:SOAP-ENC=“http://schemas.xmlsoap.org/soap/encoding/”
xmlns:xsd=“http://www.w3.org/2001/XMLSchema”
xmlns:xsi=“http://www.w3.org/2001/XMLSchema-instance”
xmlns:cwmp=“urn:dslforum-org:cwmp-1-3”>
SOAP-ENV:Header
<cwmp:ID SOAP-ENV:mustUnderstand=“1”>17507d3ff8b0000</cwmp:ID>
</SOAP-ENV:Header>
SOAP-ENV:Body
cwmp:GetParameterValuesResponse

Device.IP.Interface.1.IPv4Address.1.IPAddress
1.1.1.1

</cwmp:GetParameterValuesResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

// GENIEACS REPLY WITH NO COOKIE

HTTP/1.1 200 OK
Content-Length: 801
Server: GenieACS/1.2.2+20201008104452
SOAPServer: GenieACS/1.2.2+20201008104452
Content-Type: text/xml; charset=“utf-8”
Date: Thu, 08 Oct 2020 10:48:55 GMT
Connection: keep-alive

<?xml version="1.0" encoding="UTF-8"?>

<soap-env:Envelope xmlns:soap-enc=“http://schemas.xmlsoap.org/soap/encoding/” xmlns:soap-env=“http://schemas.xmlsoap.org/soap/envelope/” xmlns:xsd=“http://www.w3.org/2001/XMLSchema” xmlns:xsi=“http://www.w3.org/2001/XMLSchema-instance” xmlns:cwmp=“urn:dslforum-org:cwmp-1-3”>soap-env:Header<cwmp:ID soap-env:mustUnderstand=“1”>17507d3ff8b0100</cwmp:ID></soap-env:Header>soap-env:Bodycwmp:GetParameterValuesDevice.NAT.PortMapping.11.ExternalPortDevice.NAT.PortMapping.12.ExternalPortDevice.NAT.PortMapping.13.ExternalPortDevice.NAT.PortMapping.14.ExternalPort</cwmp:GetParameterValues></soap-env:Body></soap-env:Envelope>

// CPE REPLY WITH COOKIE

POST / HTTP/1.1
Host: 1.1.1.1:7547
User-Agent: BCM3383wvg–0813.1
Connection: keep-alive
SOAPAction:
Cookie: session=6cc1828b629278c8
Content-Type: text/xml
Content-Length: 1185

<SOAP-ENV:Envelope
xmlns:SOAP-ENV=“http://schemas.xmlsoap.org/soap/envelope/”
xmlns:SOAP-ENC=“http://schemas.xmlsoap.org/soap/encoding/”
xmlns:xsd=“http://www.w3.org/2001/XMLSchema”
xmlns:xsi=“http://www.w3.org/2001/XMLSchema-instance”
xmlns:cwmp=“urn:dslforum-org:cwmp-1-3”>
SOAP-ENV:Header
<cwmp:ID SOAP-ENV:mustUnderstand=“1”>17507d3ff8b0100</cwmp:ID>
</SOAP-ENV:Header>
SOAP-ENV:Body
cwmp:GetParameterValuesResponse

Device.NAT.PortMapping.14.ExternalPort
8080

Device.NAT.PortMapping.13.ExternalPort
7547

Device.NAT.PortMapping.12.ExternalPort
7547

Device.NAT.PortMapping.11.ExternalPort
161

</cwmp:GetParameterValuesResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

// GENIEACS REPLY WITH NO COOKIE

HTTP/1.1 204 No Content
Content-Length: 0
Server: GenieACS/1.2.2+20201008104452
SOAPServer: GenieACS/1.2.2+20201008104452
Connection: close
Date: Thu, 08 Oct 2020 10:48:55 GMT

do you know how to solve this problem

sticky table was used with loadbalancer.

The session flow you shared looks correct so I don’t see what the issue is.