[OpenSIPS-Devel] [OpenSIPS/opensips] dfdb07: Script: Fix binary string comparisons
Liviu Chircu
noreply at github.com
Fri Jun 21 11:38:01 EDT 2019
Branch: refs/heads/3.0
Home: https://github.com/OpenSIPS/opensips
Commit: dfdb07bed3e171d4cad21b21996c13a897d67844
https://github.com/OpenSIPS/opensips/commit/dfdb07bed3e171d4cad21b21996c13a897d67844
Author: Liviu Chircu <liviu at opensips.org>
Date: 2019-06-21 (Fri, 21 Jun 2019)
Changed paths:
M route.c
M ut.h
Log Message:
-----------
Script: Fix binary string comparisons
Addresses the following:
$var(ip_1_s) = "[2001:6c8:5e00:1::249]";
$var(ip_1_b) = $(var(ip_1_s){ip.pton}); # Save binary IP to variable
$var(ip_2_s) = "[2001:6c8:5e00:1::24a]";
$var(ip_2_b) = $(var(ip_2_s){ip.pton}); # Save binary IP to variable
if ($var(ip_1_b) == $var(ip_2_b)) {
xlog("Variable saved Binary addresses are EQUAL");
} else {
xlog("Variable saved Binary addresses are DIFFERENT");
}
Correct result: DIFFERENT. Maybe this should be a unit test somehow.
Reported by @vasilevalex
Related to #1568
(cherry picked from commit dee8a6a37577a5aa1c1621ba66acebfe7f47e3f4)
Commit: 7e6101e3a22118be02d60d9dcd6dbb6c9b72389b
https://github.com/OpenSIPS/opensips/commit/7e6101e3a22118be02d60d9dcd6dbb6c9b72389b
Author: Liviu Chircu <liviu at opensips.org>
Date: 2019-06-21 (Fri, 21 Jun 2019)
Changed paths:
M cfg.y
Log Message:
-----------
Script: Allow signed integers as module func params
This fixes a regression where the behavior of some OpenSIPS 2.4 module
functions was restricted in 3.0, e.g. is_from_gw():
In 2.4:
is_from_gw("-1", "n", "$var(gw_attr)") # starts OK
In 3.0 (without this patch):
is_from_gw(-1, "n", $var(gw_attr)) # would fail to start
(cherry picked from commit 0a8cf7402a559619203d981de41d91b24e2b06ee)
Commit: 65b1dcff1d046c93ca6022182dc7b3e4a0d92288
https://github.com/OpenSIPS/opensips/commit/65b1dcff1d046c93ca6022182dc7b3e4a0d92288
Author: Liviu Chircu <liviu at opensips.org>
Date: 2019-06-21 (Fri, 21 Jun 2019)
Changed paths:
M db/db_id.c
Log Message:
-----------
DB URL parser: Avoid double free on missing URL DB
On URLs such as:
mysql://opensips:opensipsrw@master.naudb.service.consul
... the DB URL parser would perform a double free within the error
handling code.
Reported by Kirill Galinurov
(cherry picked from commit cba99632f18259f8e194246678793fa6e1723c3f)
Compare: https://github.com/OpenSIPS/opensips/compare/f4a7a8e36d69...65b1dcff1d04
More information about the Devel
mailing list