aboutsummaryrefslogtreecommitdiffstats
path: root/src/libosmo-pfcp/pfcp_msg.c
AgeCommit message (Collapse)AuthorFilesLines
2023-04-19coverity: fix null derefNeels Janosch Hofmeyr1-1/+1
fixup for "pfcp_msg: refactor LOG_PFCP_MSG e6ff99d7acbe270ed8f271daeaafc99e03a48176 Change-Id Ic84090c9b1a34185577cfb2ea1efa9c07542df34 Related: CID#313611 Change-Id: I347a813b31c839eae6b752982952367b2e664dc4
2023-04-15pfcp_msg: refactor LOG_PFCP_MSGNeels Janosch Hofmeyr1-0/+29
It was requested during code review to make this a function and not a macro. One effective change: no longer log "NULL{fi=NULL}" when no m->ctx.session_fi or .peer_fi are set. Change-Id: Ic84090c9b1a34185577cfb2ea1efa9c07542df34
2023-02-20Run struct_endianness.pyOliver Smith1-2/+2
Ensure there is no diff to prepare to run this in CI. Related: OS#5884 Change-Id: I0ae0b911f02b4f57d82c928cfc4a14a3dc397ab3
2022-11-26osmo_pfcp_ip_addrs_set(): do not set port numberNeels Janosch Hofmeyr1-0/+4
struct osmo_pfcp_ip_addrs uses an osmo_sockaddr for storing IP addresses. Even though osmo_sockaddr contains a port number, no port number gets encoded in PFCP messages. Hence always set the port to 0. I noticed that when osmo_pfcp_ip_addrs_set() is invoked with an osmo_sockaddr that incidentally has a port number set, subsequent logging of e.g. a PFCP F-TEID shows a port number, which is confusing. Change-Id: Ib29a123c06d459c99d7c1c0b9a7694fb78cd9fd8
2022-08-24pfcp_msg: check use count correctnessNeels Hofmeyr1-2/+2
Related: CID#275414 Related: SYS#5599 Change-Id: I685855da8b6f373fdc62a3c75f7f2e0af2839617
2022-08-12fix warnings: 'uninitialized'Neels Hofmeyr1-2/+2
Though these can never be used uninitialized, initialize to NULL to avoid compiler warnings like: pfcp_msg.c:188:66: warning: 'h_no_seid' may be used uninitialized Change-Id: Icb338b200fe3186ccd7fd3f502c1723f60947190
2022-07-23clarify osmo_pfcp_msg alloc APINeels Hofmeyr1-11/+19
Looking at the osmo_pfcp_msg_alloc API with a bit of distance now, I found that: - it is confusing to have a single function for req and resp. A resp may pass remote_addr as NULL, and a req may pass in_reply_to as NULL. Make this much more obvious with separate req/resp functions. - the osmo_pfcp_endpoint_tx() implicitly puts the local Node ID into sent PFCP messages, so the local_node_id arg for msg alloc is redundant. Drop that. Refactor without backwards compat, because we have not yet officially released this API. This requires a fixup patch to osmo-upf.git (and affects unmerged patches to osmo-hnbgw.git). Related: SYS#5599 Related: I73e6da3b80f05e9408c81f41ac05d6578b8e31cf (osmo-upf) Change-Id: I0d71134e42932cc72992eba73a15e82bc7cd11bd
2022-06-16libosmo-pfcp: implement PFCP header and msg handlingNeels Hofmeyr1-0/+540
Related: SYS#5599 Change-Id: I3f85ea052a6b7c064244a8093777e53a47c8c61e