osmo_ss7: Fix SCTP PPID byte width

In 17df5953ff 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
This commit is contained in:
Harald Welte 2017-04-12 12:08:15 +02:00
parent 47d05fae4f
commit 2e6ada753c
1 changed files with 2 additions and 2 deletions

View File

@ -1261,7 +1261,7 @@ static int xua_srv_conn_cb(struct osmo_stream_srv *conn)
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 @@ static int xua_cli_read_cb(struct osmo_stream_cli *conn)
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;