]> www.infradead.org Git - users/jedix/linux-maple.git/commit
virtio_net: clear MTU when out of range
authorMichael S. Tsirkin <mst@redhat.com>
Wed, 29 Mar 2017 16:09:14 +0000 (19:09 +0300)
committerSi-Wei Liu <si-wei.liu@oracle.com>
Fri, 15 Sep 2017 18:24:22 +0000 (14:24 -0400)
commitdb0d282eebb65839bbeda810b1e94422d62b4e5c
treece1586f0a35c2147815a15b58a31e36acd601b6d
parentb824a5651820756084cd99079e8fb4f16a6f0257
virtio_net: clear MTU when out of range

virtio attempts to clear the MTU feature bit if the value is out of the
supported range, but this has no real effect since FEATURES_OK has
already been set.

Fix this up by checking the MTU in the new validate callback.

Fixes: 14de9d114a82 ("virtio-net: Add initial MTU advice feature")
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
(cherry picked from commit fe36cbe0671e868cbd2f534a50ac60273fa5acf2)

Orabug: 26584452

Signed-off-by: Si-Wei Liu <si-wei.liu@oracle.com>
Reviewed-by: Joao Martins <joao.m.martins@oracle.com>
Conflicts:
drivers/net/virtio_net.c
Due to the lack of commit d0c2c9973ecd ("net: use core MTU range
checking in virt drivers") the MTU size check is still done in the
virtio_net.
drivers/net/virtio_net.c