Subject: mopd bug fixed
To: None <ragge@ludd.luth.se>
From: None <jkunz@unixag-kl.fh-kl.de>
List: port-vax
Date: 01/10/2000 18:02:37
Hi.
When the NetBSD mopd is started the first load attempt fails:
--- cut ---
[root@MissSophie ~]# /usr/sbin/mopd -d ex0
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
MOP RC 8:0:2b:25:f6:6a > ab:0:0:2:0:0 len 37 code 07 SID
MOP DL 802.3 8:0:2b:25:f6:6a > ab:0:0:1:0:0 len 47 code 08 RPR
MOP DL 802.3 0:60:97:75:71:df > 8:0:2b:25:f6:6a len 9 code 03 ASV
MOP DL 802.3 8:0:2b:25:f6:6a > 0:60:97:75:71:df len 47 code 08 RPR
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
--- 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.
So I looked at the code and found the bug:
--- 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 == DL_STATUS_FREE) {
if (slot == -1) {
slot = i;
- memmove((char *)dst,
- (char *)dllist[i].eaddr, 6);
+ memmove((char *)dllist[i].eaddr,
+ (char *)dst, 6);
}
}
}
--- paste ---
Ragge: Will you check in the fix or should I write a pr?
The Linux-mopd is not affected by this bug.
--
tschüß,
Jochen
Homepage: http://www.unixag-kl.fh-kl.de/~jkunz/