During several tests wireshark always reports a malformed RTCP BYE packet. Looking at the problem shows that the BYE packet has the padding bit set but the padding length is zero. According to the specification the padding length should be the number of padding bytes including the length byte itself.
While the method that constructs the BYE packet correctly detects and computes the padding length it does not set the padding length itself in the buffer. The offending code is in control.cpp, dispatchBYE(...), near the end: ... if ( reason.c_str() != NULL ){ pkt->info.BYE.length = (uint8)strlen(reason.c_str()); memcpy(buffer + len,reason.c_str(),pkt->info.BYE.length); len += pkt->info.BYE.length; padlen = 4 - ((len - len1) & 0x03); if ( padlen ) { memset(buffer + len,0,padlen); len += padlen; } } pkt->fh.length = htons(((len - len1) >> 2) - 1); pkt->fh.padding = (padlen > 0); ... In this case the padding length is 1 (depends on the reason string). As seen in the code snippet the padding bit is set (fh.padding) but the padding length itself is not. This should be the last byte in the buffer: ... if ( padlen ) { memset(buffer + len,0,padlen); len += padlen; *(buffer+len-1) = padlen } ... Regards, Werner _______________________________________________ Ccrtp-devel mailing list Ccrtp-devel@gnu.org http://lists.gnu.org/mailman/listinfo/ccrtp-devel