lkml.org 
[lkml]   [2000]   [Sep]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
SubjectRe: Compilation failure on Alpha with test8-pre[2-6]
From

> Great. I'll apply the patch and see where the next breakage is :-P I
> believe there was a problem in the netfilter code
> (net/ipv4/netfilter/ipt_REJECT.c, lines 67-68) with the selection of
> which xchg() to use (either __xchg_u32() or __xchg_u64()as detailed in
> include/asm-alpha/system.h) since it's apparently trying to use
> __xchg_called_with_bad_pointer(), which is undefined on purpose. So
> either something's not getting called properly or the detection is messed
> up (still have to look into it).

Yeah on most architectures you cant do an xchg of a 16 bit quantity.
Rusty has a patch:

diff -ur -X /tmp/fileAYCCtF --minimal linux-2.4.0-test7-6/net/ipv4/netfilter/ipt_REJECT.c working-2.4.0-test7-6/net/ipv4/netfilter/ipt_REJECT.c
--- linux-2.4.0-test7-6/net/ipv4/netfilter/ipt_REJECT.c Tue Aug 22 17:28:14 2000
+++ working-2.4.0-test7-6/net/ipv4/netfilter/ipt_REJECT.c Wed Aug 23 18:46:15 2000
@@ -27,6 +27,7 @@
struct tcphdr *otcph, *tcph;
struct rtable *rt;
unsigned int otcplen;
+ u_int16_t tmp;
int needs_ack;

/* IP header checks: fragment, too short. */
@@ -64,8 +65,11 @@

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);
- tcph->source = xchg(&tcph->dest, tcph->source);
+ tmp = tcph->source;
+ tcph->source = tcph->dest;
+ tcph->dest = tmp;

/* Truncate to length (no data) */
tcph->doff = sizeof(struct tcphdr)/4;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 12:38    [W:0.073 / U:45.220 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site