diff options
author | 2019-12-05 14:33:02 +0100 | |
---|---|---|
committer | 2019-12-05 12:25:05 -0800 | |
commit | 5b55633f20ee1bb253dc7d915ec2fd35fd865d5a (patch) | |
tree | 47202fb1a91f6d8fa5731f7a14936a8e53760147 /drivers/s390/net/qeth_core.h | |
parent | net: thunderx: start phy before starting autonegotiation (diff) | |
download | linux-5b55633f20ee1bb253dc7d915ec2fd35fd865d5a.tar.gz linux-5b55633f20ee1bb253dc7d915ec2fd35fd865d5a.tar.bz2 linux-5b55633f20ee1bb253dc7d915ec2fd35fd865d5a.zip |
s390/qeth: guard against runt packets
Depending on a packet's type, the RX path needs to access fields in the
packet headers and thus requires a minimum packet length.
Enforce this length when building the skb.
On the other hand a single runt packet is no reason to drop the whole
RX buffer. So just skip it, and continue processing on the next packet.
Fixes: 4a71df50047f ("qeth: new qeth device driver")
Signed-off-by: Julian Wiedmann <jwi@linux.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/s390/net/qeth_core.h')
-rw-r--r-- | drivers/s390/net/qeth_core.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/s390/net/qeth_core.h b/drivers/s390/net/qeth_core.h index 293dd99b7fef..7cdebd2e329f 100644 --- a/drivers/s390/net/qeth_core.h +++ b/drivers/s390/net/qeth_core.h @@ -480,6 +480,7 @@ struct qeth_card_stats { u64 rx_dropped_nomem; u64 rx_dropped_notsupp; + u64 rx_dropped_runt; /* rtnl_link_stats64 */ u64 rx_packets; |