Date: Tue, 27 Jan 2026 18:44:28 +0000 From: John Baldwin <jhb@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: a8ab78a0785f - stable/14 - ctld: Remove dead code in UCL parsing of hex DSCP values Message-ID: <6979078c.faff.39b965e1@gitrepo.freebsd.org>
index | next in thread | raw e-mail
The branch stable/14 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=a8ab78a0785f5e988179a6f15c1eecff7086d9b3 commit a8ab78a0785f5e988179a6f15c1eecff7086d9b3 Author: John Baldwin <jhb@FreeBSD.org> AuthorDate: 2025-04-11 14:00:39 +0000 Commit: John Baldwin <jhb@FreeBSD.org> CommitDate: 2026-01-27 18:15:58 +0000 ctld: Remove dead code in UCL parsing of hex DSCP values libucl treats strings starting with "0x" as an integer if they do not contain invalid characters. The code also looks broken as it only calls strtol if the string exactly matches "0x" without any trailing characters. Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D49644 (cherry picked from commit 251439f1a06867a6baccb274c671b2169c9959fd) --- usr.sbin/ctld/uclparse.cc | 3 --- 1 file changed, 3 deletions(-) diff --git a/usr.sbin/ctld/uclparse.cc b/usr.sbin/ctld/uclparse.cc index 05cfcc8df7e7..ccb0b45a5ab1 100644 --- a/usr.sbin/ctld/uclparse.cc +++ b/usr.sbin/ctld/uclparse.cc @@ -570,9 +570,6 @@ uclparse_dscp(const char *group_type, const char *pg_name, return (portal_group_set_dscp(ucl_object_toint(obj))); key = ucl_object_tostring(obj); - if (strcmp(key, "0x") == 0) - return (portal_group_set_dscp(strtol(key + 2, NULL, 16))); - if (strcmp(key, "be") == 0 || strcmp(key, "cs0") == 0) portal_group_set_dscp(IPTOS_DSCP_CS0 >> 2); else if (strcmp(key, "ef") == 0)home | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6979078c.faff.39b965e1>
