Skip to content

Commit

Permalink
tipc: initialise addr_trail_end when setting node addresses
Browse files Browse the repository at this point in the history
We set the field 'addr_trial_end' to 'jiffies', instead of the current
value 0, at the moment the node address is initialized. This guarantees
we don't inadvertently enter an address trial period when the node
address is explicitly set by the user.

Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
Acked-by: Jon Maloy <jon.maloy@ericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Chris Packham authored and David S. Miller committed Aug 12, 2019
1 parent 5879986 commit 8874eca
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions net/tipc/addr.c
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ void tipc_set_node_addr(struct net *net, u32 addr)
tipc_set_node_id(net, node_id);
}
tn->trial_addr = addr;
tn->addr_trial_end = jiffies;
pr_info("32-bit node address hash set to %x\n", addr);
}

Expand Down

0 comments on commit 8874eca

Please sign in to comment.