Change in libosmocore[master]: gprs_ns2_frgre: Ensure DSCP is sin premitted value range

laforge gerrit-no-reply at lists.osmocom.org
Thu Apr 29 17:51:23 UTC 2021


laforge has submitted this change. ( https://gerrit.osmocom.org/c/libosmocore/+/23973 )

Change subject: gprs_ns2_frgre: Ensure DSCP is sin premitted value range
......................................................................

gprs_ns2_frgre: Ensure DSCP is sin premitted value range

gors_ns2_udp has this check, but gprs_ns2_frgre was missing it.

Change-Id: I9bb9c6bdfe81fa6f02b11a02550ac9a54d3bfeaf
---
M src/gb/gprs_ns2_frgre.c
1 file changed, 3 insertions(+), 0 deletions(-)

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



diff --git a/src/gb/gprs_ns2_frgre.c b/src/gb/gprs_ns2_frgre.c
index 76c0b92..f888af2 100644
--- a/src/gb/gprs_ns2_frgre.c
+++ b/src/gb/gprs_ns2_frgre.c
@@ -554,6 +554,9 @@
 	if (local->u.sa.sa_family != AF_INET && local->u.sa.sa_family != AF_INET6)
 		return -EINVAL;
 
+	if (dscp < 0 || dscp > 63)
+		return -EINVAL;
+
 	bind = gprs_ns2_bind_by_name(nsi, name);
 	if (bind) {
 		if (result)

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

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I9bb9c6bdfe81fa6f02b11a02550ac9a54d3bfeaf
Gerrit-Change-Number: 23973
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge at osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-Reviewer: pespin <pespin at sysmocom.de>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210429/14682656/attachment.htm>


More information about the gerrit-log mailing list