gteissier / srtp-decrypt

Deciphers SRTP packets
53 stars 26 forks source link

rtp header extension len not correct #6

Open fuji246 opened 8 years ago

fuji246 commented 8 years ago

from rfc3550:

The header extension contains a 16-bit length field that counts the number of 32-bit words in the extension, excluding the four-octet extension header (therefore zero is a valid length).

should be offset += htons (extlen)*4; // skips RTP extension header

alexcme commented 8 years ago

Have you tried "-d rtp_byte_offset_in_packet" option?

koundipoluri commented 7 years ago

-d wont help. -d is used to find the rtp offset from the frame start. He is trying to say according to that Rfc the payload starts later than what is calculated by the current implementation.

tchebb commented 5 years ago

ac5069316ac38645d1457969d67d5c30b331d397 didn't fix this properly. The extension length is now calculated correctly, but offset never gets skipped past the length bytes which means the decryption starts two bytes two early. An offset += 2; after reading the extension length fixes it.