Bug 852827 - create_client() hard codes SOCK_DGRAM
Summary: create_client() hard codes SOCK_DGRAM
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: autofs
Version: 16
Hardware: All
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Ian Kent
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-08-29 17:17 UTC by Ahmon Dancy
Modified: 2012-09-17 17:50 UTC (History)
1 user (show)

Fixed In Version: autofs-5.0.6-8.fc16
Clone Of:
Environment:
Last Closed: 2012-09-17 17:50:22 UTC
Type: Bug
Embargoed:


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

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.


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