test_dup_bridge()
{
- ip_link_add br up type bridge vlan_filtering 1
+ adf_ip_link_add br up type bridge vlan_filtering 1
do_test_dup add "bridge" dev br self
do_test_dup del "bridge" dev br self
}
test_dup_vxlan_self()
{
- ip_link_add br up type bridge vlan_filtering 1
- ip_link_add vx up type vxlan id 2000 dstport 4789
+ adf_ip_link_add br up type bridge vlan_filtering 1
+ adf_ip_link_add vx up type vxlan id 2000 dstport 4789
ip_link_set_master vx br
do_test_dup add "vxlan" dev vx self dst 192.0.2.1
test_dup_vxlan_master()
{
- ip_link_add br up type bridge vlan_filtering 1
- ip_link_add vx up type vxlan id 2000 dstport 4789
+ adf_ip_link_add br up type bridge vlan_filtering 1
+ adf_ip_link_add vx up type vxlan id 2000 dstport 4789
ip_link_set_master vx br
do_test_dup add "vxlan master" dev vx master
test_dup_macvlan_self()
{
- ip_link_add dd up type dummy
- ip_link_add mv up link dd type macvlan mode passthru
+ adf_ip_link_add dd up type dummy
+ adf_ip_link_add mv up link dd type macvlan mode passthru
do_test_dup add "macvlan self" dev mv self
do_test_dup del "macvlan self" dev mv self
test_dup_macvlan_master()
{
- ip_link_add br up type bridge vlan_filtering 1
- ip_link_add dd up type dummy
- ip_link_add mv up link dd type macvlan mode passthru
+ adf_ip_link_add br up type bridge vlan_filtering 1
+ adf_ip_link_add dd up type dummy
+ adf_ip_link_add mv up link dd type macvlan mode passthru
ip_link_set_master mv br
do_test_dup add "macvlan master" dev mv self
switch_create()
{
- ip_link_add br1 type bridge vlan_filtering 0 mcast_snooping 0 \
+ adf_ip_link_add br1 type bridge vlan_filtering 0 mcast_snooping 0 \
ageing_time "$LOW_AGEING_TIME"
ip_link_set_up br1
{
local mac
- ip_link_add br up type bridge vlan_default_pvid 0 "$@"
+ adf_ip_link_add br up type bridge vlan_default_pvid 0 "$@"
mac=$(mac_get br)
adf_bridge_configure
ip_link_set_addr br "$mac"
check_fdb_local_vlan_0_support()
{
- if ip_link_add XXbr up type bridge vlan_filtering 1 fdb_local_vlan_0 1 \
- &>/dev/null; then
+ if adf_ip_link_add XXbr up type bridge vlan_filtering 1 \
+ fdb_local_vlan_0 1 &>/dev/null; then
return 0
fi
adf_addr_set_bridge_create()
{
- ip_link_add br up type bridge vlan_filtering 0
+ adf_ip_link_add br up type bridge vlan_filtering 0
ip_link_set_addr br "$(mac_get br)"
adf_bridge_configure
}
simple_if_init "$h1"
defer simple_if_fini "$h1"
- ip_link_add "$h1.10" master "v$h1" link "$h1" type vlan id 10
+ adf_ip_link_add "$h1.10" master "v$h1" link "$h1" type vlan id 10
ip_link_set_up "$h1.10"
ip_addr_add "$h1.10" 192.0.2.1/28
- ip_link_add "$h1.20" master "v$h1" link "$h1" type vlan id 20
+ adf_ip_link_add "$h1.20" master "v$h1" link "$h1" type vlan id 20
ip_link_set_up "$h1.20"
ip_addr_add "$h1.20" 2001:db8:1::1/64
}
ip_link_set_up "v$h2"
# br2
- ip_link_add br2 type bridge vlan_filtering 0 mcast_snooping 0
+ adf_ip_link_add br2 type bridge vlan_filtering 0 mcast_snooping 0
ip_link_set_master br2 "v$h2"
ip_link_set_up br2
ip_link_set_up "v$h3"
# br3
- ip_link_add br3 type bridge vlan_filtering 0 mcast_snooping 0
+ adf_ip_link_add br3 type bridge vlan_filtering 0 mcast_snooping 0
ip_link_set_master br3 "v$h3"
ip_link_set_up br3
# br1
swp1_mac=$(mac_get "$swp1")
- ip_link_add br1 type bridge vlan_filtering 1 \
+ adf_ip_link_add br1 type bridge vlan_filtering 1 \
vlan_default_pvid 0 mcast_snooping 0
ip_link_set_addr br1 "$swp1_mac"
ip_link_set_up br1
# A dummy to force the IPv6 OIF=0 test to install a suitable MC route on
# $IPMR to be deterministic. Also used for the IPv6 RX!=TX ping test.
- ip_link_add "X$IPMR" up type dummy
+ adf_ip_link_add "X$IPMR" up type dummy
# IPMR
- ip_link_add "$IPMR" up type dummy
+ adf_ip_link_add "$IPMR" up type dummy
ip_addr_add "$IPMR" 192.0.2.100/28
ip_addr_add "$IPMR" 2001:db8:4::1/64
local name=$1; shift
local vid=$1; shift
- ip_link_add "$name" up type vxlan dstport "$VXPORT" \
+ adf_ip_link_add "$name" up type vxlan dstport "$VXPORT" \
nolearning noudpcsum tos inherit ttl 16 \
"$@"
ip_link_set_master "$name" br1
ip_addr_add "$if_in" "$ipv6_in"
# br1
- ip_link_add br1 type bridge vlan_filtering 1 \
+ adf_ip_link_add br1 type bridge vlan_filtering 1 \
vlan_default_pvid 0 mcast_snooping 0
ip_link_set_up br1
vx20_create local "${ipv6_in%/*}" group "$GROUP6" dev "$if_in"
# w1
- ip_link_add w1 type veth peer name w2
+ adf_ip_link_add w1 type veth peer name w2
ip_link_set_master w1 br1
ip_link_set_up w1
bridge_vlan_add vid 10 dev w1
defer simple_if_fini w2
# w2.10
- ip_link_add w2.10 master vw2 link w2 type vlan id 10
+ adf_ip_link_add w2.10 master vw2 link w2 type vlan id 10
ip_link_set_up w2.10
ip_addr_add w2.10 "$ipv4_host"
# w2.20
- ip_link_add w2.20 master vw2 link w2 type vlan id 20
+ adf_ip_link_add w2.20 master vw2 link w2 type vlan id 20
ip_link_set_up w2.20
ip_addr_add w2.20 "$ipv6_host"
}
forwarding_enable
defer forwarding_restore
- ip_link_add "v1$h2" type veth peer name "v2$h2"
- ip_link_add "v1$h3" type veth peer name "v2$h3"
+ adf_ip_link_add "v1$h2" type veth peer name "v2$h2"
+ adf_ip_link_add "v1$h3" type veth peer name "v2$h3"
h1_create
h2_create
switch_create()
{
- ip_link_add br1 type bridge vlan_filtering 0 mcast_snooping 0
+ adf_ip_link_add br1 type bridge vlan_filtering 0 mcast_snooping 0
# Make sure the bridge uses the MAC address of the local port and not
# that of the VxLAN's device.
ip_link_set_addr br1 $(mac_get $swp1)
vxlan_device_add()
{
- ip_link_add vx1 up type vxlan id 1000 \
+ adf_ip_link_add vx1 up type vxlan id 1000 \
local 192.0.2.17 dstport "$VXPORT" \
nolearning noudpcsum tos inherit ttl 100 "$@"
ip_link_set_master vx1 br1
fi
}
-ip_link_add()
+adf_ip_link_add()
{
local name=$1; shift
{
RET=0
- ip_link_add vx up type vxlan id 2000 dstport 4789
+ adf_ip_link_add vx up type vxlan id 2000 dstport 4789
bridge fdb ap dev vx 00:00:00:00:00:00 dst 192.0.2.20 self permanent
bridge fdb ap dev vx 00:00:00:00:00:00 dst 192.0.2.30 self permanent
check_remotes "fdb append"
{
check_command netstat || return
- ip_link_add v1 up type veth peer name v2
+ adf_ip_link_add v1 up type veth peer name v2
ip_link_set_up v2
RET=0
- ip_link_add vx up type vxlan dstport 4789 \
+ adf_ip_link_add vx up type vxlan dstport 4789 \
local 192.0.2.1 $(fmt_remote 224.1.1.1) dev v1 vni 1000
check_membership "group=224.1.1.1 fail=0" \
{
local port
- ip_link_add br up type bridge vlan_filtering 1
+ adf_ip_link_add br up type bridge vlan_filtering 1
for port in d1 d2 d3; do
- ip_link_add $port type veth peer name r$port
+ adf_ip_link_add $port type veth peer name r$port
ip_link_set_up $port
ip_link_set_up r$port
ip_link_set_master $port br
local link=$1; shift
local id=$1; shift
- ip_link_add $link.$id link $link type vlan id $id "$@"
+ adf_ip_link_add $link.$id link $link type vlan id $id "$@"
}
add_vlans()