[MERGED] osmo-sgsn[master]: SGSN: check that GSN is created in proper mode

Harald Welte gerrit-no-reply at lists.osmocom.org
Fri Oct 20 18:19:06 UTC 2017


Harald Welte has submitted this change and it was merged.

Change subject: SGSN: check that GSN is created in proper mode
......................................................................


SGSN: check that GSN is created in proper mode

Change-Id: Ie15364fb3c099806ce8a456ef452200305c836f6
---
M src/gprs/sgsn_libgtp.c
1 file changed, 3 insertions(+), 0 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/src/gprs/sgsn_libgtp.c b/src/gprs/sgsn_libgtp.c
index 9b8fe16..04735e2 100644
--- a/src/gprs/sgsn_libgtp.c
+++ b/src/gprs/sgsn_libgtp.c
@@ -838,6 +838,9 @@
 	}
 	gsn = sgi->gsn;
 
+	if (gsn->mode != GTP_MODE_SGSN)
+		return -EINVAL;
+
 	sgi->gtp_fd0.fd = gsn->fd0;
 	sgi->gtp_fd0.priv_nr = 0;
 	sgi->gtp_fd0.data = sgi;

-- 
To view, visit https://gerrit.osmocom.org/4368
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie15364fb3c099806ce8a456ef452200305c836f6
Gerrit-PatchSet: 1
Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-Owner: Max <msuraev at sysmocom.de>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder


More information about the gerrit-log mailing list