diff options
author | Lai Peter Jun Ann <jun.ann.lai@intel.com> | 2022-11-17 13:33:17 +0800 |
---|---|---|
committer | Stephen Hemminger <stephen@networkplumber.org> | 2022-11-23 08:54:37 -0800 |
commit | e0ecee3a33af57e01fe5d15f1a436216412f2d96 (patch) | |
tree | 3eda98db69cc77497bee6e385070500f7812eecf /tc | |
parent | 6af6f02cce42c00f3ee48a58a5c4f80aae9faf93 (diff) | |
download | iproute2-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.c | 2 |
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; |