git: if_vtnet - Fix potential vtnet_set_hwaddr call before virtqueues are set up.
ivadasz at crater.dragonflybsd.org
Sun Sep 10 15:30:35 PDT 2017
Author: Imre VadÃ¡sz <imre at vdsz.com>
Date: Mon Sep 11 00:21:24 2017 +0200
if_vtnet - Fix potential vtnet_set_hwaddr call before virtqueues are set up.
* When VIRTIO_NET_F_MAC isn't negotiated (i.e. the host doesn't give us
a macaddress), we generate a random mac address. The vtnet_set_hwaddr()
call to set this mac address, would have tried to use the control
virtqueue too early, where it isn't yet allocated.
* To fix this case, do the vtnet_set_hwaddr() call for this a bit later,
after the virtqueues have been set up. (We are already disabling
promiscuous mode there, so we know the controlq is working there)
Summary of changes:
sys/dev/virtual/virtio/net/if_vtnet.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
DragonFly BSD source repository
More information about the Commits