Bug 458252
Summary: | Autofs doesn't recognize the local host as local when using many interfaces | ||||||
---|---|---|---|---|---|---|---|
Product: | Red Hat Enterprise Linux 5 | Reporter: | Thomas Bellman <bellman> | ||||
Component: | autofs | Assignee: | Ian Kent <ikent> | ||||
Status: | CLOSED ERRATA | QA Contact: | Brock Organ <borgan> | ||||
Severity: | medium | Docs Contact: | |||||
Priority: | medium | ||||||
Version: | 5.2 | CC: | ikent, jmoyer, syeghiay | ||||
Target Milestone: | rc | ||||||
Target Release: | --- | ||||||
Hardware: | All | ||||||
OS: | Linux | ||||||
Whiteboard: | |||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2009-01-20 21:45:32 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: | |||||||
Bug Blocks: | 476767 | ||||||
Attachments: |
|
Description
Thomas Bellman
2008-08-07 10:22:59 UTC
> The problem is that automount passes a too small buffer to the > SIOCGIFCONF ioctl when it tries to see what addresses the machine > it is running on has. The buffer is only 128 bytes long, and each > struct ifreq is 40 bytes, so the buffer only fits three interfaces. > That's *way* to little. Yep, your right. > > This is in the function get_proximity() in modules/replicated.c. > > I am attaching a patch that uses a buffer that is MAX_IFC_BUF bytes, > instead of MAX_ERR_BUF bytes. It doesn't really solve the problem, > just moves the limit to 51 interfaces, from 3 interfaces. I have only > had time to test it very lightly, though. Yep, that sound much better. > > A better solution would be to dynamically allocate a buffer, making > sure to never miss any interfaces. Something like allocating a > buffer with malloc(), do a SIOCGIFCONF, check that the used part of > the buffer is at least sizeof(struct ifreq) smaller than the buffer, > and if not make the buffer larger and try again. But I don't have the > time to make such a patch right now; I'm leaving for vacation tomorrow > and won't be back for four weeks. That would be good but I'm not sure I'll be able to do this in time for 5.3. > > This problem seems to still exists in autofs 5.0.3 with all patches > downloaded from http://www.kernel.org/pub/linux/daemons/autofs/v5/. > (I have only made a visual check of the 5.0.3 source code, though; I > haven't actually tested that version.) No need to check further that's also true. Ian This request was evaluated by Red Hat Product Management for inclusion in a Red Hat Enterprise Linux maintenance release. Product Management has requested further review of this request by Red Hat Engineering, for potential inclusion in a Red Hat Enterprise Linux Update release for currently deployed products. This request is not yet committed for inclusion in an Update release. 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-0178.html |