[PATCH] Don't hardcode IPT_LIB_DIR in tc

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The location of the iptables modules are currently hardcoded into the
tc binary. This patch just adds a make variable of the same name and
passes it through the preprocessor. The README has been updated with
this info.
---
README      |    4 ++++
tc/Makefile |    5 ++++-
tc/m_ipt.c  |    2 +-
3 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/README b/README
index 7d54bd2..a0449b7 100644
--- a/README
+++ b/README
@@ -17,6 +17,10 @@ DBM_INCLUDE points to the directory with
is the include file used by arpd to get to the old format Berkely
database routines.  Often this is in the db-devel package.

+tc uses modules from iptables. These are usually in /lib/iptables
+or /usr/lib/iptables. Set this location in tc/Makefile in the variable
+IPT_LIB_DIR.
+
2. make

The makefile will automatically build a file Config which
diff --git a/tc/Makefile b/tc/Makefile
index 7640c58..99bc3b6 100644
--- a/tc/Makefile
+++ b/tc/Makefile
@@ -42,7 +42,10 @@ TCLIB += tc_red.o
TCLIB += tc_cbq.o
TCLIB += tc_estimator.o

-CFLAGS += -DCONFIG_GACT -DCONFIG_GACT_PROB
+# Location of iptables modules
+IPT_LIB_DIR = /usr/local/lib/iptables
+
+CFLAGS += -DCONFIG_GACT -DCONFIG_GACT_PROB -DIPT_LIB_DIR=\"$(IPT_LIB_DIR)\"

TCSO :=
TCSO += q_netem.so
diff --git a/tc/m_ipt.c b/tc/m_ipt.c
index e1f68b3..0f60b0d 100644
--- a/tc/m_ipt.c
+++ b/tc/m_ipt.c
@@ -9,7 +9,7 @@
 *
 * Authors:  J Hadi Salim (hadi@xxxxxxxxxx)
 *
- * TODO: bad bad hardcoding IPT_LIB_DIR and PROC_SYS_MODPROBE
+ * TODO: bad bad hardcoding PROC_SYS_MODPROBE
 *
*/

--
1.4.2.3
-
To unsubscribe from this list: send the line "unsubscribe linux-net" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux 802.1Q VLAN]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Git]     [Bugtraq]     [Yosemite News and Information]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux PCI]     [Linux Admin]     [Samba]

  Powered by Linux