zeek / zeek-client

Experimental implementation of Zeek's future cluster management client
BSD 3-Clause "New" or "Revised" License
4 stars 4 forks source link

Some suggestions for better IPv6 support #31

Closed dopheide-esnet closed 1 year ago

dopheide-esnet commented 1 year ago

When specifying addresses in the [instances] section of a config there were two issues:

[instances]
agent-zeek-test-cluster1.es.net = 127.0.0.1:2151
agent-zeek-test-cluster2.es.net = 2001:400:211::122:2151

1) Previously there was no support for specifying an ipv6 address at all. This should allow the above to work as well as if the v6 address is inside []'s.

2) There's a sort in brokertypes.py that ended up trying to compare IPv4 vs IPv6 addresses causing 'ipaddress' to throw a TypeError. What I've implement here is just a basic assumption that IPv4 is less than IPv6.

dopheide-esnet commented 1 year ago

Okay, we should have checking for valid IPs and tests for those now. As you mentioned, I did not implement accepting hostnames yet until the underlying code does as well.

dopheide-esnet commented 1 year ago

I'll be honest... I have no idea how to do that. :)

This looks great Dop, thank you. Are you up for rebasing on top of master? It's a bit fiddly due to the reformat, but otherwise not bad. Otherwise I can copy the commits from your branch and do it.