[asterisk-dev] [Code Review] 4139: stun: fix size of attribute string to match rfc

Joshua Colp reviewboard at asterisk.org
Wed Nov 5 13:01:00 CST 2014


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/4139/#review13696
-----------------------------------------------------------

Ship it!


Ship It!

- Joshua Colp


On Oct. 31, 2014, 8:29 p.m., Scott Griepentrog wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/4139/
> -----------------------------------------------------------
> 
> (Updated Oct. 31, 2014, 8:29 p.m.)
> 
> 
> 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/20141105/a4ef6ec7/attachment.html>


More information about the asterisk-dev mailing list