lib.sh (6fd5eeee1f107e2fb805609779994e3526de184f) | lib.sh (203ee5cd723502e88bac830a2478258f23bc4756) |
---|---|
1#!/bin/bash 2# SPDX-License-Identifier: GPL-2.0 3 4############################################################################## 5# Defines 6 7# Can be overridden by the configuration file. 8PING=${PING:=ping} --- 28 unchanged lines hidden (view full) --- 37{ 38 tc -j &> /dev/null 39 if [[ $? -ne 0 ]]; then 40 echo "SKIP: iproute2 too old; tc is missing JSON support" 41 exit 1 42 fi 43} 44 | 1#!/bin/bash 2# SPDX-License-Identifier: GPL-2.0 3 4############################################################################## 5# Defines 6 7# Can be overridden by the configuration file. 8PING=${PING:=ping} --- 28 unchanged lines hidden (view full) --- 37{ 38 tc -j &> /dev/null 39 if [[ $? -ne 0 ]]; then 40 echo "SKIP: iproute2 too old; tc is missing JSON support" 41 exit 1 42 fi 43} 44 |
45# Old versions of tc don't understand "mpls_uc" 46check_tc_mpls_support() 47{ 48 local dev=$1; shift 49 50 tc filter add dev $dev ingress protocol mpls_uc pref 1 handle 1 \ 51 matchall action pipe &> /dev/null 52 if [[ $? -ne 0 ]]; then 53 echo "SKIP: iproute2 too old; tc is missing MPLS support" 54 return 1 55 fi 56 tc filter del dev $dev ingress protocol mpls_uc pref 1 handle 1 \ 57 matchall 58} 59 |
|
45check_tc_shblock_support() 46{ 47 tc filter help 2>&1 | grep block &> /dev/null 48 if [[ $? -ne 0 ]]; then 49 echo "SKIP: iproute2 too old; tc is missing shared block support" 50 exit 1 51 fi 52} --- 1355 unchanged lines hidden --- | 60check_tc_shblock_support() 61{ 62 tc filter help 2>&1 | grep block &> /dev/null 63 if [[ $? -ne 0 ]]; then 64 echo "SKIP: iproute2 too old; tc is missing shared block support" 65 exit 1 66 fi 67} --- 1355 unchanged lines hidden --- |