Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

net: Removed the device type check to add mpls support for devices

MPLS has no dependency with the device type of underlying devices.
Hence the device type check to add mpls support for devices can be
avoided.

Signed-off-by: Martin Varghese <martin.varghese@nokia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Martin Varghese and committed by
David S. Miller
350e7ab9 73cb1193

+3 -14
+3 -14
net/mpls/af_mpls.c
··· 1584 1584 unsigned int flags; 1585 1585 1586 1586 if (event == NETDEV_REGISTER) { 1587 + mdev = mpls_add_dev(dev); 1588 + if (IS_ERR(mdev)) 1589 + return notifier_from_errno(PTR_ERR(mdev)); 1587 1590 1588 - /* For now just support Ethernet, IPGRE, IP6GRE, SIT and 1589 - * IPIP devices 1590 - */ 1591 - if (dev->type == ARPHRD_ETHER || 1592 - dev->type == ARPHRD_LOOPBACK || 1593 - dev->type == ARPHRD_IPGRE || 1594 - dev->type == ARPHRD_IP6GRE || 1595 - dev->type == ARPHRD_SIT || 1596 - dev->type == ARPHRD_TUNNEL || 1597 - dev->type == ARPHRD_TUNNEL6) { 1598 - mdev = mpls_add_dev(dev); 1599 - if (IS_ERR(mdev)) 1600 - return notifier_from_errno(PTR_ERR(mdev)); 1601 - } 1602 1591 return NOTIFY_OK; 1603 1592 } 1604 1593