Subject: Re: mopd bug fixed
To: None <jkunz@unixag-kl.fh-kl.de>
From: David Brownlee <abs@netbsd.org>
List: port-vax
Date: 01/10/2000 19:57:27
=09I was in the area so I've just checked it in to -current.
=09I'll see if we can get it into 1.4.2 also..
=09Thanks!
=09=09David/absolute
On Mon, 10 Jan 2000 jkunz@unixag-kl.fh-kl.de wrote:
> Hi.
>=20
> When the NetBSD mopd is started the first load attempt fails:
> --- cut ---
> [root@MissSophie ~]# /usr/sbin/mopd -d ex0 =20
> mopd: not running as daemon, -d given.
> MOP RC 802.3 8:0:2b:25:f6:6a > ab:0:0:2:0:0 len 45 code 07 SID=
=20
> MOP RC 8:0:2b:25:f6:6a > ab:0:0:2:0:0 len 37 code 07 SID=20
> MOP DL 802.3 8:0:2b:25:f6:6a > ab:0:0:1:0:0 len 47 code 08 RPR=
=20
> MOP DL 802.3 0:60:97:75:71:df > 8:0:2b:25:f6:6a len 9 code 03 ASV=
=20
> MOP DL 802.3 8:0:2b:25:f6:6a > 0:60:97:75:71:df len 47 code 08 RPR=
=20
> Native Image (VAX)
> Header Block Count: 1
> Image Size: 00011400
> Load Address: 00000000
> Transfer Address: 00000000
> MOP DL 802.3 0:60:97:75:71:df > 0:0:0:0:0:0 len 1498 code 02 MLD=
=20
> --- paste ---
> And then the load hangs. The last line indicates some error in the
> code, because the Ethernet address is wrong. The second load attempt is
> successfull and the Ethernet address is showen correctly.
>=20
> So I looked at the code and found the bug:=20
> --- cut ---
> --- /usr/src/usr.sbin/mopd/mopd/process.c.orig Fri Oct 17 21:20:29 1997
> +++ /usr/src/usr.sbin/mopd/mopd/process.c Sun Jan 9 19:49:18 2000
> @@ -246,8 +246,8 @@
> if (dllist[i].status =3D=3D DL_STATUS_FREE) {
> if (slot =3D=3D -1) {
> slot =3D i;
> - memmove((char *)dst,
> - (char *)dllist[i].eaddr, 6);
> + memmove((char *)dllist[i].eaddr,
> + (char *)dst, 6);
> }
> }
> }
> --- paste ---
>=20
> Ragge: Will you check in the fix or should I write a pr?=20
>=20
> The Linux-mopd is not affected by this bug.=20
> --=20
>=20
>=20
>=20
> tsch=FC=DF,
> Jochen
>=20
> Homepage: http://www.unixag-kl.fh-kl.de/~jkunz/
>=20