mirror of
https://github.com/apache/nuttx.git
synced 2026-05-28 03:45:50 +08:00
Move TUN ioctl commnd to include/nuttx/net/ioctl.h so that it will always be unique. It a error in netdev_register: it was not handling device names properly when TUN is the only network device.
This commit is contained in:
+1
-1
@@ -1155,7 +1155,7 @@ static int tun_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
|
||||
FAR struct tun_device_s *priv = filep->f_priv;
|
||||
int ret = OK;
|
||||
|
||||
if (cmd == TUNSETIFF && !priv)
|
||||
if (cmd == TUNSETIFF && priv == NULL)
|
||||
{
|
||||
uint8_t free_tuns;
|
||||
int intf;
|
||||
|
||||
Reference in New Issue
Block a user