diff options
author | Serhey Popovych | 2018-10-09 20:21:01 +0200 |
---|---|---|
committer | David S. Miller | 2018-10-16 06:40:31 +0200 |
commit | df52eab23d703142c766ac00bdb8db19d71238d0 (patch) | |
tree | 6e773bc9e63f98f8adafa6f188d8d814dec1437c /Documentation/networking | |
parent | Merge tag 'wireless-drivers-next-for-davem-2018-10-14' of git://git.kernel.or... (diff) | |
download | kernel-qcow2-linux-df52eab23d703142c766ac00bdb8db19d71238d0.tar.gz kernel-qcow2-linux-df52eab23d703142c766ac00bdb8db19d71238d0.tar.xz kernel-qcow2-linux-df52eab23d703142c766ac00bdb8db19d71238d0.zip |
tun: Consistently configure generic netdev params via rtnetlink
Configuring generic network device parameters on tun will fail in
presence of IFLA_INFO_KIND attribute in IFLA_LINKINFO nested attribute
since tun_validate() always return failure.
This can be visualized with following ip-link(8) command sequences:
# ip link set dev tun0 group 100
# ip link set dev tun0 group 100 type tun
RTNETLINK answers: Invalid argument
with contrast to dummy and veth drivers:
# ip link set dev dummy0 group 100
# ip link set dev dummy0 type dummy
# ip link set dev veth0 group 100
# ip link set dev veth0 group 100 type veth
Fix by returning zero in tun_validate() when @data is NULL that is
always in case since rtnl_link_ops->maxtype is zero in tun driver.
Fixes: f019a7a594d9 ("tun: Implement ip link del tunXXX")
Signed-off-by: Serhey Popovych <serhe.popovych@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'Documentation/networking')
0 files changed, 0 insertions, 0 deletions