Bug 852827 - create_client() hard codes SOCK_DGRAM
create_client() hard codes SOCK_DGRAM
Product: Fedora
Classification: Fedora
Component: autofs (Show other bugs)
All Linux
unspecified Severity high
: ---
: ---
Assigned To: Ian Kent
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2012-08-29 13:17 EDT by Ahmon Dancy
Modified: 2012-09-17 13:50 EDT (History)
1 user (show)

See Also:
Fixed In Version: autofs-5.0.6-8.fc16
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2012-09-17 13:50:22 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Patch - fix initialization in rpc create_client() (1.84 KB, patch)
2012-08-30 05:34 EDT, Ian Kent
no flags Details | Diff
Patch - fix libtirpc name clash (1.36 KB, patch)
2012-08-30 05:59 EDT, Ian Kent
no flags Details | Diff

  None (edit)
Description Ahmon Dancy 2012-08-29 13:17:23 EDT
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):

How reproducible:

100% in our environment.

Let me know if you need further information.
Comment 1 Ian Kent 2012-08-30 00:27:54 EDT
Sounds fine, I'll make that change.
Comment 2 Ian Kent 2012-08-30 05:34:50 EDT
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 05:59:31 EDT
Created attachment 608130 [details]
Patch - fix libtirpc name clash

And this one.
Comment 4 Fedora Update System 2012-08-30 06:13:17 EDT
autofs-5.0.6-8.fc16 has been submitted as an update for Fedora 16.
Comment 5 Ahmon Dancy 2012-08-30 10:36:19 EDT
autofs-5.0.6-8.fc16 works for us.  Thank you.
Comment 6 Fedora Update System 2012-08-30 21:03:46 EDT
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:
then log in and leave karma (feedback).
Comment 7 Fedora Update System 2012-09-17 13:50:22 EDT
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.

Note You need to log in before you can comment on or make changes to this bug.