From 02a65e0af84f1e6e834dc97296c1a9b6350db3ab Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Fri, 25 Apr 2008 20:46:23 +0200 Subject: [PATCH] Fix compilation error for 2.6.18-stable The prototype of ip_route_me_harder changed in 2.6.18.5, so I think Xtables-addons should account for it. This renders compilation on anything below it impossible. (2.6.17 is not supported in general.) --- INSTALL | 2 +- extensions/compat_xtables.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/INSTALL b/INSTALL index 3f6b4ad..06de59a 100644 --- a/INSTALL +++ b/INSTALL @@ -14,7 +14,7 @@ Prerequirements * xtables(-devel) 1.5.2 - * kernel-source >= 2.6.18 with prepared build/output directory + * kernel-source >= 2.6.18.5 with prepared build/output directory Selecting extensions diff --git a/extensions/compat_xtables.c b/extensions/compat_xtables.c index cea80e7..05ddb2d 100644 --- a/extensions/compat_xtables.c +++ b/extensions/compat_xtables.c @@ -299,7 +299,8 @@ int xtnu_ip_route_me_harder(struct sk_buff *skb, unsigned int addr_type) struct sk_buff *nskb = skb; int ret; -#if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 18) +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 17) + /* Actually this one is valid up to 2.6.18.4, but changed in 2.6.18.5 */ ret = ip_route_me_harder(&skb); #elif LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 23) ret = ip_route_me_harder(&nskb, addr_type);