summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--accel-pptpd/extra/CMakeLists.txt5
-rw-r--r--accel-pptpd/extra/shaper_tbf.c10
2 files changed, 8 insertions, 7 deletions
diff --git a/accel-pptpd/extra/CMakeLists.txt b/accel-pptpd/extra/CMakeLists.txt
index 282af1a3..2b2d9509 100644
--- a/accel-pptpd/extra/CMakeLists.txt
+++ b/accel-pptpd/extra/CMakeLists.txt
@@ -9,7 +9,10 @@ INSTALL(TARGETS pppd_compat ippool sigchld chap-secrets
IF (SHAPER)
ADD_LIBRARY(shaper_tbf SHARED shaper_tbf.c)
- TARGET_LINK_LIBRARIES(shaper_tbf nl nl-route m)
+ IF (LIBNL_PREFIX)
+ SET_PROPERTY(TARGET shaper_tbf PROPERTY COMPILE_FLAGS "-I${LIBNL_PREFIX}/include -Wl,-L${LIBNL_PREFIX}/lib")
+ ENDIF (LIBNL_PREFIX)
+ TARGET_LINK_LIBRARIES(shaper_tbf nl m)
INSTALL(TARGETS shaper_tbf LIBRARY DESTINATION lib/accel-pptp)
ENDIF (SHAPER)
diff --git a/accel-pptpd/extra/shaper_tbf.c b/accel-pptpd/extra/shaper_tbf.c
index d974bdaa..940fa297 100644
--- a/accel-pptpd/extra/shaper_tbf.c
+++ b/accel-pptpd/extra/shaper_tbf.c
@@ -10,12 +10,9 @@
#include <sys/socket.h>
#include <pthread.h>
-#include <netlink/netlink.h>
-#include <netlink/route/qdisc.h>
-#include <netlink/route/sch/tbf.h>
-#include <netlink/route/class.h>
-#include <netlink/route/cls/u32.h>
-#include <netlink/route/cls/police.h>
+#include "netlink/netlink.h"
+#include "netlink/socket.h"
+#include "netlink/msg.h"
#include "triton.h"
#include "events.h"
@@ -29,6 +26,7 @@
#include "memdebug.h"
+#define RTNL_TC_RTABLE_SIZE 256
#define TIME_UNITS_PER_SEC 1000000
#define ATTR_UP 1