[Bro-Dev] IPv6 literal addr constants

Siwek, Jonathan Luke jsiwek at illinois.edu
Fri Mar 9 09:01:39 PST 2012

Representing compressed-hex IPv6 addresses (replacing consecutive fields of zeros with ::) in scripts as literal constants can be ambiguous with identifiers that use "::" as a namespace resolver.

For example, the lexer will treat "aaaa::bbbb" as the "bbbb" identifier in the "aaaa" namespace/module.  Specifically, this is the case where someone tries to write an address that uses only the first and last 16-bit fields and the first nibble of both fields is a letter.

I think this would be uncommon, but also maybe not obvious to figure out when someone actually runs into it, though it's easy to workaround once you know what's going on.  Any ideas for fixing the ambiguity or does it seem reasonable to just have it documented?


More information about the bro-dev mailing list