From 7d8b704e8d6d7ea40919659a763a64d43c416725 Mon Sep 17 00:00:00 2001 From: flu0r1ne Date: Tue, 3 Oct 2023 22:45:20 -0500 Subject: [PATCH] Support Hexadecimal Arguments for Packet Marking Packet marks are often specified in hexadecimal format. Update the `strtonum_or_err` function to parse both hexadecimal and decimal values. --- ui/utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/utils.c b/ui/utils.c index edd5905..5e3a701 100644 --- a/ui/utils.c +++ b/ui/utils.c @@ -80,7 +80,7 @@ int strtonum_or_err( if (str != NULL && *str != '\0') { errno = 0; - num = strtoul(str, &end, 10); + num = strtoul(str, &end, 0); if (errno == 0 && str != end && end != NULL && *end == '\0') { switch (type) { case STRTO_INT: -- 2.47.2