pespin has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/c/osmo-ggsn/+/14619 )

Change subject: ggsn: Avoid unaligned mem access reading PCO proto id
......................................................................

ggsn: Avoid unaligned mem access reading PCO proto id

Change-Id: I3d80833319869503691a52927892e6ac30744915
---
M ggsn/ggsn.c
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Jenkins Builder: Verified
  osmith: Looks good to me, but someone else must approve
  laforge: Looks good to me, approved



diff --git a/ggsn/ggsn.c b/ggsn/ggsn.c
index 968d4dd..78987e4 100644
--- a/ggsn/ggsn.c
+++ b/ggsn/ggsn.c
@@ -671,7 +671,7 @@
 static void process_pco_element(const struct pco_element *pco_elem, struct 
msgb *resp,
                                const struct apn_ctx *apn, struct pdp_t *pdp)
 {
-       uint16_t protocol_id = ntohs(pco_elem->protocol_id);
+       uint16_t protocol_id = osmo_load16be(&pco_elem->protocol_id);

        LOGPPDP(LOGL_DEBUG, pdp, "PCO Protocol 0x%04x\n", protocol_id);
        switch (protocol_id) {

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

Gerrit-Project: osmo-ggsn
Gerrit-Branch: master
Gerrit-Change-Id: I3d80833319869503691a52927892e6ac30744915
Gerrit-Change-Number: 14619
Gerrit-PatchSet: 2
Gerrit-Owner: pespin <[email protected]>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <[email protected]>
Gerrit-Reviewer: osmith <[email protected]>
Gerrit-Reviewer: pespin <[email protected]>
Gerrit-MessageType: merged

Reply via email to