diff options
-rw-r--r-- | lib/filter.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/filter.c b/lib/filter.c index 7038451..86486d3 100644 --- a/lib/filter.c +++ b/lib/filter.c @@ -76,6 +76,11 @@ parse_hex_field(char *str, int *outp, unsigned int *maskp, unsigned int max) if (!field_defined(str)) return 1; // and keep the defaults + // Historically, filters allowed writing hexadecimal numbers with leading "0x". + // This was never intentional nor documented, but some people relied on it. + if (!maskp && str[0] == '0' && (str[1] == 'x' || str[1] == 'X')) + str += 2; + while (*str) { int c = *str++; |