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

parse_interface() fails on "eth0" with Ubuntu 14.04 #34

Open
GoogleCodeExporter opened this issue Mar 15, 2015 · 3 comments
Open

parse_interface() fails on "eth0" with Ubuntu 14.04 #34

GoogleCodeExporter opened this issue Mar 15, 2015 · 3 comments

Comments

@GoogleCodeExporter
Copy link

if.c, line 520:

const int eai = getaddrinfo (ifname, NULL, &hints, &result);

On Ubuntu 14.04 under mysterious circumstances it returns -3 (EAI_AGAIN) with 
ifname = "eth0". DHCP was switched off, if it matters.
I suggest to add "case EAI_AGAIN:" under "case EAI_NONAME:":

#if defined(EAI_NODATA) && EAI_NODATA != EAI_NONAME
        case EAI_NODATA:
#endif
        case EAI_AGAIN:
        case EAI_NONAME:
            check_ifname = TRUE;
            break;

After this fix, ZeroMQ successfully connects to epgm://eth0;239.192.1.1.

Original issue reported on code.google.com by gmark...@gmail.com on 4 Apr 2014 at 1:16

@GoogleCodeExporter
Copy link
Author

Versions: libc 2.19-0ubuntu3, kernel 3.13.0-20-generic.

Original comment by gmark...@gmail.com on 4 Apr 2014 at 1:28

@GoogleCodeExporter
Copy link
Author

Thanks, I was surprised to never see this error code in the wild even with bad 
DNS servers or mDNS.  Will update trunk.

Original comment by fnjo...@gmail.com on 4 Apr 2014 at 5:20

  • Changed state: Accepted

@GoogleCodeExporter
Copy link
Author

Actually, I'm not sure it is sensible to hide such an subsystem failure within 
the API.  It would be more apparent if the application calling 
pgm_getaddrinfo() captures the error domain PGM_ERROR_DOMAIN_IF and code 
PGM_ERROR_AGAIN and determines how it should proceed.

One possible enhancement would be an option equivalent to AI_NUMERICHOST so 
that network services are not used however one has no control over system name 
services whether they be local or remote based.  So the flag would have to 
disable pgm_getnetbyname() and getaddrinfo(~AI_NUMERICHOST).

Alternatively of course, just use a /etc/networks name or IP address of the 
interface.

Original comment by fnjo...@gmail.com on 4 Apr 2014 at 5:44

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