Subject: Re: vmware and IPv6 DAD
To: TATEOKA Takamichi <tate@cs.uec.ac.jp>
From: Andrew Gillham <gillham@vaultron.com>
List: tech-net
Date: 05/16/2001 13:44:54
This is a multi-part message in MIME format.
------=_NextPart_000_00E7_01C0DE0E.632C2600
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
This is more or less what I was testing yesterday on -current.
A slight change is need for -current. Attached is a patch.
-Andrew
----- Original Message -----
From: "TATEOKA Takamichi" <tate@cs.uec.ac.jp>
To: <itojun@iijlab.net>
Cc: <tech-net@netbsd.org>; <tate@cs.uec.ac.jp>
Sent: Wednesday, May 16, 2001 2:44 AM
Subject: Re: vmware and IPv6 DAD
> Hi,
>
> From: itojun@iijlab.net
> > i got a report that basically says, "IPv6 does not work on
> > netbsd-on-vmware, because of duplicated address detection failure".
>
> I made a patch against dev/ic/lance.c from FreeBSD code. I attach
> the patch. My NetBSD on VMware-for-Windows2000 works fine for IPv6
> with this patch.
>
> Without this patch, I got following error messages:
>
> le0: DAD detected duplicate IPv6 address fe80:0001::0250:56ff:feb1:0572: 1
NS, 0 NA
> le0: DAD complete for fe80:0001::0250:56ff:feb1:0572 - duplicate found
> le0: manual intervention required
>
> I'm using NetBSD-1.5-release branch.
>
> NetBSD leaf6.cs.uec.ac.jp 1.5.1_BETA NetBSD 1.5.1_BETA (LEAF) #5: Wed May
16 18:23:08 JST 2001
tate@leaf6.cs.uec.ac.jp:/usr/src/sys/arch/i386/compile/LEAF i386
> leaf6:tate[7]%
>
> Thanks,
> --
> TATEOKA, Takamichi (tate@cs.uec.ac.jp / tate@nerv.org)
>
------=_NextPart_000_00E7_01C0DE0E.632C2600
Content-Type: application/octet-stream;
name="lance.c.diff"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
filename="lance.c.diff"
Index: lance.c=0A=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A=
RCS file: /cvsroot/syssrc/sys/dev/ic/lance.c,v=0A=
retrieving revision 1.18=0A=
diff -u -r1.18 lance.c=0A=
--- lance.c 2001/04/27 17:08:02 1.18=0A=
+++ lance.c 2001/05/16 20:42:01=0A=
@@ -467,7 +467,7 @@=0A=
int boff, len;=0A=
{=0A=
struct mbuf *m;=0A=
-#ifdef LANCE_REVC_BUG=0A=
+#if defined(LANCE_REVC_BUG) || defined(LANCE_VMWARE_BUG)=0A=
struct ether_header *eh;=0A=
#endif=0A=
=0A=
@@ -512,6 +512,19 @@=0A=
eh =3D mtod(m, struct ether_header *);=0A=
if (ETHER_CMP(eh->ether_dhost, sc->sc_enaddr) &&=0A=
ETHER_CMP(eh->ether_dhost, bcast_enaddr)) {=0A=
+ m_freem(m);=0A=
+ return;=0A=
+ }=0A=
+#endif=0A=
+=0A=
+#ifdef LANCE_VMWARE_BUG=0A=
+ /*=0A=
+ * vmware ethernet hardware emulation loops=0A=
+ * packets back to itself, violates IFF_SIMPLEX.=0A=
+ * drop it if it is from myself.=0A=
+ */=0A=
+ eh =3D mtod(m, struct ether_header *);=0A=
+ if (!ETHER_CMP(eh->ether_shost, sc->sc_enaddr)){=0A=
m_freem(m);=0A=
return;=0A=
}=0A=
------=_NextPart_000_00E7_01C0DE0E.632C2600--