Compilling error with 63_getorigdst-tuple-zero.patch
Subsystems (2)
PATCH 1/1 Compilling error with 63_getorigdst-tuple-zero.patch
Hi all,
i'm running linux 2.4.22 and i apply patch-o-matic from CVS, updated yesterday.. When "make modules" I got this :
first,
make[2]: Dépendance circulaire /usr/src/linux-2.4.22/include/linux/netfilter_ipv4/ip_conntrack_helper.h <- /usr/src/linux-2.4.22/include/linux/netfilter_ipv4/ip_conntrack.h abandonnée.
a #include recall himself.. is this a problem ?
second,
gcc -D__KERNEL__ -I/usr/src/linux-2.4.22/include -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -fomit-frame-pointer -pipe -mpreferred-stack-boundary=2 -march=i686 -malign-functions=4 -DMODULE -DMODVERSIONS -include /usr/src/linux-2.4.22/include/linux/modversions.h -nostdinc -iwithprefix include -DKBUILD_BASENAME=ip_conntrack_core -c -o ip_conntrack_core.o ip_conntrack_core.c ip_conntrack_core.c: In function `getorigdst':
ip_conntrack_core.c:1310: invalid type argument of `->'
ip_conntrack_core.c:1310: invalid type argument of `->'
i think the correct patch 63_getorigdst-tuple-zero.patch have to be :
include/linux/netfilter_ipv4/ip_conntrack_tuple.h 2003-09-05 17:04:20.000000000 +0200 renamed from include/linux/netfilter_ipv4/ip_conntrack_tuple.h 2002-02-25 20:38:13.000000000 +0100 +0 -0
@@ -62,6 +62,14 @@ } dst;
};
+/* This is optimized opposed to a memset of the whole structure. Everything we
+ * really care about is the source/destination unions */
+#define IP_CT_TUPLE_BLANK(tuple) \
+ do { \
+ (tuple)->src.u.all = 0; \ + (tuple)->dst.u.all = 0; \
+ } while (0)
+
enum ip_conntrack_dir
{
IP_CT_DIR_ORIGINAL,
net/ipv4/netfilter/ip_conntrack_core.c 2003-09-05 17:04:20.000000000 +0200 renamed from net/ipv4/netfilter/ip_conntrack_core.c 2003-08-25 13:44:44.000000000 +0200 +0 -0
@@ -1303,9 +1303,14 @@
getorigdst(struct sock *sk, int optval, void *user, int *len)
{
struct ip_conntrack_tuple_hash *h;- struct ip_conntrack_tuple tuple = { { sk->rcv_saddr, { .tcp = { sk->sport } } },
- { sk->daddr, { .tcp = { sk->dport } },
- IPPROTO_TCP } };
+ struct ip_conntrack_tuple tuple;
+
+ IP_CT_TUPLE_BLANK(&tuple); + tuple.src.ip = sk->rcv_saddr; + tuple.src.u.tcp.port = sk->sport; + tuple.dst.ip = sk->daddr; + tuple.dst.u.tcp.port = sk->dport; + tuple.dst.protonum = IPPROTO_TCP;
/* We only do TCP at the moment: is there a better way? */
if (strcmp(sk->prot->name, "TCP") != 0) {thanks to correct, as far as i'm a newbie, i could be incorrect..
thanks for your work !
Samir Bellabes
[email protected]