Some interfaces (gif) don't have a mac address...
This commit is contained in:
parent
103d2d1e66
commit
3763e8dd1d
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: net_common.sh,v 1.39 2020/02/20 08:02:26 ozaki-r Exp $
|
||||
# $NetBSD: net_common.sh,v 1.40 2020/03/30 13:01:39 christos Exp $
|
||||
#
|
||||
# Copyright (c) 2016 Internet Initiative Japan Inc.
|
||||
# All rights reserved.
|
||||
|
@ -326,13 +326,17 @@ rump_server_add_iface()
|
|||
if [ -n "$bus" ]; then
|
||||
atf_check -s exit:0 rump.ifconfig $ifname linkstr $bus
|
||||
fi
|
||||
macaddr=$(get_macaddr $sock $ifname)
|
||||
export RUMP_SERVER=$backup
|
||||
|
||||
if [ -f $_rump_server_macaddrs ]; then
|
||||
atf_check -s not-exit:0 grep -q $macaddr $_rump_server_macaddrs
|
||||
macaddr=$(get_macaddr $sock $ifname)
|
||||
if [ -n "$macaddr" ]; then
|
||||
if [ -f $_rump_server_macaddrs ]; then
|
||||
atf_check -s not-exit:0 \
|
||||
grep -q $macaddr $_rump_server_macaddrs
|
||||
fi
|
||||
echo $macaddr >> $_rump_server_macaddrs
|
||||
fi
|
||||
echo $macaddr >> $_rump_server_macaddrs
|
||||
|
||||
export RUMP_SERVER=$backup
|
||||
|
||||
echo $sock $ifname >> $_rump_server_ifaces
|
||||
$DEBUG && cat $_rump_server_ifaces
|
||||
|
|
Loading…
Reference in New Issue