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

Max gerrit-no-reply at lists.osmocom.org
Fri Oct 20 12:29:27 UTC 2017


Review at  https://gerrit.osmocom.org/4368

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(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-sgsn refs/changes/68/4368/1

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: newchange
Gerrit-Change-Id: Ie15364fb3c099806ce8a456ef452200305c836f6
Gerrit-PatchSet: 1
Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-Owner: Max <msuraev at sysmocom.de>


More information about the gerrit-log mailing list