Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

misleading error message while resolving hostname of collector (-n) #6

Open
GoogleCodeExporter opened this issue Jun 10, 2015 · 0 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
$ softflowd -i eth0 -n blahh:1234
if "blahh" cannot be resolved, the error message
is "address too long" .

What is the expected output? What do you see instead?
"unknown hostname" or something similar

What version of the product are you using? On what operating system?
current (0.9.9) on gentoo linux

Please provide any additional information below.
this small patch works for me:
--- softflowd_orig.c    2012-02-13 02:39:42.000000000 +0100
+++ softflowd.c 2013-08-19 21:22:57.000000000 +0200
@@ -1603,7 +1603,7 @@

        memset(&hints, '\0', sizeof(hints));
        hints.ai_socktype = SOCK_DGRAM;
-       if ((herr = getaddrinfo(host, port, &hints, &res)) == -1) {
+       if ((herr = getaddrinfo(host, port, &hints, &res)) != 0) {
                fprintf(stderr, "Address lookup failed: %s\n",
                    gai_strerror(herr));
                exit(1);

output is "Address lookup failed: Name or service not known"
as expected.

Original issue reported on code.google.com by rittner....@googlemail.com on 19 Aug 2013 at 7:33

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant