* [PATCH] ipt_XOR fails to compile in gcc4
@ 2005-01-11 0:36 Phil Oester
2005-02-01 11:05 ` Harald Welte
0 siblings, 1 reply; 2+ messages in thread
From: Phil Oester @ 2005-01-11 0:36 UTC (permalink / raw)
To: netfilter-devel
[-- Attachment #1: Type: text/plain, Size: 143 bytes --]
As reported by Pawe³ Sikora, the attached fix is required by
GCC 4 due to elimination of lvalue in assignments.
Resolves bugzilla #264
Phil
[-- Attachment #2: patch-xor --]
[-- Type: text/plain, Size: 981 bytes --]
diff -ru pom-orig/XOR/linux-2.6/net/ipv4/netfilter/ipt_XOR.c pom-new/XOR/linux-2.6/net/ipv4/netfilter/ipt_XOR.c
--- pom-orig/XOR/linux-2.6/net/ipv4/netfilter/ipt_XOR.c 2004-02-25 03:59:06.000000000 -0500
+++ pom-new/XOR/linux-2.6/net/ipv4/netfilter/ipt_XOR.c 2005-01-10 19:34:01.218767184 -0500
@@ -40,7 +40,7 @@
tcph = (struct tcphdr *) ((*pskb)->data + iph->ihl*4);
for (i=0, j=0; i<(ntohs(iph->tot_len) - iph->ihl*4 - tcph->doff*4); ) {
for (k=0; k<=info->block_size; k++) {
- (char) (*pskb)->data[ iph->ihl*4 + tcph->doff*4 + i ] ^=
+ (*pskb)->data[ iph->ihl*4 + tcph->doff*4 + i ] ^=
info->key[j];
i++;
}
@@ -52,7 +52,7 @@
udph = (struct udphdr *) ((*pskb)->data + iph->ihl*4);
for (i=0, j=0; i<(ntohs(udph->len)-8); ) {
for (k=0; k<=info->block_size; k++) {
- (char) (*pskb)->data[ iph->ihl*4 + sizeof(struct udphdr) + i ] ^=
+ (*pskb)->data[ iph->ihl*4 + sizeof(struct udphdr) + i ] ^=
info->key[j];
i++;
}
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] ipt_XOR fails to compile in gcc4
2005-01-11 0:36 [PATCH] ipt_XOR fails to compile in gcc4 Phil Oester
@ 2005-02-01 11:05 ` Harald Welte
0 siblings, 0 replies; 2+ messages in thread
From: Harald Welte @ 2005-02-01 11:05 UTC (permalink / raw)
To: Phil Oester; +Cc: netfilter-devel
[-- Attachment #1: Type: text/plain, Size: 573 bytes --]
On Mon, Jan 10, 2005 at 04:36:32PM -0800, Phil Oester wrote:
> As reported by Pawe³ Sikora, the attached fix is required by
> GCC 4 due to elimination of lvalue in assignments.
thanks, applied.
--
- Harald Welte <laforge@netfilter.org> http://www.netfilter.org/
============================================================================
"Fragmentation is like classful addressing -- an interesting early
architectural error that shows how much experimentation was going
on while IP was being designed." -- Paul Vixie
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2005-02-01 11:05 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-01-11 0:36 [PATCH] ipt_XOR fails to compile in gcc4 Phil Oester
2005-02-01 11:05 ` Harald Welte
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.