Bug 852827

Summary: create_client() hard codes SOCK_DGRAM
Product: [Fedora] Fedora Reporter: Ahmon Dancy <dancy>
Component: autofsAssignee: Ian Kent <ikent>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: 16CC: ikent
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: autofs-5.0.6-8.fc16 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-09-17 17:50:22 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 - fix initialization in rpc create_client()
none
Patch - fix libtirpc name clash none

Description Ahmon Dancy 2012-08-29 17:17:23 UTC
Description of problem:

lib/rpc_subs.c:create_client() does the following:

        hints.ai_flags = AI_ADDRCONFIG;
        hints.ai_family = AF_UNSPEC;
        hints.ai_socktype = SOCK_DGRAM; 

but, as far as I can tell, create_client() is supposed to work for both UDP (SOCK_DGRAM) and TCP (SOCK_STRAEM) so having SOCK_DGRAM hard-coded here prevents TCP from working.

Suggested change:

        hints.ai_socktype = 0;

Later code in create_client filters the results from getaddrinfo() based on ai_protocol and that appears to be sufficient.

As it stands, without this change, automounting of some of our NFS servers doesn't work as they did w/ prior releases of autofs.


Version-Release number of selected component (if applicable):
autofs-5.0.6-7.fc16


How reproducible:

100% in our environment.


Let me know if you need further information.

Comment 1 Ian Kent 2012-08-30 04:27:54 UTC
Sounds fine, I'll make that change.

Comment 2 Ian Kent 2012-08-30 09:34:50 UTC
Created attachment 608097 [details]
Patch - fix initialization in rpc create_client()

How about we give this a try?

Comment 3 Ian Kent 2012-08-30 09:59:31 UTC
Created attachment 608130 [details]
Patch - fix libtirpc name clash

And this one.

Comment 4 Fedora Update System 2012-08-30 10:13:17 UTC
autofs-5.0.6-8.fc16 has been submitted as an update for Fedora 16.
https://admin.fedoraproject.org/updates/autofs-5.0.6-8.fc16

Comment 5 Ahmon Dancy 2012-08-30 14:36:19 UTC
autofs-5.0.6-8.fc16 works for us.  Thank you.

Comment 6 Fedora Update System 2012-08-31 01:03:46 UTC
Package autofs-5.0.6-8.fc16:
* should fix your issue,
* was pushed to the Fedora 16 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing autofs-5.0.6-8.fc16'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2012-13039/autofs-5.0.6-8.fc16
then log in and leave karma (feedback).

Comment 7 Fedora Update System 2012-09-17 17:50:22 UTC
autofs-5.0.6-8.fc16 has been pushed to the Fedora 16 stable repository.  If problems still persist, please make note of it in this bug report.