[Simh] sim_ether.c bug
Thomas Pfau
pfau at nbpfaus.net
Fri Mar 2 18:41:17 EST 2007
I just downloaded simh 3.7 and had trouble getting it to work with the
configuration I had been using successfully with 3.3-2. After a little
debugging I found a problem in sim_ether.c. It attempts to remove
non-ethernet devices but when it thinks it has found one it actually
removes the *next* device in the list. The simple patch below fixes it.
---- cut here ----
--- sim_ether.c~ 2006-10-15 14:58:04.000000000 -0400
+++ sim_ether.c 2007-02-10 15:51:08.000000000 -0500
@@ -1188,7 +1188,7 @@
if (NULL != conn) datalink = pcap_datalink(conn), pcap_close(conn);
if ((NULL == conn) || (datalink != DLT_EN10MB)) {
for (j=i+1; j<used; ++j)
- list[j] = list[j+1];
+ list[j-1] = list[j];
--used;
--i;
}
---- cut here ----
--
tom_p
pfau at nbpfaus.net -- http://nbpfaus.net/~pfau/
More information about the Simh
mailing list