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 13:55:20 UTC 2021


laforge has uploaded this change for review. ( 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(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/73/23973/1

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-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210429/f0c46cb1/attachment.htm>


More information about the gerrit-log mailing list