Home
last modified time | relevance | path

Searched hist:"0 f16bc1355bab719958577b2e519a8cef1637b28" (Results 1 – 1 of 1) sorted by relevance

/openbmc/linux/drivers/net/
H A Dtun.cdiff 0f16bc1355bab719958577b2e519a8cef1637b28 Tue Oct 25 09:26:09 CDT 2016 Gao Feng <fgao@ikuai8.com> driver: tun: Move tun check into the block of TUNSETIFF condition check

When cmd is TUNSETIFF and tun is not null, the original codes go ahead,
then reach the default case of switch(cmd) and set the ret is -EINVAL.
It is not clear for readers.

Now move the tun check into the block of TUNSETIFF condition check, and
return -EEXIST instead of -EINVAL when the tfile already owns one tun.

Signed-off-by: Gao Feng <fgao@ikuai8.com>
Signed-off-by: David S. Miller <davem@davemloft.net>