Bug 476767

Summary: Autofs doesn't recognize the local host as local when using many interfaces
Product: Red Hat Enterprise Linux 4 Reporter: Ian Kent <ikent>
Component: autofsAssignee: Jeff Moyer <jmoyer>
Status: CLOSED ERRATA QA Contact: Martin Jenner <mjenner>
Severity: medium Docs Contact:
Priority: medium    
Version: 4.7CC: ikent, jmoyer, kvolny, rlerch, syeghiay
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
* the automount daemon used fixed size buffer of 128 bytes long to receive information from the SIOCGIFCONF ioctl about local interfaces when testing for the proximity of a host corresponding to a given mount. Since the details of each interface are 40 bytes long, the daemon could receive information on no more than three local interfaces. If the host corresponding to the mount had an address that was local but did not correspond to one of the three interfaces the proximity would be classified incorrectly. The automount daemon now dynamically allocates a buffer, ensuring that it is large enough to contain information on all interfaces on the system providing the ability to correctly detect proximity of a host given for an NFS mount.
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-05-18 20:22:09 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 458252    
Bug Blocks: 458752    
Attachments:
Description Flags
Patch to raise the limit of number of local interfaces handled. none

Comment 1 Ian Kent 2008-12-17 00:52:34 UTC
Created attachment 327193 [details]
Patch to raise the limit of number of local interfaces handled.

This patch is combines the version 5 patch and corrections
used to resolve this issue. It has been slightly altered
when merged to the autofs version 4 code base due to minor
differences in the code.

RHTS test bz458252 can be used to verify operation of autofs
after the patch has been applied.

Comment 2 Jeff Moyer 2009-01-05 19:56:13 UTC
Thanks for doing all of the work, Ian!

Comment 4 Jeff Moyer 2009-01-21 15:53:12 UTC
A fix for this is available in autofs versions 4.1.3-235.4 and later.

Comment 6 Ruediger Landmann 2009-01-23 06:54:23 UTC
Release note added. If any revisions are required, please set the 
"requires_release_notes" flag to "?" and edit the "Release Notes" field accordingly.
All revisions will be proofread by the Engineering Content Services team.

New Contents:
* the automount daemon used a buffer 128 bytes long to pass information to SIOCGIFCONF about the addresses on the local machine. Since the details of each interface are 40 bytes long, the daemon could pass information on no more than three local interfaces. Autofs would therefore correctly mount NFS directories that mapped to three local IP addresses, but directories mapped to any further local IP addresses were treated as if they were on remote systems. The automount daemon now dynamically allocates a buffer, ensuring that it is large enough to contain information on all interfaces on the system. Directories mapped to local IP addresses are now correctly represented as part of the local system.

Comment 7 Ian Kent 2009-01-26 07:13:02 UTC
Release note updated. If any revisions are required, please set the 
"requires_release_notes"  flag to "?" and edit the "Release Notes" field accordingly.
All revisions will be proofread by the Engineering Content Services team.

Diffed Contents:
@@ -1 +1,2 @@
-* the automount daemon used a buffer 128 bytes long to pass information to SIOCGIFCONF about the addresses on the local machine. Since the details of each interface are 40 bytes long, the daemon could pass information on no more than three local interfaces. Autofs would therefore correctly mount NFS directories that mapped to three local IP addresses, but directories mapped to any further local IP addresses were treated as if they were on remote systems. The automount daemon now dynamically allocates a buffer, ensuring that it is large enough to contain information on all interfaces on the system. Directories mapped to local IP addresses are now correctly represented as part of the local system.+* the automount daemon used fixed size buffer of 128 bytes long to receive information from the SIOCGIFCONF ioctl about local interfaces when testing for the proximity of a host corresponding to a given mount. Since the details of each interface are 40 bytes long, the daemon could receive information on no more than three local interfaces. If the host corresponding to the mount had an address that was local but did not correspond to one of the three interfaces the proximity would be classified incorrectly.
+The automount daemon now dynamically allocates a buffer, ensuring that it is large enough to contain information on all interfaces on the system providing the ability to correctly detect proximity of a host given for an NFS mount.

Comment 12 errata-xmlrpc 2009-05-18 20:22:09 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2009-0991.html