Hi,
I found a funny bug, when made some tests. I found out that if you try to give bird a full-length IPv6-address, like: ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff 1111:2222:3333:4444:5555:6666:7777:8888 You will get an error: "syntax error, unexpected BYTESTRING". I find it happens in conf/cf-lex.l because of how BYTESTRING is defined before IP6, it is too liberal to the forms of bytestrings, allowing almost arbitrary mix of ':' and digits. I suspect the idea was it allow 32-digit strings without delimters or with groups of 2 digits delimited by ':'. See proposed changes in the patch. By the way, that possibility for string literals is not documented. :) IP6 definition is also too permissive and allows some really weird things. It might have been done so intentionally to catch IPv6 typos. But in that case, it probably could be silmlified.
diff --git a/conf/cf-lex.l b/conf/cf-lex.l index 704a1750..ef281db6 100644 --- a/conf/cf-lex.l +++ b/conf/cf-lex.l @@ -255,7 +255,7 @@ WHITE [ \t] return IP4; } -{XIGIT}{2}(:{XIGIT}{2}|{XIGIT}{2}){15,} { +{XIGIT}{2}((:{XIGIT}{2}){15}|{XIGIT}{30}) { char *s = yytext; size_t len = 0, i; struct bytestring *bytes;