]> git.baikalelectronics.ru Git - kernel.git/commit
tipc: Fix recognition of trial period
authorMark Tomlinson <mark.tomlinson@alliedtelesis.co.nz>
Mon, 10 Oct 2022 02:46:13 +0000 (15:46 +1300)
committerDavid S. Miller <davem@davemloft.net>
Fri, 14 Oct 2022 07:17:52 +0000 (08:17 +0100)
commit094f35875aa23d942e69f4e329d10884e4cc3c3a
tree48ef789d9109b965ff5bed4da716b51790e10ff1
parentf9048568793158e155bf213fe6a505efff684074
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: 41f882000ba8 ("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>
net/tipc/discover.c