Server IP : 104.21.38.3 / Your IP : 172.69.176.91 Web Server : Apache System : Linux krdc-ubuntu-s-2vcpu-4gb-amd-blr1-01.localdomain 5.15.0-142-generic #152-Ubuntu SMP Mon May 19 10:54:31 UTC 2025 x86_64 User : www ( 1000) PHP Version : 7.4.33 Disable Function : passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /usr/src/linux-headers-5.15.0-142/tools/testing/selftests/net/forwarding/ |
Upload File : |
# SPDX-License-Identifier: GPL-2.0 source "$relative_path/mirror_lib.sh" quick_test_span_gre_dir_ips() { local tundev=$1; shift do_test_span_dir_ips 10 h3-$tundev "$@" } fail_test_span_gre_dir_ips() { local tundev=$1; shift do_test_span_dir_ips 0 h3-$tundev "$@" } test_span_gre_dir_ips() { local tundev=$1; shift test_span_dir_ips h3-$tundev "$@" } full_test_span_gre_dir_ips() { local tundev=$1; shift local direction=$1; shift local forward_type=$1; shift local backward_type=$1; shift local what=$1; shift local ip1=$1; shift local ip2=$1; shift RET=0 mirror_install $swp1 $direction $tundev "matchall $tcflags" test_span_dir_ips "h3-$tundev" "$direction" "$forward_type" \ "$backward_type" "$ip1" "$ip2" mirror_uninstall $swp1 $direction log_test "$direction $what ($tcflags)" } full_test_span_gre_dir_vlan_ips() { local tundev=$1; shift local direction=$1; shift local vlan_match=$1; shift local forward_type=$1; shift local backward_type=$1; shift local what=$1; shift local ip1=$1; shift local ip2=$1; shift RET=0 mirror_install $swp1 $direction $tundev "matchall $tcflags" test_span_dir_ips "h3-$tundev" "$direction" "$forward_type" \ "$backward_type" "$ip1" "$ip2" tc filter add dev $h3 ingress pref 77 prot 802.1q \ flower $vlan_match \ action pass mirror_test v$h1 $ip1 $ip2 $h3 77 10 tc filter del dev $h3 ingress pref 77 mirror_uninstall $swp1 $direction log_test "$direction $what ($tcflags)" } quick_test_span_gre_dir() { quick_test_span_gre_dir_ips "$@" 192.0.2.1 192.0.2.2 } fail_test_span_gre_dir() { fail_test_span_gre_dir_ips "$@" 192.0.2.1 192.0.2.2 } test_span_gre_dir() { test_span_gre_dir_ips "$@" 192.0.2.1 192.0.2.2 } full_test_span_gre_dir() { full_test_span_gre_dir_ips "$@" 192.0.2.1 192.0.2.2 } full_test_span_gre_dir_vlan() { full_test_span_gre_dir_vlan_ips "$@" 192.0.2.1 192.0.2.2 } full_test_span_gre_stp_ips() { local tundev=$1; shift local nbpdev=$1; shift local what=$1; shift local ip1=$1; shift local ip2=$1; shift local h3mac=$(mac_get $h3) RET=0 mirror_install $swp1 ingress $tundev "matchall $tcflags" quick_test_span_gre_dir_ips $tundev ingress $ip1 $ip2 bridge link set dev $nbpdev state disabled sleep 1 fail_test_span_gre_dir_ips $tundev ingress $ip1 $ip2 bridge link set dev $nbpdev state forwarding sleep 1 quick_test_span_gre_dir_ips $tundev ingress $ip1 $ip2 mirror_uninstall $swp1 ingress log_test "$what: STP state ($tcflags)" } full_test_span_gre_stp() { full_test_span_gre_stp_ips "$@" 192.0.2.1 192.0.2.2 }