Merge branch 'tunnels'

Nicolas Dichtel says:

====================
tunnels: don't allow to add the same tunnel twice

This series fixes the check of an existing tunnel with the same
parameters when a new tunnel is added. I've checked all users of
ip_tunnel_newlink(): gre, gretap, ipip and vti. The bug exists only
for gre and vti.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>

+2 -2
+1 -1
net/ipv4/ip_gre.c
··· 463 463 static void ipgre_tunnel_setup(struct net_device *dev) 464 464 { 465 465 dev->netdev_ops = &ipgre_netdev_ops; 466 + dev->type = ARPHRD_IPGRE; 466 467 ip_tunnel_setup(dev, ipgre_net_id); 467 468 } 468 469 ··· 502 501 memcpy(dev->dev_addr, &iph->saddr, 4); 503 502 memcpy(dev->broadcast, &iph->daddr, 4); 504 503 505 - dev->type = ARPHRD_IPGRE; 506 504 dev->flags = IFF_NOARP; 507 505 dev->priv_flags &= ~IFF_XMIT_DST_RELEASE; 508 506 dev->addr_len = 4;
+1 -1
net/ipv4/ip_vti.c
··· 337 337 static void vti_tunnel_setup(struct net_device *dev) 338 338 { 339 339 dev->netdev_ops = &vti_netdev_ops; 340 + dev->type = ARPHRD_TUNNEL; 340 341 ip_tunnel_setup(dev, vti_net_id); 341 342 } 342 343 ··· 349 348 memcpy(dev->dev_addr, &iph->saddr, 4); 350 349 memcpy(dev->broadcast, &iph->daddr, 4); 351 350 352 - dev->type = ARPHRD_TUNNEL; 353 351 dev->hard_header_len = LL_MAX_HEADER + sizeof(struct iphdr); 354 352 dev->mtu = ETH_DATA_LEN; 355 353 dev->flags = IFF_NOARP;