VirtualBox

Ticket #3056 (closed defect: fixed)

Opened 14 years ago

Last modified 13 years ago

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

VBoxNetFlt-linux.c Download (36.7 KB) - added by aleksey 14 years ago.
Latest version with duplicate packets issue fixed.
VBoxNetFlt-linux.c.patch Download (12.4 KB) - added by JeremyVisser 14 years ago.
Here's the same patch, but in .diff form to make it easier to scruitinise.

Change History

comment:1 Changed 14 years ago by frank

  • Component changed from network to network/hostif

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

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

Here's the same patch, but in .diff form to make it easier to scruitinise.

comment:6 Changed 14 years ago by frank

  • Status changed from new to closed
  • Resolution set to fixed
Note: See TracTickets for help on using tickets.

www.oracle.com
ContactPrivacy policyTerms of Use