[asterisk-dev] [Code Review] 4139: stun: fix size of attribute string to match rfc
Scott Griepentrog
reviewboard at asterisk.org
Fri Oct 31 15:29:57 CDT 2014
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/4139/
-----------------------------------------------------------
Review request for Asterisk Developers.
Repository: Asterisk
Description
-------
When sending a USERNAME attribute in an RTP STUN response, the implementation in append_attr_string() passes the actual length of the string instead of padding it up to a multiple of 4 bytes size as required by the RFC 3489.
This patch adds separate variables for calculating the string and padded attribute lengths, and handles the proper padding.
Diffs
-----
/branches/1.8/main/stun.c 426921
Diff: https://reviewboard.asterisk.org/r/4139/diff/
Testing
-------
Since I don't have an easy way to generate RTP STUN messages, I've tested the change on a separate test bed, and submitted the patch to the reporter for confirmation.
Thanks,
Scott Griepentrog
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20141031/94e39eb5/attachment.html>
More information about the asterisk-dev
mailing list