[OpenSIPS-Users] Migrating from 1.11 to 2.1 load balancer Probing problem

Bogdan-Andrei Iancu bogdan at opensips.org
Mon Jul 4 19:08:28 CEST 2016


Hi Alain,

Could you please test the following patch.

Thank and regards,

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com

On 04.07.2016 15:34, Alain Bieuzent wrote:
>
> Hi Bogdan,
>
> Yes i compiled form source.
>
> Regards
>
> *De : *Bogdan-Andrei Iancu <bogdan at opensips.org>
> *Date : *lundi 4 juillet 2016 13:03
> *À : *Alain Bieuzent <alain.bieuzent at free.fr>, 
> "users at lists.opensips.org" <users at lists.opensips.org>
> *Objet : *Re: [OpenSIPS-Users] Migrating from 1.11 to 2.1 load 
> balancer Probing problem
>
> Hi Alain,
>
> Thanks for the trace, I managed to find out the problem. I can provide 
> you a fix to test - do you have OpenSIPS compiled from sources ? or ?
>
> Regards,
>
> Bogdan-Andrei Iancu
> OpenSIPS Founder and Developer
> http://www.opensips-solutions.com
>
> On 01.07.2016 16:56, Alain Bieuzent wrote:
>
>     Hi Bogdan,
>
>     As i see in trace (see pcap attach) the first sip OTIONS is send
>     with the correct source IP (..........) to my 2 gateway (see frame
>     3 and 4) and later there is 2 other sip OPTIONS sent with my
>     private IP (............) (see frame 10 and 11). But all the
>     packet are sending from the same interface (00:50:56:9a:78:93).
>
>     My network configuration :
>
>     [....]
>
>     ######################################################################
>
>     ## Connectivity
>
>     ######################################################################
>
>     [....]
>
>     Thanks.
>
>     *De : *Bogdan-Andrei Iancu <bogdan at opensips.org>
>     <mailto:bogdan at opensips.org>
>     *Date : *vendredi 1 juillet 2016 12:04
>     *À : *OpenSIPS users mailling list <users at lists.opensips.org>
>     <mailto:users at lists.opensips.org>, Alain Bieuzent
>     <alain.bieuzent at free.fr> <mailto:alain.bieuzent at free.fr>
>     *Objet : *Re: [OpenSIPS-Users] Migrating from 1.11 to 2.1 load
>     balancer Probing problem
>
>     Hello Alain,
>
>     You mean when comes to sent to ping a single destination, there
>     are actually 2 OPTIONS sent out (on different interfaces) or it
>     alternates (one ping is sent via eth0, the next one via eth1) ?
>
>     if you have a pcap to show the problem, please send it to me off-list.
>
>     Best regards,
>
>
>     Bogdan-Andrei Iancu
>
>     OpenSIPS Founder and Developer
>
>     http://www.opensips-solutions.com
>
>     On 30.06.2016 12:49, Alain Bieuzent wrote:
>
>         Hi  all,
>
>         I’m currently trying to migrate my opensips V1.11.5 to  V2.1.3.
>
>         My server has 3 interfaces:
>
>         eth0 with public IP
>
>         eth0:0 with public IP provide via a keepalived script
>
>         eth1 with a private IP
>
>         Opensips listen on IP of eth0:0 and on eth1
>
>         Mhomed=no
>
>         Since i migrate to V2.1.3, load balancer probing is UP and
>         down. After checking traffic, i find for each gateway used by
>         load balancer table, there is 2 SIP OPTIONS sent.
>
>         -First is sent with source IP of eth0:0
>
>         -Second is sent with source IP of eth1
>
>         Any idea ?
>
>         Thanls
>
>
>
>
>
>         _______________________________________________
>
>         Users mailing list
>
>         Users at lists.opensips.org <mailto:Users at lists.opensips.org>
>
>         http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20160704/c4fd4234/attachment.htm>
-------------- next part --------------
diff --git a/forward.c b/forward.c
index 16f40ae..d74a521 100644
--- a/forward.c
+++ b/forward.c
@@ -223,12 +223,10 @@ struct socket_info* get_send_socket(struct sip_msg *msg,
 	 * eg: ipv4 -> ipv6 or ipv6 -> ipv4) */
 	switch(proto){
 		case PROTO_UDP:
-			if ((bind_address)&&(to->s.sa_family==bind_address->address.af)&&
-			(bind_address->proto==PROTO_UDP)) {
-				send_sock = (msg &&
-				msg->rcv.bind_address->address.af==bind_address->address.af &&
-				msg->rcv.bind_address->proto==bind_address->proto) ?
-					msg->rcv.bind_address : bind_address;
+			if (msg &&
+			msg->rcv.bind_address->address.af==bind_address->address.af &&
+			msg->rcv.bind_address->proto==bind_address->proto) {
+				send_sock = msg->rcv.bind_address;
 				break;
 			}
 			/* default logic for all protos */


More information about the Users mailing list