diff options
author | bouyer <bouyer@pkgsrc.org> | 2003-01-18 21:17:32 +0000 |
---|---|---|
committer | bouyer <bouyer@pkgsrc.org> | 2003-01-18 21:17:32 +0000 |
commit | 2fab0f6246c80895c9965f360d1c9f710133c34b (patch) | |
tree | f45904e1c962673376f3310d6eee67234666fb4e /emulators | |
parent | 382ac3566e04dff2daa49fa490baa4224190fa0a (diff) | |
download | pkgsrc-2fab0f6246c80895c9965f360d1c9f710133c34b.tar.gz |
If we receive a packet shorter than 60 bytes from the bpf (this can happen
for short packets from local host) pad it to 60 bytes.
Diffstat (limited to 'emulators')
-rw-r--r-- | emulators/simh/distinfo | 3 | ||||
-rw-r--r-- | emulators/simh/patches/patch-ab | 19 |
2 files changed, 21 insertions, 1 deletions
diff --git a/emulators/simh/distinfo b/emulators/simh/distinfo index 113f7946b5f..ab45c544efa 100644 --- a/emulators/simh/distinfo +++ b/emulators/simh/distinfo @@ -1,7 +1,8 @@ -$NetBSD: distinfo,v 1.6 2002/11/06 08:37:46 thorpej Exp $ +$NetBSD: distinfo,v 1.7 2003/01/18 21:17:32 bouyer Exp $ SHA1 (simhv210-0b2.zip) = 841669853d24f7b2b608442806eeaa083f2dd7ab Size (simhv210-0b2.zip) = 1555874 bytes SHA1 (xq_beta5.zip) = a66fe7fecb76737632e262ae40c3d59147071a7e Size (xq_beta5.zip) = 24582 bytes SHA1 (patch-aa) = 29fc614b64358b50e5181a186edf339cd18de17a +SHA1 (patch-ab) = 516740338b0648a7503b2cbac00ff6bbec086c9e diff --git a/emulators/simh/patches/patch-ab b/emulators/simh/patches/patch-ab new file mode 100644 index 00000000000..0d5222703a2 --- /dev/null +++ b/emulators/simh/patches/patch-ab @@ -0,0 +1,19 @@ +$NetBSD: patch-ab,v 1.3 2003/01/18 21:17:34 bouyer Exp $ + +--- sim_ether.c.orig Tue Oct 22 16:34:16 2002 ++++ sim_ether.c Sat Jan 18 18:25:37 2003 +@@ -256,6 +256,14 @@ + /* set data in passed read packet */ + dev->read_packet->len = header->len; + memcpy(dev->read_packet->msg, data, header->len); ++ /* ++ * Pad packet to minimum ethernet len, in case if comes from the local ++ * host. ++ */ ++ if (header->len <60) { ++ dev->read_packet->len = 60; ++ memset(dev->read_packet->msg + header->len, 0, 60 - header->len); ++ } + + #ifdef _DEBUG + eth_packet_trace (dev->read_packet, "reading"); |