Error compiling iptables-1.2.7a

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

 



Title: Error compiling iptables-1.2.7a

Hi,

I tried to compile :
- kernel-2.4.20
- Patched with POM-20021208
- iptables-1.2.7a

Compiling the kernel is no problem.
When executing KERNEL_DIR=/data/download/kernel/linux-2.4.20 make, I get this error :

ld -shared -o extensions/libipt_quota.so extensions/libipt_quota_sh.o
cc -O2 -Wall -Wunused -I/data/download/kernel/linux-2.4.20/include -Iinclude/ -DIPTABLES_VERSION=\"1.2.7a\"  -fPIC -o extensions/libipt_ROUTE_sh.o -c extensions/libipt_ROUTE.c

extensions/libipt_ROUTE.c: In function `parse':
extensions/libipt_ROUTE.c:61: structure has no member named `if_name'
extensions/libipt_ROUTE.c:64: structure has no member named `if_name'
extensions/libipt_ROUTE.c:66: structure has no member named `if_name'
extensions/libipt_ROUTE.c:66: structure has no member named `if_name'
extensions/libipt_ROUTE.c:66: structure has no member named `if_name'
extensions/libipt_ROUTE.c:67: structure has no member named `if_index'
extensions/libipt_ROUTE.c:80: structure has no member named `if_name'
extensions/libipt_ROUTE.c:81: structure has no member named `if_index'
extensions/libipt_ROUTE.c:86: structure has no member named `if_index'
extensions/libipt_ROUTE.c: In function `print':
extensions/libipt_ROUTE.c:119: structure has no member named `if_name'
extensions/libipt_ROUTE.c:120: structure has no member named `if_name'
extensions/libipt_ROUTE.c:122: structure has no member named `if_index'
make: *** [extensions/libipt_ROUTE_sh.o] Error 1

extensions/libipt_ROUTE.c says :
[Line 61]
if (strlen(optarg) > sizeof(route_info->if_name) - 1)
        exit_error(PARAMETER_PROBLEM,
                   "Maximum interface name length %u",
                   sizeof(route_info->if_name) - 1);
[Line 47]
struct ipt_route_target_info *route_info =
        (struct ipt_route_target_info*)(*target)->data;
[Line 12]
#include <linux/netfilter_ipv4/ipt_ROUTE.h>

[root@testfw extensions]# locate ipt_ROUTE.h
/data/download/kernel/linux-2.4.20/include/linux/netfilter_ipv4/ipt_ROUTE.h

/data/download/kernel/linux-2.4.20/include/linux/netfilter_ipv4/ipt_ROUTE.h says :
struct ipt_route_target_info {
        char ifname[IPT_ROUTE_IFNAMSIZ];
        unsigned int ipto;
};

I changed
"char ifname[IPT_ROUTE_IFNAMSIZ];" into
"char if_name[IPT_ROUTE_IFNAMSIZ];"
and now it only complains about not having an "if_index" member :

ld -shared -o extensions/libipt_quota.so extensions/libipt_quota_sh.o
cc -O2 -Wall -Wunused -I/data/download/kernel/linux-2.4.20/include -Iinclude/ -DIPTABLES_VERSION=\"1.2.7a\"  -fPIC -o extensions/libipt_ROUTE_sh.o -c extensions/libipt_ROUTE.c

extensions/libipt_ROUTE.c: In function `parse':
extensions/libipt_ROUTE.c:67: structure has no member named `if_index'
extensions/libipt_ROUTE.c:81: structure has no member named `if_index'
extensions/libipt_ROUTE.c:86: structure has no member named `if_index'
extensions/libipt_ROUTE.c: In function `print':
extensions/libipt_ROUTE.c:122: structure has no member named `if_index'
make: *** [extensions/libipt_ROUTE_sh.o] Error 1

Now my experimenting stops : I sure don't know anything about some if_index.
I just checked out the latest POM and ipt_route_target_info still has the same structure.
Is this something that should be corrected or what am I doing wrong ?


Rob


[Index of Archives]     [Linux Netfilter Development]     [Linux Kernel Networking Development]     [Netem]     [Berkeley Packet Filter]     [Linux Kernel Development]     [Advanced Routing & Traffice Control]     [Bugtraq]

  Powered by Linux