mirror of
https://gitee.com/bianbu-linux/linux-6.6
synced 2025-04-24 14:07:52 -04:00
tipc: Fix recognition of trial period
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: e415577f57
("tipc: correct discovery message handling during address trial period")
Signed-off-by: Mark Tomlinson <mark.tomlinson@alliedtelesis.co.nz>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
66ae04368e
commit
28be7ca4fc
1 changed files with 1 additions and 1 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue