diff mbox series

[net-next] net: Enabled MPLS support for devices of type ARPHRD_NONE.

Message ID 1595434401-6345-1-git-send-email-martinvarghesenokia@gmail.com
State Changes Requested
Delegated to: David Miller
Headers show
Series [net-next] net: Enabled MPLS support for devices of type ARPHRD_NONE. | expand

Commit Message

Martin Varghese July 22, 2020, 4:13 p.m. UTC
From: Martin Varghese <martin.varghese@nokia.com>

This change enables forwarding of MPLS packets from bareudp tunnel
device which is of type ARPHRD_NONE.

Signed-off-by: Martin Varghese <martin.varghese@nokia.com>
---
 net/mpls/af_mpls.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

David Miller July 23, 2020, 10 p.m. UTC | #1
From: Martin Varghese <martinvarghesenokia@gmail.com>
Date: Wed, 22 Jul 2020 21:43:21 +0530

> From: Martin Varghese <martin.varghese@nokia.com>
> 
> This change enables forwarding of MPLS packets from bareudp tunnel
> device which is of type ARPHRD_NONE.
> 
> Signed-off-by: Martin Varghese <martin.varghese@nokia.com>

This restriction looks just like a massive guessing game.

What is needed by MPLS by a device specifically, and can therefore
this restrictive test be removed entirely?
Varghese, Martin (Nokia - IN/Bangalore) July 27, 2020, 6:57 a.m. UTC | #2
>> From: Martin Varghese <martin.varghese@nokia.com>
>> 
>> This change enables forwarding of MPLS packets from bareudp tunnel 
>> device which is of type ARPHRD_NONE.
>> 
>> Signed-off-by: Martin Varghese <martin.varghese@nokia.com>

> This restriction looks just like a massive guessing game.

> What is needed by MPLS by a device specifically, and can therefore this restrictive test be removed entirely?

I think so . I  will send out a different patch which removes the complete check.
diff mbox series

Patch

diff --git a/net/mpls/af_mpls.c b/net/mpls/af_mpls.c
index fd30ea61336e..37b6731a4576 100644
--- a/net/mpls/af_mpls.c
+++ b/net/mpls/af_mpls.c
@@ -1594,7 +1594,8 @@  static int mpls_dev_notify(struct notifier_block *this, unsigned long event,
 		    dev->type == ARPHRD_IP6GRE ||
 		    dev->type == ARPHRD_SIT ||
 		    dev->type == ARPHRD_TUNNEL ||
-		    dev->type == ARPHRD_TUNNEL6) {
+		    dev->type == ARPHRD_TUNNEL6 ||
+		    dev->type == ARPHRD_NONE) {
 			mdev = mpls_add_dev(dev);
 			if (IS_ERR(mdev))
 				return notifier_from_errno(PTR_ERR(mdev));