diff mbox

[net] Revert "dev: set iflink to 0 for virtual interfaces"

Message ID 1436196310-4090-1-git-send-email-nicolas.dichtel@6wind.com
State Accepted, archived
Delegated to: David Miller
Headers show

Commit Message

Nicolas Dichtel July 6, 2015, 3:25 p.m. UTC
This reverts commit e1622baf54df8cc958bf29d71de5ad545ea7d93c.

The side effect of this commit is to add a '@NONE' after each virtual
interface name with a 'ip link'. It may break existing scripts.

Reported-by: Olivier Hartkopp <socketcan@hartkopp.net>
Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
---
 net/core/dev.c | 4 ----
 1 file changed, 4 deletions(-)

Comments

Oliver Hartkopp July 6, 2015, 4:38 p.m. UTC | #1
On 06.07.2015 17:25, Nicolas Dichtel wrote:
> This reverts commit e1622baf54df8cc958bf29d71de5ad545ea7d93c.
>
> The side effect of this commit is to add a '@NONE' after each virtual
> interface name with a 'ip link'. It may break existing scripts.
>
> Reported-by: Olivier Hartkopp <socketcan@hartkopp.net>
                   ^^^
> Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>

Tested-by: Oliver Hartkopp <socketcan@hartkopp.net>

Thanks Nicolas!

BR
Oliver

> ---
>   net/core/dev.c | 4 ----
>   1 file changed, 4 deletions(-)
>
> diff --git a/net/core/dev.c b/net/core/dev.c
> index 6778a9999d52..72e0a4331154 100644
> --- a/net/core/dev.c
> +++ b/net/core/dev.c
> @@ -677,10 +677,6 @@ int dev_get_iflink(const struct net_device *dev)
>   	if (dev->netdev_ops && dev->netdev_ops->ndo_get_iflink)
>   		return dev->netdev_ops->ndo_get_iflink(dev);
>
> -	/* If dev->rtnl_link_ops is set, it's a virtual interface. */
> -	if (dev->rtnl_link_ops)
> -		return 0;
> -
>   	return dev->ifindex;
>   }
>   EXPORT_SYMBOL(dev_get_iflink);
>
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
David Miller July 8, 2015, 10:52 p.m. UTC | #2
From: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Date: Mon,  6 Jul 2015 17:25:10 +0200

> This reverts commit e1622baf54df8cc958bf29d71de5ad545ea7d93c.
> 
> The side effect of this commit is to add a '@NONE' after each virtual
> interface name with a 'ip link'. It may break existing scripts.
> 
> Reported-by: Olivier Hartkopp <socketcan@hartkopp.net>
> Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>

Applied and queued up for -stable, thanks.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/net/core/dev.c b/net/core/dev.c
index 6778a9999d52..72e0a4331154 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -677,10 +677,6 @@  int dev_get_iflink(const struct net_device *dev)
 	if (dev->netdev_ops && dev->netdev_ops->ndo_get_iflink)
 		return dev->netdev_ops->ndo_get_iflink(dev);
 
-	/* If dev->rtnl_link_ops is set, it's a virtual interface. */
-	if (dev->rtnl_link_ops)
-		return 0;
-
 	return dev->ifindex;
 }
 EXPORT_SYMBOL(dev_get_iflink);