From 0e94431d7f606acf6fe1fcc13baed0a88d9e7e9c Mon Sep 17 00:00:00 2001 From: Martin Wilke Date: Thu, 1 Feb 2007 22:29:03 +0000 Subject: sipXcommserverlib is a library that handles communication between various sipX components. It is a necessary dependancy of the sipX project. WWW: http://sipx-wiki.calivia.com/index.php/Main_Page PR: ports/107931 Submitted by: Michael Durian --- .../files/patch-src_sipx-utils.sh | 73 ++++++++++++++++++++++ 1 file changed, 73 insertions(+) create mode 100644 net/sipxcommserverlib/files/patch-src_sipx-utils.sh (limited to 'net/sipxcommserverlib/files/patch-src_sipx-utils.sh') diff --git a/net/sipxcommserverlib/files/patch-src_sipx-utils.sh b/net/sipxcommserverlib/files/patch-src_sipx-utils.sh new file mode 100644 index 000000000000..eafad1f1a51d --- /dev/null +++ b/net/sipxcommserverlib/files/patch-src_sipx-utils.sh @@ -0,0 +1,73 @@ +--- ./src/sipx-utils.sh.orig Mon Jan 1 19:30:33 2007 ++++ ./src/sipx-utils.sh Mon Jan 1 19:37:57 2007 +@@ -41,16 +41,24 @@ + } + + ++# ++# Let's modify this slightly to allow a hostname as the second arg and ++# not just an IP address. ++# + sip_resolves_to () { # ( unresolved, targetIp ) + # returns true (0) if the unresolved name resolves to the targetIp address by sip rules + unresolvedName=$1 + targetAddr=$2 ++ targetAddr2=`dns_a $2` + + for ip in `dns_a ${unresolvedName}` + do + if [ "${ip}" = "${targetAddr}" ] + then + return 0 ++ elif [ "${ip}" = "${targetAddr2}" ] ++ then ++ return 0 + fi + done + +@@ -61,6 +69,9 @@ + if [ "${ip}" = "${targetAddr}" ] + then + return 0 ++ elif [ "${ip}" = "${targetAddr2}" ] ++ then ++ return 0 + fi + done + done +@@ -70,12 +81,18 @@ + if [ "${tcpSrv}" = "${targetAddr}" ] + then + return 0 ++ elif [ "${tcpSrv}" = "${targetAddr2}" ] ++ then ++ return 0 + else + for ip in `dns_a ${tcpSrv}` + do + if [ "${ip}" = "${targetAddr}" ] + then + return 0 ++ elif [ "${ip}" = "${targetAddr2}" ] ++ then ++ return 0 + fi + done + fi +@@ -86,10 +103,16 @@ + if [ "${udpSrv}" = "${targetAddr}" ] + then + return 0 ++ elif [ "${udpSrv}" = "${targetAddr2}" ] ++ then ++ return 0 + else + for ip in `dns_a ${udpSrv}` + do + if [ "${ip}" = "${targetAddr}" ] ++ then ++ return 0 ++ elif [ "${ip}" = "${targetAddr2}" ] + then + return 0 + fi -- cgit v1.2.3