diff options
| author | Luigi Rizzo <luigi@FreeBSD.org> | 2001-02-08 22:21:30 +0000 |
|---|---|---|
| committer | Luigi Rizzo <luigi@FreeBSD.org> | 2001-02-08 22:21:30 +0000 |
| commit | 338cdb139baf720eacc11415b41f5fccd40a7b8b (patch) | |
| tree | 13bd48bec216d9f3c04e865e814d4120ce505248 /sys/dev/ed | |
| parent | 11c0c4ae55815250d01029a883201a7908242fd1 (diff) | |
Notes
Diffstat (limited to 'sys/dev/ed')
| -rw-r--r-- | sys/dev/ed/if_ed.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/dev/ed/if_ed.c b/sys/dev/ed/if_ed.c index 2c0967c747325..1d877cbfb4a4d 100644 --- a/sys/dev/ed/if_ed.c +++ b/sys/dev/ed/if_ed.c @@ -2174,8 +2174,10 @@ ed_rint(sc) * we have a length that will fit into one mbuf cluster or less; * the upper layer protocols can then figure out the length from * their own length field(s). + * But make sure that we have at least a full ethernet header + * or we would be unable to call ether_input() later. */ - if ((len > sizeof(struct ed_ring)) && + if ((len > sizeof(struct ed_ring) + ETHER_HDR_LEN) && (len <= MCLBYTES) && (packet_hdr.next_packet >= sc->rec_page_start) && (packet_hdr.next_packet < sc->rec_page_stop)) { |
