提交 a5114df6 编写于 作者: V Vladimir Oltean 提交者: David S. Miller

selftests: forwarding: add helper for retrieving IPv6 link-local address of interface

Pinging an IPv6 link-local multicast address selects the link-local
unicast address of the interface as source, and we'd like to monitor for
that in tcpdump.

Add a helper to the forwarding library which retrieves the link-local
IPv6 address of an interface, to make that task easier.
Signed-off-by: NVladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 f23cddc7
......@@ -868,6 +868,15 @@ mac_get()
ip -j link show dev $if_name | jq -r '.[]["address"]'
}
ipv6_lladdr_get()
{
local if_name=$1
ip -j addr show dev $if_name | \
jq -r '.[]["addr_info"][] | select(.scope == "link").local' | \
head -1
}
bridge_ageing_time_get()
{
local bridge=$1
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册