All of lore.kernel.org
 help / color / mirror / Atom feed
* [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

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.