[MERGED] libosmo-sccp[master]: osmo_ss7: Fix SCTP PPID byte width

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
Wed Apr 12 10:20:42 UTC 2017


Harald Welte has submitted this change and it was merged.

Change subject: osmo_ss7: Fix SCTP PPID byte width
......................................................................


osmo_ss7: Fix SCTP PPID byte width

In 17df5953ff477e89f1618f5a726df39197e1b826 we fixed endianness issues
with the Stream ID field, but at the same time mistook the PPID field
for 16bits.  In reality it is 32bits, and hence our 'htons' is rendering
wrong PPID values.

Change-Id: Ief04486e752e6b7e0a853b1fa9ca525ad47800f6
---
M src/osmo_ss7.c
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/src/osmo_ss7.c b/src/osmo_ss7.c
index 4f12152..bb13b43 100644
--- a/src/osmo_ss7.c
+++ b/src/osmo_ss7.c
@@ -1261,7 +1261,7 @@
 		goto out;
 	}
 
-	ppid = ntohs(sinfo.sinfo_ppid);
+	ppid = ntohl(sinfo.sinfo_ppid);
 	msgb_sctp_ppid(msg) = ppid;
 	msgb_sctp_stream(msg) = sinfo.sinfo_stream;
 	msg->dst = asp;
@@ -1373,7 +1373,7 @@
 	if (rc == 0)
 		goto out;
 
-	ppid = ntohs(sinfo.sinfo_ppid);
+	ppid = ntohl(sinfo.sinfo_ppid);
 	msgb_sctp_ppid(msg) = ppid;
 	msgb_sctp_stream(msg) = sinfo.sinfo_stream;
 	msg->dst = asp;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ief04486e752e6b7e0a853b1fa9ca525ad47800f6
Gerrit-PatchSet: 1
Gerrit-Project: libosmo-sccp
Gerrit-Branch: master
Gerrit-Owner: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder



More information about the gerrit-log mailing list