iproute2-4.0 had connmark support added by nbd. This does not work with 4.x kernels. iproute2-4.3 is the latest version and has his changes mainlined. This patch updates the package to iproute2-4.3 and fixes the patches so that it compiles. This should resolve ticket #21374. Signed-off-by: Rob Mosher <nyt-openwrt@countercultured.net> SVN-Revision: 48098master
parent
f49dadb0bd
commit
8e9eed3442
@ -1,11 +1,16 @@ |
||||
--- a/misc/Makefile
|
||||
+++ b/misc/Makefile
|
||||
@@ -1,7 +1,7 @@
|
||||
SSOBJ=ss.o ssfilter.o
|
||||
LNSTATOBJ=lnstat.o lnstat_util.o
|
||||
|
||||
-TARGETS=ss nstat ifstat rtacct arpd lnstat
|
||||
+TARGETS=ss nstat ifstat rtacct lnstat
|
||||
@@ -5,9 +5,9 @@
|
||||
|
||||
include ../Config
|
||||
|
||||
-ifeq ($(HAVE_BERKELEY_DB),y)
|
||||
- TARGETS += arpd
|
||||
-endif
|
||||
+#ifeq ($(HAVE_BERKELEY_DB),y)
|
||||
+# TARGETS += arpd
|
||||
+#endif
|
||||
|
||||
ifeq ($(HAVE_SELINUX),y)
|
||||
LDLIBS += $(shell pkg-config --libs libselinux)
|
||||
|
||||
|
@ -1,11 +1,12 @@ |
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -36,7 +36,7 @@ WFLAGS += -Wmissing-declarations -Wold-s
|
||||
CFLAGS = $(WFLAGS) $(CCOPTS) -I../include $(DEFINES)
|
||||
@@ -41,7 +41,7 @@ WFLAGS += -Wmissing-declarations -Wold-s
|
||||
CFLAGS := $(WFLAGS) $(CCOPTS) -I../include $(DEFINES) $(CFLAGS)
|
||||
YACCFLAGS = -d -t -v
|
||||
|
||||
-SUBDIRS=lib ip tc bridge misc netem genl man
|
||||
+SUBDIRS=lib ip tc bridge misc genl man
|
||||
-SUBDIRS=lib ip tc bridge misc netem genl tipc man
|
||||
+SUBDIRS=lib ip tc bridge misc genl tipc man
|
||||
|
||||
LIBNETLINK=../lib/libnetlink.a ../lib/libutil.a
|
||||
LDLIBS += $(LIBNETLINK)
|
||||
|
||||
|
@ -1,87 +0,0 @@ |
||||
--- a/tc/Makefile
|
||||
+++ b/tc/Makefile
|
||||
@@ -44,6 +44,7 @@ TCMODULES += m_mirred.o
|
||||
TCMODULES += m_nat.o
|
||||
TCMODULES += m_pedit.o
|
||||
TCMODULES += m_skbedit.o
|
||||
+TCMODULES += m_connmark.o
|
||||
TCMODULES += m_csum.o
|
||||
TCMODULES += m_simple.o
|
||||
TCMODULES += m_vlan.o
|
||||
--- /dev/null
|
||||
+++ b/tc/m_connmark.c
|
||||
@@ -0,0 +1,74 @@
|
||||
+/*
|
||||
+ * m_connmark.c Connection tracking marking import
|
||||
+ *
|
||||
+ * Copyright (c) 2011 Felix Fietkau <nbd@openwrt.org>
|
||||
+ *
|
||||
+ * This program is free software; you can redistribute it and/or modify it
|
||||
+ * under the terms and conditions of the GNU General Public License,
|
||||
+ * version 2, as published by the Free Software Foundation.
|
||||
+ *
|
||||
+ * This program is distributed in the hope it will be useful, but WITHOUT
|
||||
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
+ * more details.
|
||||
+ *
|
||||
+ * You should have received a copy of the GNU General Public License along with
|
||||
+ * this program; if not, write to the Free Software Foundation, Inc., 59 Temple
|
||||
+ * Place - Suite 330, Boston, MA 02111-1307 USA.
|
||||
+ */
|
||||
+
|
||||
+#include <stdio.h>
|
||||
+#include <stdlib.h>
|
||||
+#include <unistd.h>
|
||||
+#include <string.h>
|
||||
+#include "utils.h"
|
||||
+#include "tc_util.h"
|
||||
+
|
||||
+static void
|
||||
+explain(void)
|
||||
+{
|
||||
+ fprintf(stderr, "Usage: ... connmark\n");
|
||||
+}
|
||||
+
|
||||
+static void
|
||||
+usage(void)
|
||||
+{
|
||||
+ explain();
|
||||
+ exit(-1);
|
||||
+}
|
||||
+
|
||||
+static int
|
||||
+parse_connmark(struct action_util *a, int *argc_p, char ***argv_p, int tca_id,
|
||||
+ struct nlmsghdr *n)
|
||||
+{
|
||||
+ int argc = *argc_p;
|
||||
+ char **argv = *argv_p;
|
||||
+
|
||||
+ if (matches(*argv, "connmark") != 0)
|
||||
+ return -1;
|
||||
+
|
||||
+ NEXT_ARG();
|
||||
+
|
||||
+ if (matches(*argv, "help") == 0)
|
||||
+ usage();
|
||||
+
|
||||
+ *argc_p = argc;
|
||||
+ *argv_p = argv;
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static int print_connmark(struct action_util *au, FILE *f, struct rtattr *arg)
|
||||
+{
|
||||
+ if (arg == NULL)
|
||||
+ return -1;
|
||||
+
|
||||
+ fprintf(f, " connmark");
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+struct action_util connmark_action_util = {
|
||||
+ .id = "connmark",
|
||||
+ .parse_aopt = parse_connmark,
|
||||
+ .print_aopt = print_connmark,
|
||||
+};
|
@ -0,0 +1,30 @@ |
||||
--- a/include/linux/in.h
|
||||
+++ b/include/linux/in.h
|
||||
@@ -15,6 +15,7 @@
|
||||
* as published by the Free Software Foundation; either version
|
||||
* 2 of the License, or (at your option) any later version.
|
||||
*/
|
||||
+#ifndef _NETINET_IN_H
|
||||
#ifndef _LINUX_IN_H
|
||||
#define _LINUX_IN_H
|
||||
|
||||
@@ -297,3 +298,4 @@ struct sockaddr_in {
|
||||
|
||||
|
||||
#endif /* _LINUX_IN_H */
|
||||
+#endif /* _NETINET_IN_H */
|
||||
--- a/include/linux/in6.h
|
||||
+++ b/include/linux/in6.h
|
||||
@@ -18,6 +18,7 @@
|
||||
* 2 of the License, or (at your option) any later version.
|
||||
*/
|
||||
|
||||
+#ifndef _NETINET_IN_H
|
||||
#ifndef _LINUX_IN6_H
|
||||
#define _LINUX_IN6_H
|
||||
|
||||
@@ -291,3 +292,4 @@ struct in6_flowlabel_req {
|
||||
* MRT6_MAX
|
||||
*/
|
||||
#endif /* _LINUX_IN6_H */
|
||||
+#endif /* _NETINET_IN_H */
|
Loading…
Reference in new issue