diff options
author | Michael Tokarev <mjt@tls.msk.ru> | 2013-11-28 23:32:55 +0400 |
---|---|---|
committer | Jan Kiszka <jan.kiszka@siemens.com> | 2014-03-12 08:13:24 +0100 |
commit | 5c1e1890bfa1f6b4bc3f51e368bfd47af1b60db0 (patch) | |
tree | 9a65787ee5bbe6213eb51a9629c6eb2e67c26b39 /roms | |
parent | c2804ee6c0eba19c029bb2950fa2998c16f3ea11 (diff) | |
download | qemu-5c1e1890bfa1f6b4bc3f51e368bfd47af1b60db0.zip qemu-5c1e1890bfa1f6b4bc3f51e368bfd47af1b60db0.tar.gz qemu-5c1e1890bfa1f6b4bc3f51e368bfd47af1b60db0.tar.bz2 |
slirp smb with modern win guests when samba is also running on host
After numerous reports that -smb (or -netdev user,smb=foo) not working
with modern windows (win7 and vista are reported as non-working), I
started digging myself. And found that indeed it doesn't work, and
why.
The thing is that modern win tries to connect to port 445 (microsoft-ds)
first, and if that fails, it falls back to old port 139 (netbios-ssn).
slirp code in qemu only redirects port 139, it does not touch port 445.
So the prob is that if samba is also running on the host, guest will try
to communicate using port 445, and that will succed, but ofcourse guest
will not talk with our samba but with samba running on the host.
If samba is not running on the host, guest will fall back to port 139,
and will reach the redirecting rule and qemu will spawn smbd correctly.
The solution is to redirect both ports (139 and 445), and the fix is
a one-liner, adding second call to slirp_add_exec() at the end of
net/slirp.c:slirp_smb() function (provided below).
But it looks like that is not a proper fix really, since in theory
we should redirect both ports to the SAME, single samba instance,
but I'm not sure this is possible with slirp. Well, even if two
smbd processes will be run on the same config dir, it should not
be a problem.
The one-liner (not exactly 1 since it touches previous line too) is like
this:
Signed-off-By: Michael Tokarev <mjt@tls.msk.ru>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Diffstat (limited to 'roms')
0 files changed, 0 insertions, 0 deletions