Though the queue were in fact created by open(), we still need to add this check
to be compatible with tuntap which can let mgmt software use a single API to
manage queues. This patch only validates the device name and moves the TUNSETIFF
to a helper.
Signed-off-by: Jason Wang <jasowang@xxxxxxxxxx>
---
drivers/net/macvtap.c | 51 ++++++++++++++++++++++++++++++++++++++----------
1 files changed, 40 insertions(+), 11 deletions(-)
diff --git a/drivers/net/macvtap.c b/drivers/net/macvtap.c
index e76484c..eac49cb 100644
--- a/drivers/net/macvtap.c
+++ b/drivers/net/macvtap.c
@@ -870,6 +870,7 @@ out:
return ret;
}
+
static struct macvlan_dev *macvtap_get_vlan(struct macvtap_queue *q)[...]
{
struct macvlan_dev *vlan;