[SR-Users] INFO: stun_parse_header: incomplete header of STUN message

Pan Christensen pan.christensen at phonect.no
Tue May 29 11:31:58 CEST 2018


Hello!


After proxying a REGISTER from a WebRTC client to our SIP backend, the backend starts sending keepalives. Every 30 seconds I get a log entry in Kamailio saying: "INFO: stun [kam_stun.c:169]: stun_parse_header(): INFO: stun_parse_header: incomplete header of STUN message".

Here's one such packet:

No.     Time           Source                Destination           Protocol Length Info
      1 0.000000       xxx.xxx.xxx.xxx       yyy.yyy.yyy.yyy        UDP      60     5060 ? 15060 Len=4

Frame 1: 60 bytes on wire (480 bits), 60 bytes captured (480 bits)
Ethernet II, Src: JuniperN_4f:3f:f0 (40:a6:77:4f:3f:f0), Dst: 02:81:64:58:cf:d1 (02:81:64:58:cf:d1)
Internet Protocol Version 4, Src: xxx.xxx.xxx.xxx, Dst: yyy.yyy.yyy.yyy
    0100 .... = Version: 4
    .... 0101 = Header Length: 20 bytes (5)
    Differentiated Services Field: 0x00 (DSCP: CS0, ECN: Not-ECT)
    Total Length: 32
    Identification: 0x5bf5 (23541)
    Flags: 0x4000, Don't fragment
    Time to live: 56
    Protocol: UDP (17)
    Header checksum: 0x2fc3 [validation disabled]
    [Header checksum status: Unverified]
    Source: xxx.xxx.xxx.xxx
    Destination: yyy.yyy.yyy.yyy
User Datagram Protocol, Src Port: 5060, Dst Port: 15060
    Source Port: 5060
    Destination Port: 15060
    Length: 12
    Checksum: 0xfa28 [unverified]
    [Checksum Status: Unverified]
    [Stream index: 0]
Data (4 bytes)

0000  00 00 00 00                                       ....
    Data: 00000000
    [Length: 4]


I found this in kam_stun.c:

static int stun_parse_header(struct stun_msg* req, USHORT_T* error_code)
{

                if (sizeof(req->hdr) > req->msg.buf.len) {
                                /* the received message does not contain whole header */
                                LOG(L_INFO, "INFO: stun_parse_header: incomplete header of STUN message\n");
                                /* Any better solution? IMHO it's not possible to send error response
                                * because the transaction ID is not available.
                                */
                                return FATAL_ERROR;
                }
...

Could someone please explain what's wrong?


Med vennlig hilsen
Pan B. Christensen
Utvikler

Phonect AS
Brugata 19, PB 9156 Grønland, N-0133 Oslo, Norway
E-post: pan.christensen at phonect.no<mailto:pan.christensen at phonect.no>
Mobil: 41 88 88 00


 [cid:image007.png at 01D3A0E8.376921D0] <http://www.phonect.no/>
[facebook_2]<https://www.facebook.com/phonectno> [LinkedIn_logo_initials (1)] <https://www.linkedin.com/company/44983?trk=tyah&trkInfo=clickedVertical%3Acompany%2CentityType%3AentityHistoryName%2CclickedEntityId%3Acompany_company_44983%2Cidx%3A0>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20180529/89ceeac9/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image003.png
Type: image/png
Size: 1003 bytes
Desc: image003.png
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20180529/89ceeac9/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image004.png
Type: image/png
Size: 826 bytes
Desc: image004.png
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20180529/89ceeac9/attachment-0001.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image002.png
Type: image/png
Size: 6934 bytes
Desc: image002.png
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20180529/89ceeac9/attachment-0002.png>


More information about the sr-users mailing list