提交 cc4ff0f4 编写于 作者: C Chris Packham 提交者: Greg Kroah-Hartman

tipc: initialise addr_trail_end when setting node addresses

[ Upstream commit 8874ecae2977e5a2d4f0ba301364435b81c05938 ]

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: NChris Packham <chris.packham@alliedtelesis.co.nz>
Acked-by: NJon Maloy <jon.maloy@ericsson.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 e89bb758
...@@ -75,6 +75,7 @@ void tipc_set_node_addr(struct net *net, u32 addr) ...@@ -75,6 +75,7 @@ void tipc_set_node_addr(struct net *net, u32 addr)
tipc_set_node_id(net, node_id); tipc_set_node_id(net, node_id);
} }
tn->trial_addr = addr; tn->trial_addr = addr;
tn->addr_trial_end = jiffies;
pr_info("32-bit node address hash set to %x\n", addr); pr_info("32-bit node address hash set to %x\n", addr);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册