Change in osmo-gbproxy[master]: gbproxy: Also try to route STATUS messages with truncated PDU in 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/.

daniel gerrit-no-reply at lists.osmocom.org
Thu Nov 18 14:35:06 UTC 2021


daniel has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-gbproxy/+/26319 )


Change subject: gbproxy: Also try to route STATUS messages with truncated PDU in error
......................................................................

gbproxy: Also try to route STATUS messages with truncated PDU in error

Related: OS#4892
Change-Id: I173eb8ef6257248e3c893c31486575019a3ef873
---
M src/gb_proxy.c
1 file changed, 4 insertions(+), 4 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-gbproxy refs/changes/19/26319/1

diff --git a/src/gb_proxy.c b/src/gb_proxy.c
index 6fd6f77..73db215 100644
--- a/src/gb_proxy.c
+++ b/src/gb_proxy.c
@@ -982,9 +982,9 @@
 	struct bssgp_normal_hdr *bgph = (struct bssgp_normal_hdr *)pdu_data;
 	struct tlv_parsed tp_inner;
 
-	/* TODO: Parse partial messages as well */
 	rc = gbproxy_decode_bssgp(bgph, pdu_len, &tp_inner, log_pfx);
-	if (rc < 0)
+	/* Ignore decode failure, due to trucated message */
+	if (rc < 0 && rc != OSMO_TLVP_ERR_OFS_BEYOND_BUFFER)
 		return rc;
 
 	if (TLVP_PRESENT(&tp_inner, BSSGP_IE_TLLI)) {
@@ -1010,9 +1010,9 @@
 	struct bssgp_normal_hdr *bgph = (struct bssgp_normal_hdr *)pdu_data;
 	struct tlv_parsed tp_inner;
 
-	/* TODO: Parse partial messages as well */
 	rc = gbproxy_decode_bssgp(bgph, pdu_len, &tp_inner, log_pfx);
-	if (rc < 0)
+	/* Ignore decode failure, due to trucated message */
+	if (rc < 0 && rc != OSMO_TLVP_ERR_OFS_BEYOND_BUFFER)
 		return rc;
 
 	if (TLVP_PRESENT(&tp_inner, BSSGP_IE_BVCI))

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-gbproxy/+/26319
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-gbproxy
Gerrit-Branch: master
Gerrit-Change-Id: I173eb8ef6257248e3c893c31486575019a3ef873
Gerrit-Change-Number: 26319
Gerrit-PatchSet: 1
Gerrit-Owner: daniel <dwillmann at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20211118/c833ccb5/attachment.htm>


More information about the gerrit-log mailing list