]> git.kernelconcepts.de Git - karo-tx-linux.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)
committerMichael S. Tsirkin <mst@redhat.com>
Fri, 7 Apr 2017 13:38:59 +0000 (16:38 +0300)
commitfe36cbe0671e868cbd2f534a50ac60273fa5acf2
tree0afa0bfd5cc28f9715d2540fafeb0b49ff3ef81d
parent404123c2db798027e852480ed9c4accef9f1d9e6
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>
drivers/net/virtio_net.c