[Asterisk-cvs] asterisk acl.c,1.27.2.1,1.27.2.2

russell at lists.digium.com russell at lists.digium.com
Sun Oct 24 17:20:39 CDT 2004


Update of /usr/cvsroot/asterisk
In directory mongoose.digium.com:/tmp/cvs-serv21629

Modified Files:
      Tag: v1-0
	acl.c 
Log Message:
fix bindaddr for BSD (bug #2668)


Index: acl.c
===================================================================
RCS file: /usr/cvsroot/asterisk/acl.c,v
retrieving revision 1.27.2.1
retrieving revision 1.27.2.2
diff -u -d -r1.27.2.1 -r1.27.2.2
--- acl.c	14 Oct 2004 23:11:16 -0000	1.27.2.1
+++ acl.c	24 Oct 2004 21:24:17 -0000	1.27.2.2
@@ -242,13 +242,12 @@
 
 	memset(&m_rtmsg, 0, sizeof(m_rtmsg));
 	m_rtmsg.m_rtm.rtm_type = RTM_GET;
-	m_rtmsg.m_rtm.rtm_flags = RTF_UP | RTF_HOST;
 	m_rtmsg.m_rtm.rtm_version = RTM_VERSION;
 	ast_mutex_lock(&routeseq_lock);
 	seq = ++routeseq;
 	ast_mutex_unlock(&routeseq_lock);
 	m_rtmsg.m_rtm.rtm_seq = seq;
-	m_rtmsg.m_rtm.rtm_addrs = RTA_DST;
+	m_rtmsg.m_rtm.rtm_addrs = RTA_DST | RTA_IFA;
 	m_rtmsg.m_rtm.rtm_msglen = sizeof(struct rt_msghdr) + sizeof(struct sockaddr_in);
 	sin = (struct sockaddr_in *)m_rtmsg.m_space;
 	sin->sin_family = AF_INET;
@@ -268,7 +267,7 @@
 	}
 	do {
 		l = read(s, (char *)&m_rtmsg, sizeof(m_rtmsg));
-	} while (l > 0 && (m_rtmsg.m_rtm.rtm_seq != 1 || m_rtmsg.m_rtm.rtm_pid != pid));
+	} while (l > 0 && (m_rtmsg.m_rtm.rtm_seq != seq || m_rtmsg.m_rtm.rtm_pid != pid));
 	if (l < 0) {
 		if (errno != EAGAIN)
 			ast_log(LOG_ERROR, "Error reading from routing socket\n");




More information about the svn-commits mailing list