From: Matthew Jordan Date: Sun, 24 Feb 2013 23:00:05 +0000 (+0000) Subject: Set the sin_family on the bind address socket during initialization X-Git-Tag: 11.4.0-rc1~52 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fec0881135c1b89f8e1863ec58da740a721bf04d;p=thirdparty%2Fasterisk.git Set the sin_family on the bind address socket during initialization Somehow, chan_jingle has managed to operate for years without setting the sin_family on its bindaddr socket. This patch properly sets the field during initial module load to AF_INET. Note that the patch on the issue was modified slightly to change the initialization of the socket from allocation of a chan_jingle private to the module initialization, as the bindaddr object (which is static) only needs to have the address set once. (closes issue ASTERISK-19341) Reported by: andre valentin patches: 0105-chan_jingle.patch uploaded by avalentin (License 6064) ........ Merged revisions 381975 from http://svn.asterisk.org/svn/asterisk/branches/1.8 git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@381976 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/channels/chan_jingle.c b/channels/chan_jingle.c index 29329c6c61..661477ec7e 100644 --- a/channels/chan_jingle.c +++ b/channels/chan_jingle.c @@ -1985,6 +1985,7 @@ static int load_module(void) ast_log(LOG_WARNING, "Unable to create I/O context\n"); } + bindaddr.sin_family = AF_INET; ast_sockaddr_from_sin(&bindaddr_tmp, &bindaddr); if (ast_find_ourip(&ourip_tmp, &bindaddr_tmp, AF_INET)) { ast_log(LOG_WARNING, "Unable to get own IP address, Jingle disabled\n");