summaryrefslogtreecommitdiff
path: root/tc
diff options
context:
space:
mode:
authorLai Peter Jun Ann <jun.ann.lai@intel.com>2022-11-17 13:33:17 +0800
committerStephen Hemminger <stephen@networkplumber.org>2022-11-23 08:54:37 -0800
commite0ecee3a33af57e01fe5d15f1a436216412f2d96 (patch)
tree3eda98db69cc77497bee6e385070500f7812eecf /tc
parent6af6f02cce42c00f3ee48a58a5c4f80aae9faf93 (diff)
downloadiproute2-e0ecee3a33af57e01fe5d15f1a436216412f2d96.tar.gz
tc_util: Fix no error return when large parent id used
This patch is to fix the issue where there is no error return when large value of parent ID is being used. The return value by stroul() is unsigned long int. Hence the datatype for maj and min should defined as unsigned long to avoid overflow issue. Signed-off-by: Muhammad Husaini Zulkifli <muhammad.husaini.zulkifli@intel.com> Signed-off-by: Lai Peter Jun Ann <jun.ann.lai@intel.com> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Diffstat (limited to 'tc')
-rw-r--r--tc/tc_util.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tc/tc_util.c b/tc/tc_util.c
index 44137adb..334334db 100644
--- a/tc/tc_util.c
+++ b/tc/tc_util.c
@@ -93,7 +93,7 @@ ok:
int get_tc_classid(__u32 *h, const char *str)
{
- __u32 maj, min;
+ unsigned long maj, min;
char *p;
maj = TC_H_ROOT;