[S] Change in ...osmo-epdg[master]: gsup_server: call the server_assignment_request() on location update ...
pespin has submitted this change. ( https://gerrit.osmocom.org/c/erlang/osmo-epdg/+/34731?usp=email ) Change subject: gsup_server: call the server_assignment_request() on location update request ...................................................................... gsup_server: call the server_assignment_request() on location update request Change-Id: I3aa506a9860e503ae3e1b0542cc3a2e9cd150c6e --- M src/gsup_server.erl 1 file changed, 23 insertions(+), 4 deletions(-) Approvals: pespin: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/gsup_server.erl b/src/gsup_server.erl index 26af3b4..923d020 100644 --- a/src/gsup_server.erl +++ b/src/gsup_server.erl @@ -156,11 +156,21 @@ {noreply, S}; % location update request / when a UE wants to connect to a specific APN. This will trigger a AAA->HLR Request Server Assignment Request +% FIXME: add APN instead of hardcoded internet handle_info({ipa, Socket, ?IPAC_PROTO_EXT_GSUP, GsupMsgRx = #{message_type := location_upd_req, imsi := Imsi}}, S) -> - Resp = #{message_type => location_upd_res, - imsi => Imsi, - message_class => 5 - }, + % FIXME: use enum for Server-Assignment-Type => REGISTERING + Result = epdg_diameter_swx:server_assignment_request(Imsi, 1, "internet"), + case Result of + {ok, Sar} -> Resp = #{message_type => location_upd_res, + imsi => Imsi, + message_class => 5 + }; + {error, _} -> Resp = #{message_type => location_upd_err, + imsi => Imsi, + message_class => 5, + cause => 16#11 % FIXME: Use proper defines as cause code and use Network failure + } + end, ipa_proto:send(Socket, ?IPAC_PROTO_EXT_GSUP, Resp), {noreply, S}; -- To view, visit https://gerrit.osmocom.org/c/erlang/osmo-epdg/+/34731?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: erlang/osmo-epdg Gerrit-Branch: master Gerrit-Change-Id: I3aa506a9860e503ae3e1b0542cc3a2e9cd150c6e Gerrit-Change-Number: 34731 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin@sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin <pespin@sysmocom.de> Gerrit-MessageType: merged
participants (1)
-
pespin