[asterisk-dev] [Code Review] 3867: [chan_sip] Default DTLS settings to use if peer misses own settings

Mark Michelson reviewboard at asterisk.org
Wed Jul 30 10:34:01 CDT 2014


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



trunk/channels/chan_sip.c
<https://reviewboard.asterisk.org/r/3867/#comment23310>

    Use ast_rtp_dtls_cfg_copy() here. The current change has two problems:
    
    1) Many of the default DTLS settings are never copied onto the peer, so setting them doesn't do anything.
    
    2) Since you are doing a shallow copy of the default strings, there is potential to end up freeing the default values when you don't mean to.



trunk/channels/chan_sip.c
<https://reviewboard.asterisk.org/r/3867/#comment23311>

    If you use ast_rtp_dtls_cfg_copy() above as I recommend, then this entire block can be removed.
    
    All default values will already be copied onto the peer. Any peer-specific value encountered in the configuration will be copied onto the peer by ast_rtp_dtls_cfg_parse().


- Mark Michelson


On July 30, 2014, 9:15 a.m., Michael K. wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/3867/
> -----------------------------------------------------------
> 
> (Updated July 30, 2014, 9:15 a.m.)
> 
> 
> Review request for Asterisk Developers.
> 
> 
> Bugs: ASTERISK-24128
>     https://issues.asterisk.org/jira/browse/ASTERISK-24128
> 
> 
> Repository: Asterisk
> 
> 
> Description
> -------
> 
> Load default dtls settings from [general settings]
> If peer has dtls enabled but misses some of the settings and they are set in default settings it would load them from there.
> It would be logical as most of sip settings work like that and as well as there is no way to use template in realtime and it would lead to copy paste same settings for every peer.
> 
> 
> Diffs
> -----
> 
>   trunk/channels/chan_sip.c 419804 
> 
> Diff: https://reviewboard.asterisk.org/r/3867/diff/
> 
> 
> Testing
> -------
> 
> Test on development server (ast 11.11.0)
> 
> 
> Thanks,
> 
> Michael K.
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20140730/dd723df5/attachment.html>


More information about the asterisk-dev mailing list