@@ -21,7 +21,7 @@ cleanup()
setup()
{
- ROD modprobe mpls_router
+ mpls_setup_driver
}
test1()
@@ -66,5 +66,5 @@ test3()
tst_res TPASS "created and removed mpls routes"
}
-. tst_net.sh
+. mpls_lib.sh
tst_run
@@ -33,11 +33,21 @@ mpls_virt_cleanup()
mpls_cleanup
}
+mpls_setup_driver()
+{
+ local args
+
+ grep -q 'sl-micro' /etc/os-release && args='--allow-unsupported'
+ if [ "$TST_NEEDS_DRIVERS" ]; then
+ tst_net_run -s "modprobe $args -a $TST_NEEDS_DRIVERS"
+ fi
+}
+
mpls_setup()
{
local label="$1"
- tst_net_run -s "modprobe -a $TST_NEEDS_DRIVERS"
+ mpls_setup_driver
ROD sysctl -q net.mpls.conf.$(tst_iface).input=1
tst_set_sysctl net.mpls.conf.lo.input 1 safe