* [PATCH] tipc: Fix recognition of trial period
@ 2022-10-10 2:46 Mark Tomlinson
2022-10-14 7:40 ` patchwork-bot+netdevbpf
0 siblings, 1 reply; 2+ messages in thread
From: Mark Tomlinson @ 2022-10-10 2:46 UTC (permalink / raw)
To: jmaloy, ying.xue, davem
Cc: netdev, tipc-discussion, linux-kernel, Mark Tomlinson
The trial period exists until jiffies is after addr_trial_end. But as
jiffies will eventually overflow, just using time_after will eventually
give incorrect results. As the node address is set once the trial period
ends, this can be used to know that we are not in the trial period.
Fixes: e415577f57f4 ("tipc: correct discovery message handling during address trial period")
Signed-off-by: Mark Tomlinson <mark.tomlinson@alliedtelesis.co.nz>
---
net/tipc/discover.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/tipc/discover.c b/net/tipc/discover.c
index da69e1abf68f..e8630707901e 100644
--- a/net/tipc/discover.c
+++ b/net/tipc/discover.c
@@ -148,8 +148,8 @@ static bool tipc_disc_addr_trial_msg(struct tipc_discoverer *d,
{
struct net *net = d->net;
struct tipc_net *tn = tipc_net(net);
- bool trial = time_before(jiffies, tn->addr_trial_end);
u32 self = tipc_own_addr(net);
+ bool trial = time_before(jiffies, tn->addr_trial_end) && !self;
if (mtyp == DSC_TRIAL_FAIL_MSG) {
if (!trial)
--
2.38.0
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [PATCH] tipc: Fix recognition of trial period
2022-10-10 2:46 [PATCH] tipc: Fix recognition of trial period Mark Tomlinson
@ 2022-10-14 7:40 ` patchwork-bot+netdevbpf
0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2022-10-14 7:40 UTC (permalink / raw)
To: Mark Tomlinson
Cc: jmaloy, ying.xue, davem, netdev, tipc-discussion, linux-kernel
Hello:
This patch was applied to netdev/net.git (master)
by David S. Miller <davem@davemloft.net>:
On Mon, 10 Oct 2022 15:46:13 +1300 you wrote:
> The trial period exists until jiffies is after addr_trial_end. But as
> jiffies will eventually overflow, just using time_after will eventually
> give incorrect results. As the node address is set once the trial period
> ends, this can be used to know that we are not in the trial period.
>
> Fixes: e415577f57f4 ("tipc: correct discovery message handling during address trial period")
> Signed-off-by: Mark Tomlinson <mark.tomlinson@alliedtelesis.co.nz>
>
> [...]
Here is the summary with links:
- tipc: Fix recognition of trial period
https://git.kernel.org/netdev/net/c/28be7ca4fcfd
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:[~2022-10-14 7:40 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-10 2:46 [PATCH] tipc: Fix recognition of trial period Mark Tomlinson
2022-10-14 7:40 ` 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
all inboxes | Powered by JetHome®