VirtualBox

Opened 15 years ago

Closed 15 years ago

Last modified 14 years ago

#3056 closed defect (fixed)

Sent packets come back when using Host Interface on Linux host => Fixed in SVN

Reported by: Arnaud Ebalard 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 (2)

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

Download all attachments as: .zip

Change History (8)

comment:1 by Frank Mehnert, 15 years ago

Component: networknetwork/hostif

comment:2 by Aleksey Ilyushin, 15 years ago

Summary: Sent packets come back when using Host Interface on Linux hostSent 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.

by Aleksey Ilyushin, 15 years ago

Attachment: VBoxNetFlt-linux.c added

Latest version with duplicate packets issue fixed.

comment:3 by Aleksey Ilyushin, 15 years ago

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

in reply to:  3 ; comment:4 by Arnaud Ebalard, 15 years ago

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+

in reply to:  4 comment:5 by Arnaud Ebalard, 15 years ago

Thanks for your work Alexey.

s/Alexey/aleksey/

by Jeremy Visser, 15 years ago

Attachment: VBoxNetFlt-linux.c.patch added

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

comment:6 by Frank Mehnert, 15 years ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.

© 2023 Oracle
ContactPrivacy policyTerms of Use