pespin has submitted this change. (
https://gerrit.osmocom.org/c/erlang/osmo-epdg/+/35944?usp=email )
Change subject: Create pdp context in the tundev
......................................................................
Create pdp context in the tundev
Use gtp_u_kmod call to create a pdp context in the gtp interface.
Change-Id: I4e0b3fe0e3e156c9a20df0ab8cdfc447fd9bb1eb
---
M src/epdg_ue_fsm.erl
M src/gtp_u_tun.erl
2 files changed, 15 insertions(+), 5 deletions(-)
Approvals:
pespin: Looks good to me, approved
laforge: Looks good to me, but someone else must approve
Jenkins Builder: Verified
diff --git a/src/epdg_ue_fsm.erl b/src/epdg_ue_fsm.erl
index 7568db0..2553e3f 100644
--- a/src/epdg_ue_fsm.erl
+++ b/src/epdg_ue_fsm.erl
@@ -251,7 +251,8 @@
remote_teid := RemoteTEID,
remote_ipv4 := RemoteIPv4 % TODO: remote_ipv6
} = ResInfo,
- gtp_u_tun:create_pdp_context(RemoteIPv4, EUA, LocalTEID, RemoteTEID);
+ Ret = gtp_u_tun:create_pdp_context(RemoteIPv4, EUA, LocalTEID,
RemoteTEID),
+ lager:debug("gtp_u_tun:create_pdp_context(~p) returned ~p~n",
[ResInfo, Ret]);
_ -> ok
end,
gsup_server:tunnel_response(Data#ue_fsm_data.imsi, Result),
diff --git a/src/gtp_u_tun.erl b/src/gtp_u_tun.erl
index e08b804..626c9a4 100644
--- a/src/gtp_u_tun.erl
+++ b/src/gtp_u_tun.erl
@@ -64,7 +64,5 @@
%RemoteTEID = 56768, % TODO: this should be set to TEID obtained from
CreateSessionResponse
PeerIP = conv:bin_to_ip(PeerAddr), % TODO: IPv6
UEIP = conv:bin_to_ip(EUA#epdg_eua.ipv4), % TODO: IPv6.
- ok.
- % TODO: This will be enabled once we depend on the gtp_u_kmod module:
- %ServRef = get_env_gtp_u_kmod_server_ref(),
- %gen_server:call(ServRef, {PeerIP, UEIP, LocalTEID, RemoteTEID}).
\ No newline at end of file
+ ServRef = get_env_gtp_u_kmod_server_ref(),
+ gen_server:call(ServRef, {PeerIP, UEIP, LocalTEID, RemoteTEID}).
--
To view, visit
https://gerrit.osmocom.org/c/erlang/osmo-epdg/+/35944?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: I4e0b3fe0e3e156c9a20df0ab8cdfc447fd9bb1eb
Gerrit-Change-Number: 35944
Gerrit-PatchSet: 3
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: merged