This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
matt9j gerrit-no-reply at lists.osmocom.orgmatt9j has uploaded this change for review. ( https://gerrit.osmocom.org/c/erlang/osmo_ss7/+/20019 )
Change subject: ipa_proto: Allow configuring ack initiation behavior
......................................................................
ipa_proto: Allow configuring ack initiation behavior
When the osmo-msc version 1.6.1 connects to the osmo-hlr, it sends an
id response and an immediate ack. This does not match the handshake
spec as I understand it or was implemented here. This commit allows
initiating a nonstandard ack if needed to mimic behavior of particular
components.
Change-Id: I6ab3c9efb51e806f582ce8f473a13ee73ca1567e
---
M include/ipa.hrl
M src/ipa_proto.erl
2 files changed, 19 insertions(+), 6 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/erlang/osmo_ss7 refs/changes/19/20019/1
diff --git a/include/ipa.hrl b/include/ipa.hrl
index 352057f..865dcc8 100644
--- a/include/ipa.hrl
+++ b/include/ipa.hrl
@@ -26,7 +26,7 @@
unit_type,
equipment_version,
sw_version,
- unit_name
- }).
+ unit_name,
+ initiate_nonstandard_ack=false}).
-endif.
diff --git a/src/ipa_proto.erl b/src/ipa_proto.erl
index 18b74bd..7189033 100644
--- a/src/ipa_proto.erl
+++ b/src/ipa_proto.erl
@@ -283,10 +283,15 @@
process_ccm_msg(Socket, StreamID, _, ping, _) ->
io:format("Socket ~p Stream ~p: PING -> PONG~n", [Socket, StreamID]),
send(Socket, StreamID, <<?IPAC_MSGT_PONG>>);
-% Simply respond to ID_ACK with ID_ACK
-process_ccm_msg(Socket, StreamID, _, id_ack, _) ->
+% Respond to ID_ACK with ID_ACK if this instance did not initiate
+process_ccm_msg(Socket, StreamID, CcmOptions, id_ack, _) ->
io:format("Socket ~p Stream ~p: ID_ACK -> ID_ACK~n", [Socket, StreamID]),
- send(Socket, StreamID, <<?IPAC_MSGT_ID_ACK>>);
+ if
+ CcmOptions#ipa_ccm_options.initiate_nonstandard_ack /= true ->
+ % Only respond to an ack if this instance did
+ % not initiate to prevent an infinite ack loop.
+ send(Socket, StreamID, <<?IPAC_MSGT_ID_ACK>>)
+ end;
% Simply respond to ID_RESP with ID_ACK
process_ccm_msg(Socket, StreamID, _, id_resp, _) ->
io:format("Socket ~p Stream ~p: ID_RESP -> ID_ACK~n", [Socket, StreamID]),
@@ -305,7 +310,15 @@
{string,sw_version,CcmOptions#ipa_ccm_options.sw_version},
{string,unit_name,CcmOptions#ipa_ccm_options.unit_name}
]}),
- send(Socket, StreamID, CcmBin);
+ send(Socket, StreamID, CcmBin),
+
+ if
+ CcmOptions#ipa_ccm_options.initiate_nonstandard_ack ->
+ % Send the ack from the same entity which
+ % generates the response if configured to
+ % match behavior of other components.
+ send(Socket, StreamID, <<?IPAC_MSGT_ID_ACK>>)
+ end;
% Default message handler for unknown messages
process_ccm_msg(Socket, StreamID, _, MsgType, Opts) ->
--
To view, visit https://gerrit.osmocom.org/c/erlang/osmo_ss7/+/20019
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: erlang/osmo_ss7
Gerrit-Branch: master
Gerrit-Change-Id: I6ab3c9efb51e806f582ce8f473a13ee73ca1567e
Gerrit-Change-Number: 20019
Gerrit-PatchSet: 1
Gerrit-Owner: matt9j <matt9j at cs.washington.edu>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200908/15523c17/attachment.htm>