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:
Gregory Nutt
2017-07-07 13:03:04 -06:00
parent fcb91c84f0
commit b29c99fa6f
4 changed files with 13 additions and 9 deletions
+1 -1
View File
@@ -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;