[M] Change in osmo-upf[master]: Validate session remote CP F-SEID and use it to transmit session requ...
Attention is currently required from: fixeria, neels. pespin has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/osmo-upf/+/41482?usp=email ) Change subject: Validate session remote CP F-SEID and use it to transmit session requests ...................................................................... Patch Set 1: (3 comments) File src/osmo-upf/up_endpoint.c: https://gerrit.osmocom.org/c/osmo-upf/+/41482/comment/2afd55c2_4ce685ab?usp=... : PS1, Line 176: OSMO_ASSERT(f_seid)
missing semicolon? Done
https://gerrit.osmocom.org/c/osmo-upf/+/41482/comment/074f1a03_24ab73ee?usp=... : PS1, Line 217: nack_response
I would go for a separate function (e.g. `up_ep_tx_nack()`) to avoid code duplication. I think it's fine having it this, way it's only 3 lines of code and it's common practice to handle nack this way imho.
It would make sense if a lot of code was needed, but it's not really the case. File src/osmo-upf/up_session.c: https://gerrit.osmocom.org/c/osmo-upf/+/41482/comment/c24cdc2b_eeb44a8f?usp=... : PS1, Line 115: return NULL;
This code is unreachable. […] I also thought about it, and tbh I only added this return to avoid warnings on older compilers/static analysis tools. I prefer keeping the assert in each branch, specially the first one, since it becomes clearer that the break is not something which may not been done on purpose.
I'll add a comment here /* unreachable */, since adding more code like ASSERT could also trigger a warning by static analysis tools -- To view, visit https://gerrit.osmocom.org/c/osmo-upf/+/41482?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: osmo-upf Gerrit-Branch: master Gerrit-Change-Id: Ifccd4d2b8d500c9928778400bb096baaa12c9a31 Gerrit-Change-Number: 41482 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin@sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy@sysmocom.de> Gerrit-Reviewer: laforge <laforge@osmocom.org> Gerrit-Reviewer: neels <nhofmeyr@sysmocom.de> Gerrit-Reviewer: osmith <osmith@sysmocom.de> Gerrit-Attention: neels <nhofmeyr@sysmocom.de> Gerrit-Attention: fixeria <vyanitskiy@sysmocom.de> Gerrit-Comment-Date: Mon, 01 Dec 2025 15:14:55 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: fixeria <vyanitskiy@sysmocom.de>
participants (1)
-
pespin