Bug 637383 - mount.cifs ip option does not work
mount.cifs ip option does not work
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: cifs-utils (Show other bugs)
13
All Linux
low Severity low
: ---
: ---
Assigned To: Jeff Layton
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2010-09-25 07:35 EDT by leonrvr
Modified: 2014-06-18 03:40 EDT (History)
3 users (show)

See Also:
Fixed In Version: cifs-utils-4.7-1.fc13
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-10-28 01:59:26 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)
patch -- reinstate ip= as an address resolution override option (1.89 KB, patch)
2010-09-28 16:37 EDT, Jeff Layton
no flags Details | Diff

  None (edit)
Description leonrvr 2010-09-25 07:35:57 EDT
Description of problem:

mount.cifs fails when using the ip= option with the message:

  mount error: could not resolve address for iomega1: Name or service not known

When I add the ip address and servicename to /etc/hosts it works. I think it would be better if it could work without the /etc/hosts entry

The actual command:
  mount.cifs //iomega1/public /mnt/iomega -o "user=leon,uid=leon,gid=leon,ip=192.168.0.123,nounix,file_mode=0640,dir_mode=0750"

Version-Release number of selected component (if applicable):

cifs-utils-4.6-1.fc13.i686

How reproducible:

Always

Steps to Reproduce:
1. No entry for ip address in /etc/hosts
2. Submit command shown above
3. Error message
  
Actual results:

Error message shown above

Expected results:

CIFS disc iomega1 mounted

Additional info:

Temp fix by adding service host to /etc/hosts. This should not be necessary.
The same command worked flawlessly in Fedora 11 on same machine.
Comment 1 Jeff Layton 2010-09-27 15:48:18 EDT
What's the point of putting an ip= option here? Why not just put the address in as part of the UNC? i.e.:

    //192.168.0.123/public
Comment 2 leonrvr 2010-09-27 23:38:21 EDT
Good point. It's just that it used to work in previous versions.
I just tried your solution; it works.
Thanks.
Comment 3 Jeff Layton 2010-09-28 16:37:40 EDT
Created attachment 450314 [details]
patch -- reinstate ip= as an address resolution override option

Yep, it's still a regression though you don't really have to put stuff in /etc/hosts to work around it.

Does this (completely untested) patch fix it?
Comment 4 Jeff Layton 2010-10-08 15:54:15 EDT
Reproduced and a fixed patch posted upstream:

    http://www.spinics.net/lists/linux-cifs/msg01208.html

...unless there are objections this should make the next cifs-utils release (4.7).
Comment 5 Jeff Layton 2010-10-12 08:55:58 EDT
Patch pushed to cifs-utils git master branch. I'll plan to cut an upstream release in the next week or so.
Comment 6 Fedora Update System 2010-10-19 15:57:44 EDT
cifs-utils-4.7-1.fc14 has been submitted as an update for Fedora 14.
https://admin.fedoraproject.org/updates/cifs-utils-4.7-1.fc14
Comment 7 Fedora Update System 2010-10-19 23:09:17 EDT
cifs-utils-4.7-1.fc14 has been pushed to the Fedora 14 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update cifs-utils'.  You can provide feedback for this update here: https://admin.fedoraproject.org/updates/cifs-utils-4.7-1.fc14
Comment 8 Fedora Update System 2010-10-25 14:39:07 EDT
cifs-utils-4.7-1.fc13 has been submitted as an update for Fedora 13.
https://admin.fedoraproject.org/updates/cifs-utils-4.7-1.fc13
Comment 9 Fedora Update System 2010-10-28 01:59:21 EDT
cifs-utils-4.7-1.fc14 has been pushed to the Fedora 14 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 10 Fedora Update System 2010-10-29 16:39:48 EDT
cifs-utils-4.7-1.fc13 has been pushed to the Fedora 13 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.