This was caught by the s390 folks and this is the fix I'm
using in my tree.
--- ipt_REJECT.c.~1~ Mon Oct 1 19:22:36 2001
+++ ipt_REJECT.c Mon Feb 25 14:11:19 2002
@@ -39,7 +39,8 @@
struct tcphdr *otcph, *tcph;
struct rtable *rt;
unsigned int otcplen;
- u_int16_t tmp;
+ u_int16_t tmp_port;
+ u_int32_t tmp_addr;
int needs_ack;
/* IP header checks: fragment, too short. */
@@ -78,10 +79,12 @@
tcph = (struct tcphdr *)((u_int32_t*)nskb->nh.iph + nskb->nh.iph->ihl);
/* Swap source and dest */
- nskb->nh.iph->daddr = xchg(&nskb->nh.iph->saddr, nskb->nh.iph->daddr);
- tmp = tcph->source;
+ tmp_addr = nskb->nh.iph->saddr;
+ nskb->nh.iph->saddr = nskb->nh.iph->daddr;
+ nskb->nh.iph->daddr = tmp_addr;
+ tmp_port = tcph->source;
tcph->source = tcph->dest;
- tcph->dest = tmp;
+ tcph->dest = tmp_port;
/* Truncate to length (no data) */
tcph->doff = sizeof(struct tcphdr)/4;