[MERGED] osmo-sgsn[master]: gtphub: check for gsn_addr_from_sockaddr() error

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/.

Harald Welte gerrit-no-reply at lists.osmocom.org
Tue Jan 30 21:32:33 UTC 2018


Harald Welte has submitted this change and it was merged.

Change subject: gtphub: check for gsn_addr_from_sockaddr() error
......................................................................


gtphub: check for gsn_addr_from_sockaddr() error

Change-Id: I2d80b5a488e7daa0bc8f57ea304e0e1f10f6c1f5
Fixes: CID182472
---
M src/gprs/gtphub.c
1 file changed, 3 insertions(+), 1 deletion(-)

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



diff --git a/src/gprs/gtphub.c b/src/gprs/gtphub.c
index 2ff1b7c..4ee20cd 100644
--- a/src/gprs/gtphub.c
+++ b/src/gprs/gtphub.c
@@ -2649,7 +2649,9 @@
 {
 	struct gsn_addr gsna;
 	uint16_t port;
-	gsn_addr_from_sockaddr(&gsna, &port, addr);
+	if (gsn_addr_from_sockaddr(&gsna, &port, addr) != 0)
+		return NULL;
+
 	return gtphub_port_find(bind, &gsna, port);
 }
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2d80b5a488e7daa0bc8f57ea304e0e1f10f6c1f5
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