Skip to content

Commit

Permalink
mpls: Add --allow-unsupported for modprobe
Browse files Browse the repository at this point in the history
In SLE-Micro we encounter following error when do modprobe:

    # modprobe mpls_router
    modprobe: ERROR: module 'mpls_router' is unsupported
    modprobe: ERROR: Use --allow-unsupported or set allow_unsupported_modules 1 in
    modprobe: ERROR: /etc/modprobe.d/10-unsupported-modules.conf
    modprobe: ERROR: could not insert 'mpls_router': Operation not permitted

Therefore enable --allow-unsupported for SLE, SLE-Micro and openSUSE
Tumbleweed (here it's noop).

Link: https://lore.kernel.org/ltp/20240904065653.31086-1-wegao@suse.com/
Reviewed-by: Petr Vorel <pvorel@suse.cz>
Acked-by: Cyril Hrubis <chrubis@suse.cz>
Signed-off-by: Wei Gao <wegao@suse.com>
  • Loading branch information
coolgw authored and pevik committed Sep 5, 2024
1 parent 6df425b commit deab150
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
4 changes: 2 additions & 2 deletions testcases/network/mpls/mpls01.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ cleanup()

setup()
{
ROD modprobe mpls_router
mpls_setup_driver
}

test1()
Expand Down Expand Up @@ -66,5 +66,5 @@ test3()
tst_res TPASS "created and removed mpls routes"
}

. tst_net.sh
. mpls_lib.sh
tst_run
12 changes: 11 additions & 1 deletion testcases/network/mpls/mpls_lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,21 @@ mpls_virt_cleanup()
mpls_cleanup
}

mpls_setup_driver()
{
local args

grep -q -w ID_LIKE.*suse /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
Expand Down

0 comments on commit deab150

Please sign in to comment.