From: Mark Jonckheere <mark.jonckheere@easynet.be>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] PATCH: access samba-server on host OS with -user-net
Date: Tue, 31 Aug 2004 12:53:26 +0200 [thread overview]
Message-ID: <413458A6.6050607@easynet.be> (raw)
After switching from TUN/TAP-based to slirp-based networking, I
discovered that a windows 98 client couldn't access the samba server
on the linux host anymore.
After some debugging it became clear that UDP messages sent with a
broadcast destination address 10.0.2.255 are answered with that same
broadcast address as a source address. These answers are ignored by
windows.
The following patch corrects this:
---8<------------------------------------
--- qemu/slirp/udp.c Tue Aug 24 23:57:12 2004
+++ qemu-patched/slirp/udp.c Tue Aug 31 11:25:22 2004
@@ -314,6 +314,8 @@
saddr = *addr;
if ((so->so_faddr.s_addr & htonl(0xffffff00)) == special_addr.s_addr)
saddr.sin_addr.s_addr = so->so_faddr.s_addr;
+ if ((so->so_faddr.s_addr & htonl(0x000000ff)) == htonl(0xff))
+ saddr.sin_addr.s_addr = special_addr.s_addr | htonl(CTL_ALIAS);
daddr.sin_addr = so->so_laddr;
daddr.sin_port = so->so_lport;
---8<------------------------------------
Groeten,
Mark.
--
:wq
reply other threads:[~2004-08-31 10:59 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=413458A6.6050607@easynet.be \
--to=mark.jonckheere@easynet.be \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).