selftests: mptcp: netlink: add change_address helper
authorGeliang Tang <tanggeliang@kylinos.cn>
Fri, 5 Apr 2024 10:52:10 +0000 (12:52 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 8 Apr 2024 10:53:21 +0000 (11:53 +0100)
commitb79e51c9994970699a0f488a7c121699d4595581
tree3ed0222122f78b95a5c84935cf8c5fd1364bb425
parent0d16ed0c2e743a721e372c64be73b828a0cf7cb9
selftests: mptcp: netlink: add change_address helper

The output formats of 'ip mptcp' commands are much different from that
of 'pm_nl_ctl' commands.

A new 'change_address' helper is added here, to change the flag of an
address. This is a bit similar to mptcp_join.sh's pm_nl_change_endpoint().

Usage:
Address ID - pm_nl_change_endpoint $ns id $id $flags
IP address - change_address $ns $addr $flags

Use this new helper in pm_netlink.sh to replace all 'pm_nl_ctl set'
commands.

Signed-off-by: Geliang Tang <tanggeliang@kylinos.cn>
Reviewed-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
tools/testing/selftests/net/mptcp/pm_netlink.sh