linux/drivers/net
Serhey Popovych df52eab23d 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: f019a7a594 ("tun: Implement ip link del tunXXX")
Signed-off-by: Serhey Popovych <serhe.popovych@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2018-10-15 21:40:31 -07:00
..
appletalk net/appletalk: fix minor pointer leak to userspace in SIOCFINDIPDDPRT 2018-09-13 10:35:57 -07:00
arcnet
bonding bonding: fix warning message 2018-10-02 15:55:16 -07:00
caif
can can: Remove SKB list assumptions in rx-offload.c 2018-09-10 10:06:54 -07:00
dsa net: dsa: bcm_sf2: Call setup during switch resume 2018-10-11 15:19:54 -07:00
ethernet Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2018-10-12 21:38:46 -07:00
fddi net: fddi: skfp: Remove unused macros 'PNMI_GET_ID' and 'PNMI_SET_ID' 2018-10-12 09:46:22 -07:00
fjes
hamradio yam: fix a missing-check bug 2018-10-05 11:54:55 -07:00
hippi
hyperv hv_netvsc: remove ndo_poll_controller 2018-10-02 22:57:34 -07:00
ieee802154 Merge branch 'ieee802154-for-davem-2018-10-04' of git://git.kernel.org/pub/scm/linux/kernel/git/sschmidt/wpan-next 2018-10-04 09:32:48 -07:00
ipvlan
netdevsim bpf: add verifier callback to get stack usage info for offloaded progs 2018-10-08 10:24:12 +02:00
phy Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2018-10-12 21:38:46 -07:00
plip
ppp Merge ra.kernel.org:/pub/scm/linux/kernel/git/davem/net 2018-09-18 09:33:27 -07:00
slip
team team: Forbid enslaving team device to itself 2018-10-04 13:55:40 -07:00
usb Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2018-10-12 21:38:46 -07:00
vmxnet3
wan net: wan: remove redundant include 2018-09-18 20:08:08 -07:00
wimax wimax/i2400m: fix spelling mistake "not unitialized" -> "uninitialized" 2018-09-26 20:09:58 -07:00
wireless Merge ath-next from git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git 2018-10-14 12:21:43 +03:00
xen-netback Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2018-10-03 21:00:17 -07:00
Kconfig
LICENSE.SRC
Makefile
Space.c
dummy.c
eql.c
geneve.c geneve: allow to clear ttl inherit 2018-10-04 13:54:30 -07:00
gtp.c
ifb.c
loopback.c net: move definition of pcpu_lstats to header file 2018-09-14 08:32:23 -07:00
macsec.c DRIVERS: net: macsec: Fix multiple coding style issues 2018-09-21 18:57:20 -07:00
macvlan.c
macvtap.c
mdio.c
mii.c
net_failover.c failover: Fix error return code in net_failover_create 2018-09-08 10:28:56 -07:00
netconsole.c
nlmon.c net: move definition of pcpu_lstats to header file 2018-09-14 08:32:23 -07:00
ntb_netdev.c
rionet.c
sb1000.c
sungem_phy.c
tap.c net: tap: remove redundant null pointer check before kfree_skb 2018-09-21 09:04:37 -07:00
thunderbolt.c
tun.c tun: Consistently configure generic netdev params via rtnetlink 2018-10-15 21:40:31 -07:00
veth.c veth: rename pcpu_vstats as pcpu_lstats 2018-09-18 19:52:23 -07:00
virtio_net.c virtio_net: ethtool tx napi configuration 2018-10-10 22:34:38 -07:00
vrf.c ipv6: add vrf table handling code for ipv6 mcast 2018-10-02 22:29:08 -07:00
vsockmon.c net: move definition of pcpu_lstats to header file 2018-09-14 08:32:23 -07:00
vxlan.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2018-10-03 21:00:17 -07:00
xen-netfront.c xen/netfront: don't bug in case of too many frags 2018-09-13 08:22:15 -07:00