mirror of
https://git.kernel.org/pub/scm/network/iproute2/iproute2.git
synced 2024-11-16 22:45:17 +08:00
Test for HTB version match
(Logical change 1.59)
This commit is contained in:
parent
ebafc64da8
commit
3876b3c378
@ -1,5 +1,9 @@
|
||||
2004-07-30 Stephen Hemminger <shemminger@osdl.org>
|
||||
|
||||
* HTB API changed and won't build with mismatched version.
|
||||
Rather than sticking user with a build error, just don't
|
||||
build it in on mismatch.
|
||||
|
||||
* Change configure script to make sure netem is the correct
|
||||
version. I changed the structure def. a couple of times before
|
||||
settling on the final API
|
||||
|
27
configure
vendored
27
configure
vendored
@ -51,10 +51,35 @@ else
|
||||
fi
|
||||
rm -f /tmp/atmtest.c /tmp/atmtest
|
||||
|
||||
echo -n " HTB... "
|
||||
DEF_HTB=`grep '^#define HTB_TC_VER' tc/q_htb.c`
|
||||
cat >/tmp/htbtest.c <<EOF
|
||||
#include <stdio.h>
|
||||
#include <asm/types.h>
|
||||
#include <linux/pkt_sched.h>
|
||||
$DEF_HTB
|
||||
int main(int argc, char **argv) {
|
||||
if (HTB_TC_VER >>16 != TC_HTB_PROTOVER) {
|
||||
fprintf(stderr, "different kernel and TC HTB versions\n");
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
EOF
|
||||
gcc -I$INCLUDE -o /tmp/htbtest /tmp/htbtest.c
|
||||
if [ $? -eq 0 -a /tmp/htbtest ]
|
||||
then
|
||||
echo "TC_CONFIG_HTB:=y" >>Config
|
||||
echo y
|
||||
else
|
||||
echo n
|
||||
fi
|
||||
rm -f /tmp/htbtest /tmp/htbtest.c
|
||||
|
||||
# See if we know about TCP Vegas
|
||||
echo "SS"
|
||||
echo -n " TCP Vegas... "
|
||||
if grep -q TCPDIAG_VEGASINFO $INCLUDE/linux/tcp_diag.h
|
||||
if grep -q TCPDIAG_VEGASINFO $INCLUDE/linux/tcp_diag.h >/dev/null 2>&1
|
||||
then
|
||||
echo "SS_CONFIG_VEGAS:=y" >>Config
|
||||
echo y
|
||||
|
Loading…
Reference in New Issue
Block a user