mptcp: add netlink pm addr entry refcount

This patch adds the refcount of address entry in netlink PM. Initiate
'refcont' of every address entry to 1.

Increase this refcount counter when a subflow connecting or an address
signaling in mptcp_pm_nl_add_addr_doit(), fill_local_addresses_vec() and
mptcp_pm_create_subflow_or_signal_addr().

Decrease it when deleting an address in mptcp_pm_nl_del_addr_doit().
When the counter reaches 1, then free this entry.

Signed-off-by: Geliang Tang <geliang.tang@suse.com>
1 file changed