CESNET / ipfixcol2

High-performance NetFlow v5/v9 and IPFIX collector (RFC7011)
Other
123 stars 36 forks source link

Support hosts by name in json output params #91

Closed guru-florida closed 6 months ago

guru-florida commented 7 months ago

Problem

ipfixcol2 doesn't support hostnames for the Json output plugin, only IP addresses. I manually fixed this by short circuiting the check_ip function to true in the /src/plugins/output/json/Config.cpp file. The Sender.cpp code uses the getaddrinfo() function which supports hostnames and IP addresses, so no other code changes but to not call check_ip() are needed to support this. This may be by design, but is there a particular reason why you would not want to allow hostnames?

Justification

I built a docker image of ipfixcol2 and docker inter-container networking relies on hostnames where the ip address is not known for configuration.

sedmicha commented 6 months ago

I have looked through the plugin code and there is really no reason for that check to be there, the limitation is therefore more of a bug rather than being intended. The issue has been fixed and should appear here as soon as some of our internal processes go through.

sedmicha commented 6 months ago

We have made a new release (v2.5.0) today that solves this issue

guru-florida commented 6 months ago

Thank you!