samba browsing doesn't adapt dynamically to network changes
@seb128
Submitted by Sébastien Bacher Assigned to gvf..@..e.bugs
Link to original bug (#530394)
Description
The issue has been described on https://bugs.launchpad.net/ubuntu/+source/gvfs/+bug/223622
"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:
- Let the wired network be: 192.168.5.0/24 (broadcast 192.168.5.255)
- 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."
Version: 0.2.x