* [PATCH net-next] net: ipv6: Refactor in rt6_age_examine_exception
@ 2021-04-01 3:22 Xu Jia
2021-04-01 22:50 ` patchwork-bot+netdevbpf
0 siblings, 1 reply; 2+ messages in thread
From: Xu Jia @ 2021-04-01 3:22 UTC (permalink / raw)
To: davem, yoshfuji, dsahern, kuba; +Cc: netdev, linux-kernel, Xu Jia
The logic in rt6_age_examine_exception is confusing. The commit is
to refactor the code.
Signed-off-by: Xu Jia <xujia39@huawei.com>
---
net/ipv6/route.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index ebb7519bec2a..f15c7605b11d 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -2085,13 +2085,10 @@ static void rt6_age_examine_exception(struct rt6_exception_bucket *bucket,
if (rt->rt6i_flags & RTF_GATEWAY) {
struct neighbour *neigh;
- __u8 neigh_flags = 0;
neigh = __ipv6_neigh_lookup_noref(rt->dst.dev, &rt->rt6i_gateway);
- if (neigh)
- neigh_flags = neigh->flags;
- if (!(neigh_flags & NTF_ROUTER)) {
+ if (!(neigh && (neigh->flags & NTF_ROUTER))) {
RT6_TRACE("purging route %p via non-router but gateway\n",
rt);
rt6_remove_exception(bucket, rt6_ex);
--
2.25.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net-next] net: ipv6: Refactor in rt6_age_examine_exception
2021-04-01 3:22 [PATCH net-next] net: ipv6: Refactor in rt6_age_examine_exception Xu Jia
@ 2021-04-01 22:50 ` patchwork-bot+netdevbpf
0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-04-01 22:50 UTC (permalink / raw)
To: Xu Jia; +Cc: davem, yoshfuji, dsahern, kuba, netdev, linux-kernel
Hello:
This patch was applied to netdev/net-next.git (refs/heads/master):
On Thu, 1 Apr 2021 11:22:23 +0800 you wrote:
> The logic in rt6_age_examine_exception is confusing. The commit is
> to refactor the code.
>
> Signed-off-by: Xu Jia <xujia39@huawei.com>
> ---
> net/ipv6/route.c | 5 +----
> 1 file changed, 1 insertion(+), 4 deletions(-)
Here is the summary with links:
- [net-next] net: ipv6: Refactor in rt6_age_examine_exception
https://git.kernel.org/netdev/net-next/c/b7a320c3a1ec
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-04-01 22:50 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-01 3:22 [PATCH net-next] net: ipv6: Refactor in rt6_age_examine_exception Xu Jia
2021-04-01 22:50 ` patchwork-bot+netdevbpf
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).