Ticket #3056 (closed defect: fixed)
Sent packets come back when using Host Interface on Linux host => Fixed in SVN
Reported by: | arno | Owned by: | |
---|---|---|---|
Component: | network/hostif | Version: | VirtualBox 2.1.0 |
Keywords: | duplicate packet Host Interface | Cc: | |
Guest type: | other | Host type: | Linux |
Description
On a linux host (Debian, tested on 2.6.27 and 2.6.28 kernels but should also apply to previous ones), when using Host Interface mode for guest's interfaces, all(*) the packets sent by the guest come back to it. This has very bad side effects: Among others, this behavior prevents IPv6 stateless address autoconfiguration using Neighbor Discovery: the guest's stack receives its own Neighbor Solicitation packets and consider that the address on which it was performing DAD is duplicate.
The host's interface used for the tests were physical ones in all cases (tried with an e1000e and a ASIX AX8817x), not vlan interfaces. Changing the guest interface (PCnet-Fast III or Intel PR0/1000 MT Desktop) does not change the behavior.
2 easy ways to reproduce it:
- configure IPv4, try and send packet to an external host while monitoring traffic on your guest interface: *sent* packets are seen twice (ARP, ICMP, TCP, ...): one packet going out, the other coming back in.
- If you have an IPv6 router on your subnet, try and start IPv6 on the guest: it should be unable to configure a global IPv6 address and should report a DAD failure.
(*) the packets sent by the guest are not duplicated when sent to the host itself, it only happens when the packet are sent on the wire.
ps: I opened a separate ticket because I am not sure it is the exact same issue as the one described in #2713
Attachments
Change History
comment:2 Changed 14 years ago by aleksey
- Summary changed from Sent packets come back when using Host Interface on Linux host to Sent packets come back when using Host Interface on Linux host => Fixed in SVN
vboxnetflt tags all packets it injects into host's stack. Tags were overwritten in dev_queue_xmit before coming back to vboxnetflt packet filter. I changed the tag location, now it occupies the very end of control block array.
Changed 14 years ago by aleksey
-
attachment
VBoxNetFlt-linux.c
added
Latest version with duplicate packets issue fixed.
comment:3 follow-up: ↓ 4 Changed 14 years ago by aleksey
Arno, can you try the attached version? Copy it to
<vbox_installation_dir>/src/vboxnetflt/linux/
and rebuild modules with
sudo /etc/init.d/vboxdrv setup
comment:4 in reply to: ↑ 3 ; follow-up: ↓ 5 Changed 14 years ago by arno
Replying to aleksey:
Arno, can you try the attached version?
Done. It fixes the issue: No duplicated packets seen with tcpdump, IPv6 SLAAC ok.
Thanks for your work Alexey.
a+
comment:5 in reply to: ↑ 4 Changed 14 years ago by arno
Thanks for your work Alexey.
s/Alexey/aleksey/
Changed 14 years ago by JeremyVisser
-
attachment
VBoxNetFlt-linux.c.patch
added
Here's the same patch, but in .diff form to make it easier to scruitinise.