From b35882c9c8fec960c6fea5cdd7cb6885ef3bdbef Mon Sep 17 00:00:00 2001 From: Galen Charlton Date: Thu, 6 May 2021 16:00:33 -0400 Subject: [PATCH] LP#1927542: fix incorrect ACS Status response in Multiplex mode This patch fixes an issue where the serialization and deserialization of the SIP server object when handling a pending ILS login connection can cause the ACS Status message handler to not have access to the institution configuration settings for the timeout and retry policy, causing it to return 000 for both values. This can lead to some SIP2 clients believing that the ACS is either offline or impossibly fast. To test ------- [1] Set up SIPServer to use the Multiplex personality. [2] With an appropriate ILS connect set up, send the following messages 9900402.00 => response should show default timeout of 600 and retry limit of 003 9300CN_user_|CO_password_|CP_institution_ => should get 941 response 9900402.00 => response shows a timeout of 000 and retry limit of 000 [3] Apply the patch and repeat step 2. This time, both message 98 responses should show a timeout of 600 and retry limit of 003. Signed-off-by: Galen Charlton --- SIPServer.pm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/SIPServer.pm b/SIPServer.pm index 0e36676..f1a9664 100755 --- a/SIPServer.pm +++ b/SIPServer.pm @@ -409,7 +409,7 @@ sub mux_input { $cache_data->{success} = 1; $cache_data->{net_server_parts} = { - map { ($_ => $$self{$_}) } qw/state institution account/ + map { ($_ => $$self{$_}) } qw/state institution account policy/ }; # Stash the ILS module somewhere handy for later @@ -419,6 +419,10 @@ sub mux_input { $cache_data->{success} = 0; } + # guarantee that the nested structure we're passing wil + # be reconstructed correctly even in the face of hash + # randomization + local $Data::Dumper::Purity = 1; init_cache()->set( "sip_pending_auth_$conn_id", Data::Dumper->Dump([$cache_data]), -- 2.11.0