[asterisk-bugs] [JIRA] (ASTERISK-24871) [patch] build_peer peer mailbox management bug

Corey Farrell (JIRA) noreply at issues.asterisk.org
Fri Mar 13 00:34:34 CDT 2015


    [ https://issues.asterisk.org/jira/browse/ASTERISK-24871?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=225380#comment-225380 ] 

Corey Farrell commented on ASTERISK-24871:
------------------------------------------

One potential issue, lets say build_peer is called with devstate_only==1.  An existing peer is found that was originally build with devstate_only==0 (and it has mailboxes), peer->the_mark==1.  Existing code would clear all mailboxes during the call to set_peer_defaults, but build_peer would not repopulate them.  The new code would leave the existing mailboxes untouched.

> [patch] build_peer peer mailbox management bug
> ----------------------------------------------
>
>                 Key: ASTERISK-24871
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-24871
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Channels/chan_sip/General
>    Affects Versions: SVN, 11.16.0
>            Reporter: Gareth Palmer
>            Severity: Trivial
>         Attachments: chan_sip.c.patch
>
>
> During a reload, {{build_peer}} iterates over the peer's mailboxes and tags them for removal via the {{delme}} variable. It adds any new, unique mailboxes to the peer via {{add_peer_mailboxes}} and then removes any mailboxes with {{delme}} still set.
> However, there isn't any code to unset {{delme}}, so this would remove any previously configured mailboxes.
> That is not what happens though because {{build_peer}} also calls {{set_peer_defaults}} which clears out all of the configured mailboxes using {{clear_peer_mailboxes}} making the setting of {{delme}} redundant.
> So in the end there is no impact to the user because all the configured mailboxes get added regardless.
> Patch unsets {{delme}} for existing, still-configured mailboxes in {{add_peer_mailboxes}} and removes call to {{clear_peer_mailboxes}}.



--
This message was sent by Atlassian JIRA
(v6.2#6252)



More information about the asterisk-bugs mailing list