[<prev] [next>] [day] [month] [year] [list]
Message-ID: <Y2fLHktrN7+Budg/@gmx.fr>
Date: Sun, 6 Nov 2022 10:56:30 -0400
From: Jamie Gloudon <jamie.gloudon@....fr>
To: netdev@...r.kernel.org
Subject: [PATCH] Correct mistake order of checking in if statement. Make sure
t->dev->flags & IFF_UP is check first.
---
net/ipv6/ip6_tunnel.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/ipv6/ip6_tunnel.c b/net/ipv6/ip6_tunnel.c
index 2fb4c6ad7243..22c71f991bb7 100644
--- a/net/ipv6/ip6_tunnel.c
+++ b/net/ipv6/ip6_tunnel.c
@@ -162,7 +162,7 @@ ip6_tnl_lookup(struct net *net, int link,
return cand;
t = rcu_dereference(ip6n->collect_md_tun);
- if (t && t->dev->flags & IFF_UP)
+ if (t && (t->dev->flags & IFF_UP))
return t;
t = rcu_dereference(ip6n->tnls_wc[0]);
--
2.28.0
Powered by blists - more mailing lists