diff --git a/iproute.spec b/iproute.spec index beea15c..9c63201 100644 --- a/iproute.spec +++ b/iproute.spec @@ -2,7 +2,7 @@ Summary: Advanced IP routing and network device configuration tools Name: iproute Version: 2.6.39 -Release: 1%{?dist} +Release: 2%{?dist} Group: Applications/System URL: http://www.linuxfoundation.org/collaborate/workgroups/networking/%{name}2 Source0: http://devresources.linuxfoundation.org/dev/iproute2/download/%{name}2-%{version}.tar.gz @@ -19,6 +19,7 @@ Patch7: iproute2-example-cbq-service.patch Patch8: iproute2-2.6.35-print-route.patch Patch9: iproute2-print-route-u32.patch Patch10: iproute2-2.6.39-create-peer-veth-without-a-name.patch +Patch11: iproute2-2.6.39-xtables6.patch License: GPLv2+ and Public Domain BuildRequires: tex(latex) tex(dvips) linuxdoc-tools @@ -62,6 +63,7 @@ sed -i "s/_VERSION_/%{version}/" man/man8/ss.8 %patch8 -p1 -b .print-route %patch9 -p1 -b .print-route-u32 %patch10 -p1 -b .peer-veth-without-name +%patch11 -p1 -b .xtables6 %build export LIBDIR=/%{_libdir} @@ -183,6 +185,9 @@ done %{_includedir}/libnetlink.h %changelog +* Tue Jul 12 2011 Petr Sabata - 2.6.39-2 +- Rebuild for xtables6 + * Thu Jun 30 2011 Petr Sabata - 2.6.39-1 - 2.6.39 bump diff --git a/iproute2-2.6.39-xtables6.patch b/iproute2-2.6.39-xtables6.patch new file mode 100644 index 0000000..d50d2ec --- /dev/null +++ b/iproute2-2.6.39-xtables6.patch @@ -0,0 +1,62 @@ +From 73de5d96804160e3e399bd81b135053f70b27e7b Mon Sep 17 00:00:00 2001 +From: Andreas Henriksson +Date: Mon, 4 Jul 2011 05:17:42 +0000 +Subject: [PATCH] iproute2: Fix building xt module against xtables version 6 + +iptables/xtables apparently changed API again.... Now you need to pass +and extra parameter (orig_opts) which was not needed before. + +Sprinkle some lovely pre-processor magic to be compatible with both older +and new versions. In the beginning of times XTABLES_VERSION_CODE didn't +exist. Then it was (0x10000 * major + 0x100 * minor + patch) when it was +first introduced (according to git), but now it's at 6... +Don't know what official iptables releases has defined it to over time. +Lets just hope none of the older versions with is has the define +higher then 6 is still around.... so only the "current" versioning +scheme is supported.... lets see how long this lasts now. + +For the API change in xtables, see: +http://git.netfilter.org/cgi-bin/gitweb.cgi?p=iptables.git;a=commitdiff;h=600f38db82548a683775fd89b6e136673e924097 + +Signed-off-by: Andreas Henriksson +--- + tc/m_xt.c | 16 ++++++++++++---- + 1 files changed, 12 insertions(+), 4 deletions(-) + +diff --git a/tc/m_xt.c b/tc/m_xt.c +index 651a59e..13bf19f 100644 +--- a/tc/m_xt.c ++++ b/tc/m_xt.c +@@ -160,9 +160,13 @@ static int parse_ipt(struct action_util *a,int *argc_p, + return -1; + } + tcipt_globals.opts = +- xtables_merge_options(tcipt_globals.opts, +- m->extra_opts, +- &m->option_offset); ++ xtables_merge_options( ++#if (XTABLES_VERSION_CODE >= 6) ++ tcipt_globals.orig_opts, ++#endif ++ tcipt_globals.opts, ++ m->extra_opts, ++ &m->option_offset); + } else { + fprintf(stderr," failed to find target %s\n\n", optarg); + return -1; +@@ -305,7 +309,11 @@ print_ipt(struct action_util *au,FILE * f, struct rtattr *arg) + } + + tcipt_globals.opts = +- xtables_merge_options(tcipt_globals.opts, ++ xtables_merge_options( ++#if (XTABLES_VERSION_CODE >= 6) ++ tcipt_globals.orig_opts, ++#endif ++ tcipt_globals.opts, + m->extra_opts, + &m->option_offset); + } else { +-- +1.7.4.4 +