tun.c (6402c7dc2a19c19bd8cdc7d80878b850da418942) tun.c (e8dbad66ef56074eadb41ed5998acd2320447018)
1/*
2 * TUN - Universal TUN/TAP device driver.
3 * Copyright (C) 1999-2002 Maxim Krasnyansky <maxk@qualcomm.com>
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.

--- 1579 unchanged lines hidden (view full) ---

1588 if (err < 0)
1589 return err;
1590
1591 err = tun_attach(tun, file);
1592 if (err < 0)
1593 return err;
1594
1595 if (tun->flags & TUN_TAP_MQ &&
1/*
2 * TUN - Universal TUN/TAP device driver.
3 * Copyright (C) 1999-2002 Maxim Krasnyansky <maxk@qualcomm.com>
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.

--- 1579 unchanged lines hidden (view full) ---

1588 if (err < 0)
1589 return err;
1590
1591 err = tun_attach(tun, file);
1592 if (err < 0)
1593 return err;
1594
1595 if (tun->flags & TUN_TAP_MQ &&
1596 (tun->numqueues + tun->numdisabled > 1))
1597 return -EBUSY;
1596 (tun->numqueues + tun->numdisabled > 1)) {
1597 /* One or more queue has already been attached, no need
1598 * to initialize the device again.
1599 */
1600 return 0;
1601 }
1598 }
1599 else {
1600 char *name;
1601 unsigned long flags = 0;
1602 int queues = ifr->ifr_flags & IFF_MULTI_QUEUE ?
1603 MAX_TAP_QUEUES : 1;
1604
1605 if (!ns_capable(net->user_ns, CAP_NET_ADMIN))

--- 697 unchanged lines hidden ---
1602 }
1603 else {
1604 char *name;
1605 unsigned long flags = 0;
1606 int queues = ifr->ifr_flags & IFF_MULTI_QUEUE ?
1607 MAX_TAP_QUEUES : 1;
1608
1609 if (!ns_capable(net->user_ns, CAP_NET_ADMIN))

--- 697 unchanged lines hidden ---