Bug 1057298

Summary: irs_resconf_load failed: 59. Can't initialize context: invalid address format
Product: [Fedora] Fedora Reporter: Luke Macken <lmacken>
Component: bindAssignee: Tomáš Hozza <thozza>
Status: CLOSED NEXTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: dcbw, jpopelka, pfrields, psimerda, thozza, vonsch
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-07-22 11:07:41 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
patch
none
patch none

Description Luke Macken 2014-01-23 19:12:33 UTC
When trying to activate the wired connection on my Thinkpad X220, I'm hitting the following error.

NetworkManager[1278]: <info> Activation (em1) Stage 3 of 5 (IP Configure Start) starting DHCPv6 as requested by IPv6 router...
NetworkManager[1278]: <info> Activation (em1) Beginning DHCPv6 transaction (timeout in 45 seconds)
NetworkManager[1278]: <info> dhclient started with pid 4243
NetworkManager[1278]: <info> Policy set 'em1' (em1) as default for IPv6 routing and DNS.
dhclient[4243]: irs_resconf_load failed: 59.
dhclient[4243]: Can't initialize context: invalid address format
dhclient[4243]: Jan 23 12:08:45 vorpalblade dhclient[4243]: This version of ISC DHCP is based on the release available
dhclient[4243]: on ftp.isc.org.  Features have been added and other changes
dhclient[4243]: have been made to the base software release in order to make
dhclient[4243]: it work better with this distribution.
dhclient[4243]: Jan 23 12:08:45 vorpalblade dhclient[4243]: Please report for this software via the Red Hat Bugzilla site:
dhclient[4243]: http://bugzilla.redhat.com

Version-Release number of selected component (if applicable):

kernel-3.13.0-1.fc21.x86_64
NetworkManager-0.9.9.0-25.git20140117.fc21.x86_64
dhclient-4.3.0-0.4.b1.fc21.x86_64

Comment 1 Dan Williams 2014-01-24 19:59:46 UTC
So that appears to be dhclient trying to load /etc/resolv.conf:

dhcp-4.3.0b1/omapip/isclib.c:	result = irs_resconf_load(dhcp_gbl_ctx.mctx, _PATH_RESOLV_CONF,
dhcp-4.3.0b1/omapip/isclib.c:		log_error("irs_resconf_load failed: %d.", result);

which appears to be used for the auto DNS update stuff.  At least for NM, this can be turned off with DHCP_SEND_HOSTNAME=no in the ifcfg file.

But Luke, it would be interesting to see what your /etc/resolv.conf file contains that causes dhclient to puke?

Comment 2 Luke Macken 2014-01-25 01:57:57 UTC
(In reply to Dan Williams from comment #1)
> But Luke, it would be interesting to see what your /etc/resolv.conf file
> contains that causes dhclient to puke?

$ cat /etc/resolv.conf
# Generated by dnssec-trigger 0.11
nameserver 127.0.0.1
$ cat /etc/resolv.conf.tmp 
# Generated by NetworkManager
nameserver 192.168.1.1
nameserver fe80::6a1:51ff:fee7:1be5%em1

Comment 3 Jiri Popelka 2014-01-27 09:55:37 UTC
Thanks Dan for the investigation.
These problems (bug #1052343) should be fixed with bind-libs-lite-9.9.5-0.4.rc2.fc21

Luke, can you update 'bind*' and retest please ?

Comment 4 Jiri Popelka 2014-02-20 10:36:07 UTC
Closing as I assume this has been fixed with final dhcp-4.3.0 and bind-9.9.5

Comment 5 Jiri Popelka 2014-05-12 15:57:48 UTC
Actually I still see it.
This time it's because the irs_resconf_load() checks [1] the nameservers' it finds in /etc/resolv.conf and it does not like the %<interface> that NetworkManager adds, see comment #2 or bug #1093294.

[1] bind/lib/irs/resconf.c:add_server(address_str)
	struct addrinfo hints, *res;
	hints.ai_family = AF_UNSPEC;
	hints.ai_socktype = SOCK_DGRAM;
	hints.ai_protocol = IPPROTO_UDP;
	hints.ai_flags = AI_NUMERICHOST;
	error = getaddrinfo(address_str, "53", &hints, &res);
	if (error != 0)
		return (ISC_R_BADADDRESSFORM);

Comment 6 Jiri Popelka 2014-05-13 13:11:43 UTC
Created attachment 895131 [details]
patch

I posted this patch upstream.

Comment 7 Tomáš Hozza 2014-07-18 11:01:22 UTC
[ISC-Bugs #35989]

Comment 8 Tomáš Hozza 2014-07-18 11:01:45 UTC
Created attachment 919051 [details]
patch

Comment 9 Jiri Popelka 2014-07-22 10:49:22 UTC
Tomas, I think you can close this ticket as dhcp-4.3.1b1 with a work-around has been in rawhide for some time.

Comment 10 Tomáš Hozza 2014-07-22 11:07:41 UTC
(In reply to Jiri Popelka from comment #9)
> Tomas, I think you can close this ticket as dhcp-4.3.1b1 with a work-around
> has been in rawhide for some time.

Thanks.

Closing as NEXTRELEASE as the fix is included in dhcp package available in rawhide.