lkml.org 
[lkml]   [1998]   [Oct]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: Either the IP masq code or my brain is broken.
On Tue, Oct 27, 1998 at 12:01:24PM +0100, David Woodhouse wrote:
> > For what address exactly does the oops occur?
>
> I've got three oopsen on record (of my own). Of those, one was 'page fault
> from irq handler', and the other two were oopsing on the address c2000000.
[...]

Could you check if this patch solves the problem?

Index: linux/net/ipv4/ip_masq.c
===================================================================
RCS file: /vger/u4/cvs/linux/net/ipv4/ip_masq.c,v
retrieving revision 1.26
diff -u -r1.26 ip_masq.c
--- ip_masq.c 1998/09/24 03:38:58 1.26
+++ ip_masq.c 1998/10/29 14:31:05
@@ -1011,14 +1011,19 @@
switch (skb->ip_summed)
{
case CHECKSUM_NONE:
+ {
+ int datasz;
doff = proto_doff(iph->protocol, h.raw);
- csum = csum_partial(h.raw + doff, size - doff, 0);
+ datasz = size - doff;
+ if (datasz < 0)
+ return -1;
+ csum = csum_partial(h.raw + doff, datasz, 0);
IP_MASQ_DEBUG(3, "O-pkt: %s I-datacsum=%d\n",
masq_proto_name(iph->protocol),
csum);

skb->csum = csum_partial(h.raw , doff, csum);
-
+ }
case CHECKSUM_HW:
if (csum_tcpudp_magic(iph->saddr, iph->daddr,
size, iph->protocol, skb->csum))


-Andi

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:45    [from the cache]
©2003-2011 Jasper Spaans