qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Filip Navara <filip.navara@gmail.com>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] Slirp/uIP incompatibility
Date: Sun, 14 Jun 2009 11:22:14 +0200	[thread overview]
Message-ID: <5b31733c0906140222l5fd14448n1545eb4530cae72@mail.gmail.com> (raw)


[-- Attachment #1.1: Type: text/plain, Size: 1409 bytes --]

Hello,
I'm not sure this worth looking into or fixing, but there is an
incompatibility between the uIP TCP/IP stack and Slirp as used with -net
user option.

Guest runs uIP in an emulated ARM machine with the AT91SAM7-EK board:

$ arm-softmmu/qemu-system-arm.exe -M at91sam -kernel
tests/basic-emac-uip-helloworld-at91sam7x-ek-at91sam7x256-sram.elf -net
nic,model=at91sam,macaddr=00:45:5
6:78:9a:bc -net user -redir tcp:1000::1000

The guest successfully receives the IP addresses using DHCP and starts to
listen on port 1000. Now I try to connect to it from the host machine. When
the SYN packet is received in the guest code, the SYN-ACK packet is
prepared. Due to an implementation error it is never sent though and ARP
request is sent instead, if the ARP tables are not filled already (which is
always the case for the first connection). After a while Slirp figures out
that no reply was received and sends the SYN again. The guest code thinks
that it already sent SYN-ACK and replies with ACK, probably due to
mismatched sequence numbers at that point. This repeats practically forever
and none of the parties can recover from it (by the means of RST or other
way).

If anyone can offer some advice how to resolve it or how the TCP/IP stacks
should behave if the first SYN-ACK during the connection establishment is
lost I'd be glad. Attached is a packet dump from QEMU VLAN.

Best regards,
Filip Navara

[-- Attachment #1.2: Type: text/html, Size: 1602 bytes --]

[-- Attachment #2: dump-uip.pcap --]
[-- Type: application/octet-stream, Size: 2693 bytes --]

                 reply	other threads:[~2009-06-14  9:22 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=5b31733c0906140222l5fd14448n1545eb4530cae72@mail.gmail.com \
    --to=filip.navara@gmail.com \
    --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).