]> rtime.felk.cvut.cz Git - lisovros/iproute2_canprio.git/commit
iproute2: Fix building xt module against xtables version 6
authorAndreas Henriksson <andreas@fatal.se>
Mon, 4 Jul 2011 05:17:42 +0000 (05:17 +0000)
committerStephen Hemminger <shemminger@vyatta.com>
Mon, 11 Jul 2011 17:18:14 +0000 (10:18 -0700)
commit73de5d96804160e3e399bd81b135053f70b27e7b
tree9226589820c90a0aee85c5677fb962792d6387d4
parent5582c0cffd5b65def21eca6ef0b7c165cb2f9523
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 <andreas@fatal.se>
tc/m_xt.c