diff options
author | Andreas Herrmann <andreas.herrmann@caviumnetworks.com> | 2015-06-15 12:49:43 +0100 |
---|---|---|
committer | Will Deacon <will.deacon@arm.com> | 2015-06-16 18:25:33 +0100 |
commit | f83dc816a9c76f87ad90723f366700077fb367ea (patch) | |
tree | c46e4a8661a75060903a37c63c17213625ec5359 | |
parent | c8058b88379ef2e72f184ee2be186d99a12beabd (diff) | |
download | kvmtool-f83dc816a9c76f87ad90723f366700077fb367ea.tar.gz |
kvmtool: Fix regression introduced with d2a7ddff4
Since commit d2a7ddff4 (Add minimal support for macvtap) opening
of tap device might fail. lkvm shows
Warning: Config tap device error. Are you root?
virtio_net_request_tap passed wrong pointer for struct ifreq to
TUNSETIFF ioctl.
Signed-off-by: Andreas Herrmann <andreas.herrmann@caviumnetworks.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
-rw-r--r-- | virtio/net.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/virtio/net.c b/virtio/net.c index d59a0d5b..122a9e25 100644 --- a/virtio/net.c +++ b/virtio/net.c @@ -287,7 +287,7 @@ static int virtio_net_request_tap(struct net_dev *ndev, struct ifreq *ifr, if (tapname) strncpy(ifr->ifr_name, tapname, sizeof(ifr->ifr_name)); - ret = ioctl(ndev->tap_fd, TUNSETIFF, &ifr); + ret = ioctl(ndev->tap_fd, TUNSETIFF, ifr); if (ret >= 0) strncpy(ndev->tap_name, ifr->ifr_name, sizeof(ndev->tap_name)); |