diff options
author | bouyer <bouyer> | 2003-01-18 21:17:32 +0000 |
---|---|---|
committer | bouyer <bouyer> | 2003-01-18 21:17:32 +0000 |
commit | 95e547008b9bcaa7dcc20895b4b8309a68a88598 (patch) | |
tree | f45904e1c962673376f3310d6eee67234666fb4e /emulators/simh/patches | |
parent | bdbbe4cecded8e5a89a3298be9faefc0cf80576c (diff) | |
download | pkgsrc-95e547008b9bcaa7dcc20895b4b8309a68a88598.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/simh/patches')
-rw-r--r-- | emulators/simh/patches/patch-ab | 19 |
1 files changed, 19 insertions, 0 deletions
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"); |