neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-pfcp/+/36347?usp=email )
Change subject: pfcp up_function_features: allow shorter lengths
......................................................................
pfcp up_function_features: allow shorter lengths
eUPF sends a short CP Function Features bitmap, which is easy to solve
by just zero padding to the minimum length specified in PFCP (3GPP TS
29.244)
Related: SYS#6590
Change-Id: I40e255fd0b4770e578aea7a10ba88f5eeba087f4
---
M src/libosmo-pfcp/pfcp_ies_custom.c
1 file changed, 18 insertions(+), 2 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmo-pfcp refs/changes/47/36347/1
diff --git a/src/libosmo-pfcp/pfcp_ies_custom.c b/src/libosmo-pfcp/pfcp_ies_custom.c
index e2e9f02..d3ecda5 100644
--- a/src/libosmo-pfcp/pfcp_ies_custom.c
+++ b/src/libosmo-pfcp/pfcp_ies_custom.c
@@ -431,8 +431,10 @@
int osmo_pfcp_dec_up_function_features(void *decoded_struct, void *decode_to, const struct osmo_gtlv_load *tlv)
{
struct osmo_pfcp_ie_up_function_features *up_function_features = decode_to;
- ENSURE_LENGTH_IS_AT_LEAST(6);
- memcpy(up_function_features->bits, tlv->val, 6);
+ /* 3GPP TS 29.244 version 16.6.0 Release 16 8.2.25 UP Function Features defines at least 6 octets of bits, but
+ * if the peer sends less octets, make do with what we get. */
+ memset(up_function_features->bits, 0, sizeof(up_function_features->bits));
+ memcpy(up_function_features->bits, tlv->val, OSMO_MIN(sizeof(up_function_features->bits), tlv->len));
return 0;
}
--
To view, visit https://gerrit.osmocom.org/c/libosmo-pfcp/+/36347?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmo-pfcp
Gerrit-Branch: master
Gerrit-Change-Id: I40e255fd0b4770e578aea7a10ba88f5eeba087f4
Gerrit-Change-Number: 36347
Gerrit-PatchSet: 1
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-MessageType: newchange
neels has submitted this change. ( https://gerrit.osmocom.org/c/osmo-mgw/+/35302?usp=email )
Change subject: mgw: do not fail MGCP on codec mismatch
......................................................................
mgw: do not fail MGCP on codec mismatch
Before this patch, when an CRCX+MDCX wants to set a codec list that has
no match with the codecs for the other conn of that same endpoint,
osmo-mgw returns an MGCP "FAIL" response.
When a client wants to change the codec, it has to do that one RTP port
at a time. So osmo-mgw *must* allow to configure an MGCP conn with a
codec choice that mismatches the other conn.
This is crucial to allow codec negotiation in osmo-msc: if MO has
already assigned a specific codec, and later wants to re-assign to the
codec that MT has chosen, the codec needs to be changed at osmo-mgw.
This patch is the minimal fix required to get re-assignment to a
different codec to work (via osmo-msc). There is more work to be done
about this bit of code in osmo-mgw, but keep that to a separate patch.
In detail, before this patch, we fail both
- when a side has no codecs,
- or when there is no single match between codecs of the two sides of
the endpoint.
Remove only the second condition; after this patch, still fail when a
side has no codecs -- this allows mgcp_test.c to still pass.
Related: OS#6293
Related: osmo-msc I8760feaa8598047369ef8c3ab2673013bac8ac8a
Change-Id: I3d1163fe622bdd7dc42a485f796072524ab39db9
---
M src/libosmo-mgcp/mgcp_codec.c
1 file changed, 45 insertions(+), 1 deletion(-)
Approvals:
fixeria: Looks good to me, approved
Jenkins Builder: Verified
pespin: Looks good to me, but someone else must approve
diff --git a/src/libosmo-mgcp/mgcp_codec.c b/src/libosmo-mgcp/mgcp_codec.c
index 4626d03..2f1df7b 100644
--- a/src/libosmo-mgcp/mgcp_codec.c
+++ b/src/libosmo-mgcp/mgcp_codec.c
@@ -455,7 +455,17 @@
}
}
- return -EINVAL;
+ if (conn_dst->end.codecs_assigned)
+ conn_dst->end.codec = &conn_dst->end.codecs[0];
+ else
+ return -EINVAL;
+
+ if (conn_src->end.codecs_assigned)
+ conn_src->end.codec = &conn_src->end.codecs[0];
+ else
+ return -EINVAL;
+
+ return 0;
}
/* Check if the codec has a specific AMR mode (octet-aligned or bandwith-efficient) set. */
--
To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/35302?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Change-Id: I3d1163fe622bdd7dc42a485f796072524ab39db9
Gerrit-Change-Number: 35302
Gerrit-PatchSet: 7
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: merged
Attention is currently required from: pespin.
neels has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/36265?usp=email )
Change subject: sockaddr_str: add conversion to,from osmo_sockaddr
......................................................................
Patch Set 1:
(1 comment)
Patchset:
PS1:
> Missing update in TODO-RELEASE.
do you really need a TODO-RELEASE entry for an added function?
the changelog will anyway list the commit log summary.
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/36265?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I0df84b4bb8cb5d8434b735fa3a38e7f95be43e91
Gerrit-Change-Number: 36265
Gerrit-PatchSet: 1
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Tue, 19 Mar 2024 03:37:58 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: comment