)]}'
{
  "commit": "5c1e1890bfa1f6b4bc3f51e368bfd47af1b60db0",
  "tree": "9a65787ee5bbe6213eb51a9629c6eb2e67c26b39",
  "parents": [
    "c2804ee6c0eba19c029bb2950fa2998c16f3ea11"
  ],
  "author": {
    "name": "Michael Tokarev",
    "email": "mjt@tls.msk.ru",
    "time": "Thu Nov 28 23:32:55 2013 +0400"
  },
  "committer": {
    "name": "Jan Kiszka",
    "email": "jan.kiszka@siemens.com",
    "time": "Wed Mar 12 08:13:24 2014 +0100"
  },
  "message": "slirp smb with modern win guests when samba is also running on host\n\nAfter numerous reports that -smb (or -netdev user,smb\u003dfoo) not working\nwith modern windows (win7 and vista are reported as non-working), I\nstarted digging myself.  And found that indeed it doesn\u0027t work, and\nwhy.\n\nThe thing is that modern win tries to connect to port 445 (microsoft-ds)\nfirst, and if that fails, it falls back to old port 139 (netbios-ssn).\n\nslirp code in qemu only redirects port 139, it does not touch port 445.\n\nSo the prob is that if samba is also running on the host, guest will try\nto communicate using port 445, and that will succed, but ofcourse guest\nwill not talk with our samba but with samba running on the host.\n\nIf samba is not running on the host, guest will fall back to port 139,\nand will reach the redirecting rule and qemu will spawn smbd correctly.\n\nThe solution is to redirect both ports (139 and 445), and the fix is\na one-liner, adding second call to slirp_add_exec() at the end of\nnet/slirp.c:slirp_smb() function (provided below).\n\nBut it looks like that is not a proper fix really, since in theory\nwe should redirect both ports to the SAME, single samba instance,\nbut I\u0027m not sure this is possible with slirp.  Well, even if two\nsmbd processes will be run on the same config dir, it should not\nbe a problem.\n\nThe one-liner (not exactly 1 since it touches previous line too) is like\nthis:\n\nSigned-off-By: Michael Tokarev \u003cmjt@tls.msk.ru\u003e\n\nSigned-off-by: Jan Kiszka \u003cjan.kiszka@siemens.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "ce27eed0b29d4e1aa92b3a362377cfb8d4007bd0",
      "old_mode": 33188,
      "old_path": "net/slirp.c",
      "new_id": "cce026bf12bbead8a2bc8b5d0a1af67877266dd9",
      "new_mode": 33188,
      "new_path": "net/slirp.c"
    }
  ]
}
