samba browsing doesn't adapt dynamically to network changes

Bug #223622 reported by Peter Kerekfy
4
Affects Status Importance Assigned to Milestone
gvfs
Expired
Medium
gvfs (Ubuntu)
Triaged
Low
Ubuntu Desktop Bugs

Bug Description

Binary package hint: gvfs-backends

Very similar to Bug #191547 (most of this description is copied from there). But this time it is about hardy and gvfs.

Samba browsing works like a charm after login. gvfs sees all samba workgroups and servers:

$ gvfs-ls smb:///
E-WARE
MUNKACSOPORT
VIRTUAL

But after switching between wired and wireless networks, gvfs no longer sees any samba workgroups or shares.

$ gvfs-ls smb:///
[no output]

After some digging with wireshark, I noticed that the problem is that gvfs sends the NMB name lookup requests to the wrong broadcast address.
For example:
1. Let the wired network be: 192.168.5.0/24 (broadcast 192.168.5.255)
2. Let the wireless network be: 192.168.6.0/24 (broadcast 192.168.6.255)
Let's suppose that the wired connection was active when I started my gnome session. Then after switching to the wireless connection gvfs still keeps sending NMB name lookup queries to 192.168.5.255 which is WRONG.

Workaround:
$ killall gvfsd-smb-browse

Putting the above line in some if-up/if-down script makes the problem go away.

$ dpkg -l | grep gvfs| cat
ii gvfs 0.2.3-0ubuntu4 userspace virtual filesystem - server
ii gvfs-backends 0.2.3-0ubuntu4 userspace virtual filesystem - backends
ii gvfs-bin 0.2.3-0ubuntu4 userspace virtual filesystem - binaries
ii gvfs-fuse 0.2.3-0ubuntu4 userspace virtual filesystem - fuse server
ii libgvfscommon0 0.2.3-0ubuntu4 userspace virtual filesystem - library

$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=8.04
DISTRIB_CODENAME=hardy
DISTRIB_DESCRIPTION="Ubuntu 8.04"

Revision history for this message
Sebastien Bacher (seb128) wrote :

Thanks for your bug report. This bug has been reported to the developers of the software. You can track it and make comments here: http://bugzilla.gnome.org/show_bug.cgi?id=530394

Changed in gvfs:
assignee: nobody → desktop-bugs
importance: Undecided → Low
status: New → Triaged
Changed in gvfs:
status: Unknown → New
Changed in gvfs:
importance: Unknown → Medium
Revision history for this message
noname2 (noname2-deactivatedaccount) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. However, according to this report, you are not using the most recent version of this package for your Ubuntu release. Please upgrade to the most recent version and let us know if you are still having this issue. Thanks in advance.

Revision history for this message
Carsten Oberscheid (carsten-c) wrote :

Maybe this is related: I'm using Ubuntu 13.10 on a notebook with a docking station. Docking station is connected to Ethernet.

Connect samba shares with Nautilus while notebook sits in docking station. Browsing shares with Nautilus, accessing files all works fine.

Take notebook out of docking station. Notebook switches to wifi network. Nautilus still shows shares as connected/mounted but freezes when trying to browse or access files. Same with other software when trying to read/write files (e.g. emacs trying to write an open file on a share). Sometimes after several minutes the connection is recovered, read and write access resumes to work. More often, error messages appear and problem reports are generated because the connection could not be recovered.

Very annoying because I switch between desktop/docking station and mobile use for meetings quite often during the day.

Changed in gvfs:
status: New → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.