Skip to content

Commit 4e4272d

Browse files
jpirkodavem330
authored andcommitted
selftests: forwarding: Add MAC get helper
Signed-off-by: Jiri Pirko <[email protected]> Signed-off-by: Ido Schimmel <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 2f19f21 commit 4e4272d

File tree

1 file changed

+7
-0
lines changed
  • tools/testing/selftests/net/forwarding

1 file changed

+7
-0
lines changed

tools/testing/selftests/net/forwarding/lib.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -270,6 +270,13 @@ link_stats_tx_packets_get()
270270
ip -j -s link show dev $if_name | jq '.[]["stats64"]["tx"]["packets"]'
271271
}
272272

273+
mac_get()
274+
{
275+
local if_name=$1
276+
277+
ip -j link show dev $if_name | jq -r '.[]["address"]'
278+
}
279+
273280
bridge_ageing_time_get()
274281
{
275282
local bridge=$1

0 commit comments

Comments
 (0)