From ca6654bac6816d2be7170422252aa1ce84309ef5 Mon Sep 17 00:00:00 2001 From: David Weinehall Date: Fri, 23 Nov 2007 15:12:26 -0500 Subject: [PATCH] Linux 2.0.40-rc2 o Fix ICMP bug (David S. Miller) o Add autodetection for wd1002s-wx2 (Paul, who appears to in the xd-driver have no last name =]) o Fix path MTU discovery for (Kirk Petersen) transparent TCP sockets o Revert array-size change in (David Weinehall, on advise from include/linux/module.h Jari Ruusu) o Remove workaround for gcc-2.4.5 (Adrian Bunk) | This is basically a whitespace- | change, since it removes code | inside an #ifdef #endif clause --- Makefile | 2 +- drivers/block/xd.c | 1 + drivers/char/ftape/fdc-io.c | 12 ------------ include/linux/module.h | 4 ++-- net/ipv4/icmp.c | 4 ++-- net/ipv4/ip_fragment.c | 15 ++++++++++++--- 6 files changed, 18 insertions(+), 20 deletions(-) diff --git a/Makefile b/Makefile index 1bb6f9089428..aa120a8c9123 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ VERSION = 2 PATCHLEVEL = 0 SUBLEVEL = 40 -EXTRAVERSION =-rc1 +EXTRAVERSION =-rc2 KERNELRELEASE=$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION) diff --git a/drivers/block/xd.c b/drivers/block/xd.c index 2a5d9546cce7..2bd4319ddf7d 100644 --- a/drivers/block/xd.c +++ b/drivers/block/xd.c @@ -114,6 +114,7 @@ static XD_SIGNATURE xd_sigs[] = { { 0x0010,"ST11 BIOS v1.7",xd_seagate_init_controller,xd_seagate_init_drive," Seagate ST11R" }, /* Alan Hourihane, alanh@fairlite.demon.co.uk */ { 0x1000,"(c)Copyright 1987 SMS",xd_omti_init_controller,xd_omti_init_drive,"n OMTI 5520" }, /* Dirk Melchers, dirk@merlin.nbg.sub.org */ { 0x0006,"COPYRIGHT XEBEC (C) 1984",xd_xebec_init_controller,xd_xebec_init_drive," XEBEC" }, /* Andrzej Krzysztofowicz, ankry@mif.pg.gda.pl */ + { 0x0008,"(C) Copyright 1984 Western Digital Corp", xd_wd_init_controller, xd_wd_init_drive," Western Dig. 1002s-wx2" }, }; static u_char *xd_bases[] = { diff --git a/drivers/char/ftape/fdc-io.c b/drivers/char/ftape/fdc-io.c index fc756e58d5dd..7812278d5d49 100644 --- a/drivers/char/ftape/fdc-io.c +++ b/drivers/char/ftape/fdc-io.c @@ -852,18 +852,6 @@ int setup_fdc_and_dma(buffer_struct * buff, unsigned char operation) set_dma_mode(fdc.dma, dma_mode); set_dma_addr(fdc.dma, (unsigned) buff->ptr); set_dma_count(fdc.dma, SECTOR_SIZE * buff->sector_count); -#ifdef GCC_2_4_5_BUG - /* This seemingly stupid construction confuses the gcc-2.4.5 - * code generator enough to create correct code. - */ - if (1) { - int i; - - for (i = 0; i < 1; ++i) { - udelay(1); - } - } -#endif enable_dma(fdc.dma); /* Issue FDC command to start reading/writing. */ diff --git a/include/linux/module.h b/include/linux/module.h index 57bac0e9f1da..95900a407449 100644 --- a/include/linux/module.h +++ b/include/linux/module.h @@ -52,8 +52,8 @@ struct symbol_table { /* received from "insmod" */ int size; /* total, including string table!!! */ int n_symbols; int n_refs; - struct internal_symbol symbol[1]; /* actual size defined by n_symbols */ - struct module_ref ref[1]; /* actual size defined by n_refs */ + struct internal_symbol symbol[0]; /* actual size defined by n_symbols */ + struct module_ref ref[0]; /* actual size defined by n_refs */ }; /* * Note: The string table follows immediately after the symbol table in memory! diff --git a/net/ipv4/icmp.c b/net/ipv4/icmp.c index fc977a4cace9..76524336898e 100644 --- a/net/ipv4/icmp.c +++ b/net/ipv4/icmp.c @@ -1011,7 +1011,7 @@ int icmp_chkaddr(struct sk_buff *skb) { struct tcphdr *th = (struct tcphdr *)(((unsigned char *)iph)+(iph->ihl<<2)); - sk = tcp_v4_lookup(iph->saddr, th->source, iph->daddr, th->dest, skb->dev); + sk = tcp_v4_lookup(iph->daddr, th->dest, iph->saddr, th->source, skb->dev); if (!sk) return 0; if (sk->saddr != iph->saddr) return 0; if (sk->daddr != iph->daddr) return 0; @@ -1025,7 +1025,7 @@ int icmp_chkaddr(struct sk_buff *skb) { struct udphdr *uh = (struct udphdr *)(((unsigned char *)iph)+(iph->ihl<<2)); - sk = udp_v4_lookup(iph->saddr, uh->source, iph->daddr, uh->dest, skb->dev); + sk = udp_v4_lookup(iph->daddr, uh->dest, iph->saddr, uh->source, skb->dev); if (!sk) return 0; if (sk->saddr != iph->saddr && ip_chk_addr(iph->saddr) != IS_MYADDR) return 0; diff --git a/net/ipv4/ip_fragment.c b/net/ipv4/ip_fragment.c index 529b3215525d..0ee4b39af7e4 100644 --- a/net/ipv4/ip_fragment.c +++ b/net/ipv4/ip_fragment.c @@ -211,9 +211,18 @@ static void ip_expire(unsigned long arg) ip_statistics.IpReasmTimeout++; ip_statistics.IpReasmFails++; /* This if is always true... shrug */ - if(qp->fragments!=NULL) - icmp_send(qp->fragments->skb,ICMP_TIME_EXCEEDED, - ICMP_EXC_FRAGTIME, 0, qp->dev); + if(qp->fragments!=NULL) { + struct sk_buff *skb = qp->fragments->skb; + struct iphdr *iph = skb->ip_hdr; + + /* ICMP send engine expects skb->data to be just + * past IP header. + */ + skb_pull(skb, iph->ihl * 4); + + icmp_send(skb, ICMP_TIME_EXCEEDED, + ICMP_EXC_FRAGTIME, 0, qp->dev); + } /* * Nuke the fragment queue. -- 2.39.5