Add support for MPLS on Linux
Closes #135 Signed-off-by: Maximilian Wilhelm <max@sdn.clinic>
This commit is contained in:
parent
5b7f5b712b
commit
667943f46c
6 changed files with 102 additions and 0 deletions
|
@ -9,6 +9,7 @@ atf_test_program{name='forward_test'}
|
|||
atf_test_program{name='gre_test'}
|
||||
atf_test_program{name='ipv6-ra_test'}
|
||||
atf_test_program{name='link_test'}
|
||||
atf_test_program{name='mpls_test'}
|
||||
atf_test_program{name='ppp_test'}
|
||||
atf_test_program{name='static_test'}
|
||||
atf_test_program{name='tunnel_test'}
|
||||
|
|
23
tests/linux/mpls_test
Executable file
23
tests/linux/mpls_test
Executable file
|
@ -0,0 +1,23 @@
|
|||
#!/usr/bin/env atf-sh
|
||||
|
||||
. $(atf_get_srcdir)/../test_env.sh
|
||||
EXECUTOR="$(atf_get_srcdir)/../../executor-scripts/linux/mpls"
|
||||
|
||||
tests_init \
|
||||
mpls_enable \
|
||||
mpls_disable
|
||||
|
||||
mpls_enable_body() {
|
||||
export MOCK=echo IFACE=vlan2342 PHASE=pre-up IF_MPLS_ENABLE=yes
|
||||
atf_check -s exit:0 \
|
||||
-o match:"modprobe mpls_iptunnel" \
|
||||
-o match:"echo 1 > /proc/sys/net/mpls/conf/vlan2342/input" \
|
||||
${EXECUTOR}
|
||||
}
|
||||
|
||||
mpls_disable_body() {
|
||||
export MOCK=echo IFACE=vlan2342 PHASE=pre-up IF_MPLS_ENABLE=no
|
||||
atf_check -s exit:0 \
|
||||
-o match:"echo 0 > /proc/sys/net/mpls/conf/vlan2342/input" \
|
||||
${EXECUTOR}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue