From c5c3a22bccda5454775b48ad318a7fd4bf197f86 Mon Sep 17 00:00:00 2001 From: Ondrej Zajicek Date: Fri, 6 Oct 2023 02:36:59 +0200 Subject: [PATCH] Conf: Bytestrings with hex: should use the same general format as ones without. Either hex:01234567, or hex:01:23:45:67. No confusing formats like hex:0123:4567:ab:cdef, which looks like there is an implicit zero byte. --- conf/cf-lex.l | 2 +- doc/bird.sgml | 24 ++++++++++-------------- lib/strtoul.c | 2 +- 3 files changed, 12 insertions(+), 16 deletions(-) diff --git a/conf/cf-lex.l b/conf/cf-lex.l index 0fa4628a..2f95f2e1 100644 --- a/conf/cf-lex.l +++ b/conf/cf-lex.l @@ -242,7 +242,7 @@ WHITE [ \t] return IP4; } -({XIGIT}{2}){16,}|{XIGIT}{2}(:{XIGIT}{2}){15,}|hex:({XIGIT}{2}(:?{XIGIT}{2})*)? { +({XIGIT}{2}){16,}|{XIGIT}{2}(:{XIGIT}{2}){15,}|hex:({XIGIT}{2}*|{XIGIT}{2}(:{XIGIT}{2})*) { char *s = yytext; struct adata *bs; diff --git a/doc/bird.sgml b/doc/bird.sgml index d5bc8d57..eb8205d5 100644 --- a/doc/bird.sgml +++ b/doc/bird.sgml @@ -1561,22 +1561,18 @@ in the foot). This is a sequences of arbitrary bytes. There are no ways to modify bytestrings in filters. You can pass them between function, assign them to variables of type