Skip to content

Commit

Permalink
net: Removed the device type check to add mpls support for devices
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
Martin Varghese authored and davem330 committed Jul 27, 2020
1 parent 73cb119 commit 350e7ab
Showing 1 changed file with 3 additions and 14 deletions.
17 changes: 3 additions & 14 deletions net/mpls/af_mpls.c
Original file line number Diff line number Diff line change
Expand Up @@ -1584,21 +1584,10 @@ static int mpls_dev_notify(struct notifier_block *this, unsigned long event,
unsigned int flags;

if (event == NETDEV_REGISTER) {
mdev = mpls_add_dev(dev);
if (IS_ERR(mdev))
return notifier_from_errno(PTR_ERR(mdev));

/* For now just support Ethernet, IPGRE, IP6GRE, SIT and
* IPIP devices
*/
if (dev->type == ARPHRD_ETHER ||
dev->type == ARPHRD_LOOPBACK ||
dev->type == ARPHRD_IPGRE ||
dev->type == ARPHRD_IP6GRE ||
dev->type == ARPHRD_SIT ||
dev->type == ARPHRD_TUNNEL ||
dev->type == ARPHRD_TUNNEL6) {
mdev = mpls_add_dev(dev);
if (IS_ERR(mdev))
return notifier_from_errno(PTR_ERR(mdev));
}
return NOTIFY_OK;
}

Expand Down

0 comments on commit 350e7ab

Please sign in to comment.