From: Chris Packham Date: Sun, 11 Aug 2019 20:18:25 +0000 (+1200) Subject: tipc: initialise addr_trail_end when setting node addresses X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=8874ecae2977e5a2d4f0ba301364435b81c05938;p=openwrt%2Fstaging%2Fblogic.git tipc: initialise addr_trail_end when setting node addresses 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 Acked-by: Jon Maloy Signed-off-by: David S. Miller --- diff --git a/net/tipc/addr.c b/net/tipc/addr.c index b88d48d00913..0f1eaed1bd1b 100644 --- a/net/tipc/addr.c +++ b/net/tipc/addr.c @@ -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); }