|
Packit Bot |
867fae |
#!/bin/sh
|
|
Packit Bot |
867fae |
|
|
Packit Bot |
867fae |
. lib/generic.sh
|
|
Packit Bot |
867fae |
|
|
Packit Bot |
867fae |
DEV="$(rand_dev)"
|
|
Packit Bot |
867fae |
ts_ip "$0" "Add $DEV dummy interface" link add dev $DEV up type dummy
|
|
Packit Bot |
867fae |
ts_tc "$0" "Add ingress qdisc" qdisc add dev $DEV ingress
|
|
Packit Bot |
867fae |
|
|
Packit Bot |
867fae |
reset_qdisc()
|
|
Packit Bot |
867fae |
{
|
|
Packit Bot |
867fae |
ts_tc "$0" "Remove ingress qdisc" qdisc del dev $DEV ingress
|
|
Packit Bot |
867fae |
ts_tc "$0" "Add ingress qdisc" qdisc add dev $DEV ingress
|
|
Packit Bot |
867fae |
}
|
|
Packit Bot |
867fae |
|
|
Packit Bot |
867fae |
ts_tc "$0" "Add MPLS filter matching first LSE with minimal values" \
|
|
Packit Bot |
867fae |
filter add dev $DEV ingress protocol mpls_uc flower \
|
|
Packit Bot |
867fae |
mpls_label 0 mpls_tc 0 mpls_bos 0 mpls_ttl 0 \
|
|
Packit Bot |
867fae |
action drop
|
|
Packit Bot |
867fae |
ts_tc "$0" "Show ingress filters" filter show dev $DEV ingress
|
|
Packit Bot |
867fae |
test_on "mpls_label 0"
|
|
Packit Bot |
867fae |
test_on "mpls_tc 0"
|
|
Packit Bot |
867fae |
test_on "mpls_bos 0"
|
|
Packit Bot |
867fae |
test_on "mpls_ttl 0"
|
|
Packit Bot |
867fae |
|
|
Packit Bot |
867fae |
reset_qdisc
|
|
Packit Bot |
867fae |
ts_tc "$0" "Add MPLS filter matching first LSE with maximal values" \
|
|
Packit Bot |
867fae |
filter add dev $DEV ingress protocol mpls_uc flower \
|
|
Packit Bot |
867fae |
mpls_label 1048575 mpls_tc 7 mpls_bos 1 mpls_ttl 255 \
|
|
Packit Bot |
867fae |
action drop
|
|
Packit Bot |
867fae |
ts_tc "$0" "Show ingress filters" filter show dev $DEV ingress
|
|
Packit Bot |
867fae |
test_on "mpls_label 1048575"
|
|
Packit Bot |
867fae |
test_on "mpls_tc 7"
|
|
Packit Bot |
867fae |
test_on "mpls_bos 1"
|
|
Packit Bot |
867fae |
test_on "mpls_ttl 255"
|
|
Packit Bot |
867fae |
|
|
Packit Bot |
867fae |
reset_qdisc
|
|
Packit Bot |
867fae |
ts_tc "$0" "Add MPLS filter matching second LSE with minimal values" \
|
|
Packit Bot |
867fae |
filter add dev $DEV ingress protocol mpls_uc flower \
|
|
Packit Bot |
867fae |
mpls lse depth 2 label 0 tc 0 bos 0 ttl 0 \
|
|
Packit Bot |
867fae |
action drop
|
|
Packit Bot |
867fae |
ts_tc "$0" "Show ingress filters" filter show dev $DEV ingress
|
|
Packit Bot |
867fae |
test_on "mpls"
|
|
Packit Bot |
867fae |
test_on "lse"
|
|
Packit Bot |
867fae |
test_on "depth 2"
|
|
Packit Bot |
867fae |
test_on "label 0"
|
|
Packit Bot |
867fae |
test_on "tc 0"
|
|
Packit Bot |
867fae |
test_on "bos 0"
|
|
Packit Bot |
867fae |
test_on "ttl 0"
|
|
Packit Bot |
867fae |
|
|
Packit Bot |
867fae |
reset_qdisc
|
|
Packit Bot |
867fae |
ts_tc "$0" "Add MPLS filter matching second LSE with maximal values" \
|
|
Packit Bot |
867fae |
filter add dev $DEV ingress protocol mpls_uc flower \
|
|
Packit Bot |
867fae |
mpls lse depth 2 label 1048575 tc 7 bos 1 ttl 255 \
|
|
Packit Bot |
867fae |
action drop
|
|
Packit Bot |
867fae |
ts_tc "$0" "Show ingress filters" filter show dev $DEV ingress
|
|
Packit Bot |
867fae |
test_on "mpls"
|
|
Packit Bot |
867fae |
test_on "lse"
|
|
Packit Bot |
867fae |
test_on "depth 2"
|
|
Packit Bot |
867fae |
test_on "label 1048575"
|
|
Packit Bot |
867fae |
test_on "tc 7"
|
|
Packit Bot |
867fae |
test_on "bos 1"
|
|
Packit Bot |
867fae |
test_on "ttl 255"
|
|
Packit Bot |
867fae |
|
|
Packit Bot |
867fae |
reset_qdisc
|
|
Packit Bot |
867fae |
ts_tc "$0" "Add MPLS filter matching two LSEs" \
|
|
Packit Bot |
867fae |
filter add dev $DEV ingress protocol mpls_uc flower mpls \
|
|
Packit Bot |
867fae |
lse depth 1 label 0 tc 0 bos 0 ttl 0 \
|
|
Packit Bot |
867fae |
lse depth 2 label 1048575 tc 7 bos 1 ttl 255 \
|
|
Packit Bot |
867fae |
action drop
|
|
Packit Bot |
867fae |
ts_tc "$0" "Show ingress filters" filter show dev $DEV ingress
|
|
Packit Bot |
867fae |
test_on "mpls"
|
|
Packit Bot |
867fae |
test_on "lse"
|
|
Packit Bot |
867fae |
test_on "depth 1"
|
|
Packit Bot |
867fae |
test_on "label 0"
|
|
Packit Bot |
867fae |
test_on "tc 0"
|
|
Packit Bot |
867fae |
test_on "bos 0"
|
|
Packit Bot |
867fae |
test_on "ttl 0"
|
|
Packit Bot |
867fae |
test_on "depth 2"
|
|
Packit Bot |
867fae |
test_on "label 1048575"
|
|
Packit Bot |
867fae |
test_on "tc 7"
|
|
Packit Bot |
867fae |
test_on "bos 1"
|
|
Packit Bot |
867fae |
test_on "ttl 255"
|