]> git.baikalelectronics.ru Git - kernel.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)
commit5bff742b82cd33727125c8830d33566bb554bff8
tree0afa0bfd5cc28f9715d2540fafeb0b49ff3ef81d
parent391dc9ba632db90c4c3f467eb406c1c581ed0e4f
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: 96149bb4f330 ("virtio-net: Add initial MTU advice feature")
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
drivers/net/virtio_net.c