bird bug: can not parse the full-length IPv6 address

Alexander Zubkov green at qrator.net
Sat Jan 1 22:07:12 CET 2022


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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bird-full-ipv6.patch
Type: text/x-patch
Size: 327 bytes
Desc: not available
URL: <http://trubka.network.cz/pipermail/bird-users/attachments/20220101/57c76190/attachment.bin>


More information about the Bird-users mailing list