From: Jamie Gloudon <jamie.gloudon@gmx.fr>
To: netdev@vger.kernel.org
Cc: pabeni@redhat.com, davem@davemloft.net, edumazet@google.com,
kuba@kernel.org, yoshfuji@linux-ipv6.org, dsahern@kernel.org
Subject: [PATCH net v3 1/1] ip6_tunnel: Correct mistake in if statement.
Date: Mon, 7 Nov 2022 04:31:22 -0400 [thread overview]
Message-ID: <Y2jCWvICWQ8AiQyR@gmx.fr> (raw)
Make sure t->dev->flags & IFF_UP is check first for logical reason.
Fixes: 6c1cb4393cc7 ("ip6_tunnel: fix ip6 tunnel lookup in collect_md
mode")
Signed-off-by: Jamie Gloudon <jamie.gloudon@gmx.fr>
---
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
next reply other threads:[~2022-11-07 8:31 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-07 8:31 Jamie Gloudon [this message]
2022-11-07 8:58 ` [PATCH net v3 1/1] ip6_tunnel: Correct mistake in if statement Leon Romanovsky
2022-11-07 17:54 ` Jamie Gloudon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Y2jCWvICWQ8AiQyR@gmx.fr \
--to=jamie.gloudon@gmx.fr \
--cc=davem@davemloft.net \
--cc=dsahern@kernel.org \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=yoshfuji@linux-ipv6.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).