From cfcc1e67ad4c107d39e79d2eee5c8db8a1db7817 Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Mon, 7 Sep 2015 22:39:56 +0200 Subject: [PATCH] use htonl(ppid) when sending a SCTP message --- src/hnbgw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hnbgw.c b/src/hnbgw.c index 2db0afb6..0839e691 100644 --- a/src/hnbgw.c +++ b/src/hnbgw.c @@ -85,7 +85,7 @@ static int hnb_write_cb(struct osmo_fd *fd, struct msgb *msg) { struct hnb_context *ctx = fd->data; struct sctp_sndrcvinfo sinfo = { - .sinfo_ppid = msgb_ppid(msg), + .sinfo_ppid = htonl(msgb_ppid(msg)), .sinfo_stream = ctx->hnbap_stream, }; int rc;