[asterisk-dev] [Code Review] 4139: stun: fix size of attribute string to match rfc
Scott Griepentrog
reviewboard at asterisk.org
Fri Nov 14 09:48:29 CST 2014
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/4139/
-----------------------------------------------------------
(Updated Nov. 14, 2014, 9:48 a.m.)
Status
------
This change has been marked as submitted.
Review request for Asterisk Developers.
Changes
-------
Committed in revision 427874
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/20141114/a55639d5/attachment.html>
More information about the asterisk-dev
mailing list