vti: don't allow to add the same tunnel twice
vti: don't allow to add the same tunnel twice

Before the patch, it was possible to add two times the same tunnel:
ip l a vti1 type vti remote 10.16.0.121 local 10.16.0.249 key 41
ip l a vti2 type vti remote 10.16.0.121 local 10.16.0.249 key 41

It was possible, because ip_tunnel_newlink() calls ip_tunnel_find() with the
argument dev->type, which was set only later (when calling ndo_init handler
in register_netdevice()). Let's set this type in the setup handler, which is
called before newlink handler.

Introduced by commit b9959fd3b0fa ("vti: switch to new ip tunnel code").

CC: Cong Wang <b08afa93ec8eabe95bc97d12956ca699fa65834c@redhat.com>
CC: Steffen Klassert <66deb1d63f85161cc287ce2bac0c65cb5ae958a7@secunet.com>
Signed-off-by: Nicolas Dichtel <7864bb1e0e12322ea18ea731d051b95b75140567@6wind.com>
Signed-off-by: David S. Miller <fe08d3c717adf2ae63592e4c9aec6e3e404d8e3e@davemloft.net>

KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs