mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-06 01:45:11 +00:00
Fix calls to ast_get_ip() not initializing the address family.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@346239 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -12258,7 +12258,8 @@ static int peer_set_srcaddr(struct iax2_peer *peer, const char *srcaddr)
|
||||
if (port < 1)
|
||||
port = IAX_DEFAULT_PORTNO;
|
||||
}
|
||||
|
||||
|
||||
sin_tmp.ss.ss_family = AF_INET;
|
||||
if (!ast_get_ip(&sin_tmp, addr)) {
|
||||
struct ast_netsock *sock;
|
||||
int res;
|
||||
@@ -12475,6 +12476,7 @@ static struct iax2_peer *build_peer(const char *name, struct ast_variable *v, st
|
||||
} else if (!strcasecmp(v->name, "defaultip")) {
|
||||
struct ast_sockaddr peer_defaddr_tmp;
|
||||
|
||||
peer_defaddr_tmp.ss.ss_family = AF_INET;
|
||||
if (ast_get_ip(&peer_defaddr_tmp, v->value)) {
|
||||
return peer_unref(peer);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user