]> git.neil.brown.name Git - history.git/commitdiff
Import 2.4.0-test5pre1 2.4.0-test5pre1
authorLinus Torvalds <torvalds@linuxfoundation.org>
Fri, 23 Nov 2007 20:36:51 +0000 (15:36 -0500)
committerLinus Torvalds <torvalds@linuxfoundation.org>
Fri, 23 Nov 2007 20:36:51 +0000 (15:36 -0500)
44 files changed:
Documentation/Changes
Documentation/networking/tulip.txt
Makefile
README
arch/m68k/amiga/amisound.c
arch/m68k/apollo/dn_ints.c
arch/m68k/atari/atakeyb.c
arch/m68k/mac/macboing.c
drivers/block/acsi_slm.c
drivers/block/ps2esdi.c
drivers/cdrom/aztcd.c
drivers/cdrom/sjcd.c
drivers/char/amikeyb.c
drivers/char/dn_keyb.c
drivers/char/ip2main.c
drivers/mtd/Makefile
drivers/mtd/pmc551.c
drivers/net/atari_bionet.c
drivers/net/atari_pamsnet.c
drivers/net/pcmcia/xircom_tulip_cb.c
drivers/net/sk_g16.c
drivers/net/tulip/tulip_core.c
drivers/net/wan/cycx_main.c
drivers/parport/share.c
drivers/scsi/pluto.c
include/linux/cyclomx.h
include/linux/netfilter_ipv4/ip_nat_core.h
include/linux/netfilter_ipv4/ip_tables.h
include/linux/netfilter_ipv4/ipt_REJECT.h
include/linux/netfilter_ipv6/ip6_tables.h
mm/vmscan.c
net/core/netfilter.c
net/decnet/dn_route.c
net/ipv4/netfilter/ip_conntrack_core.c
net/ipv4/netfilter/ip_conntrack_standalone.c
net/ipv4/netfilter/ip_fw_compat.c
net/ipv4/netfilter/ip_fw_compat_masq.c
net/ipv4/netfilter/ip_nat_core.c
net/ipv4/netfilter/ip_nat_standalone.c
net/ipv4/netfilter/ip_queue.c
net/ipv4/netfilter/ip_tables.c
net/ipv4/netfilter/ipt_REJECT.c
net/ipv6/netfilter/ip6_tables.c
scripts/Menuconfig

index 525932df1ecbdef1e0aeee68c705749e6c1a49f2..f8b055d213591478ce23970fb64591e20a9e9049 100644 (file)
@@ -317,12 +317,12 @@ o  ftp://ftp.isdn4linux.de/pub/isdn4linux/utils/testing/isdn4k-
 
 Netfilter
 ---------
-o  http://netfilter.filewatcher.org/iptables-1.1.0.tar.bz2
-     <http://netfilter.filewatcher.org/iptables-1.1.0.tar.bz2>
-o  http://www.samba.org/netfilter/iptables-1.1.0.tar.bz2
-     <http://www.samba.org/netfilter/iptables-1.1.0.tar.bz2>
-o  http://netfilter.kernelnotes.org/iptables-1.1.0.tar.bz2
-     <http://netfilter.kernelnotes.org/iptables-1.1.0.tar.bz2>
+o  http://netfilter.filewatcher.org/iptables-1.1.1.tar.bz2
+     <http://netfilter.filewatcher.org/iptables-1.1.1.tar.bz2>
+o  http://www.samba.org/netfilter/iptables-1.1.1.tar.bz2
+     <http://www.samba.org/netfilter/iptables-1.1.1.tar.bz2>
+o  http://netfilter.kernelnotes.org/iptables-1.1.1.tar.bz2
+     <http://netfilter.kernelnotes.org/iptables-1.1.1.tar.bz2>
 
 Ip-route2
 ---------
index 11494e1dc5473836e7ad1c738ad4f2d5ba583219..35d5dea652c0e2668065e138e8d6fb08fd86eb70 100644 (file)
@@ -142,6 +142,10 @@ tulip_core.c       - Driver core (a.k.a. where "everything else" goes)
 
 Version history
 ===============
+0.9.8 (July 13, 2000):
+* Correct signed/unsigned comparison for dummy frame index
+* Remove outdated references to struct enet_statistics
+
 0.9.7 (June 17, 2000):
 * Timer cleanups (Andrew Morton)
 * Alpha compile fix (somebody?)
index 02f49975c44129ff481aab848ebe76e1eec157f8..22d79cbf9dcd102b3fa2acd1970794d5c68e14d0 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,7 @@
 VERSION = 2
 PATCHLEVEL = 4
 SUBLEVEL = 0
-EXTRAVERSION = -test4
+EXTRAVERSION = -test5
 
 KERNELRELEASE=$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)
 
diff --git a/README b/README
index e77f3a3e84fb3487930b2863aa3f597b0baa7730..611354d426d8c8830e8acb76b0a48963638312d4 100644 (file)
--- a/README
+++ b/README
@@ -169,14 +169,18 @@ COMPILING the kernel:
    Please note that you can still run a.out user programs with this
    kernel.
 
- - Do a "make zImage" to create a compressed kernel image.  If you want
+ - Do a "make bzImage" to create a compressed kernel image.  If you want
    to make a boot disk (without root filesystem or LILO), insert a floppy
-   in your A: drive, and do a "make zdisk".  It is also possible to do
-   "make zlilo" if you have lilo installed to suit the kernel makefiles,
+   in your A: drive, and do a "make bzdisk".  It is also possible to do
+   "make bzlilo" if you have lilo installed to suit the kernel makefiles,
    but you may want to check your particular lilo setup first. 
 
- - If your kernel is too large for "make zImage", use "make bzImage"
-   instead.
+ - In the unlikely event that your system cannot boot bzImage kernels you
+   can still compile your kernel as zImage. However, since zImage support
+   will be removed at some point in the future in favor of bzImage we
+   encourage people having problems with booting bzImage kernels to report
+   these, with detailed hardware configuration information, to the
+   linux-kernel mailing list and to H. Peter Anvin <hpa+linux@zytor.com>.
 
  - If you configured any of the parts of the kernel as `modules', you
    will have to do "make modules" followed by "make modules_install".
@@ -192,11 +196,11 @@ COMPILING the kernel:
    do a "make modules_install".
 
  - In order to boot your new kernel, you'll need to copy the kernel
-   image (found in /usr/src/linux/arch/i386/boot/zImage after compilation)
+   image (found in /usr/src/linux/arch/i386/boot/bzImage after compilation)
    to the place where your regular bootable kernel is found. 
 
    For some, this is on a floppy disk, in which case you can "cp
-   /usr/src/linux/arch/i386/boot/zImage /dev/fd0" to make a bootable
+   /usr/src/linux/arch/i386/boot/bzImage /dev/fd0" to make a bootable
    floppy.  Please note that you can not boot a kernel by
    directly dumping it to a 720k double-density 3.5" floppy.  In this
    case, it is highly recommended that you install LILO on your
@@ -204,11 +208,11 @@ COMPILING the kernel:
 
    If you boot Linux from the hard drive, chances are you use LILO which
    uses the kernel image as specified in the file /etc/lilo.conf.  The
-   kernel image file is usually /vmlinuz, or /zImage, or /etc/zImage. 
-   To use the new kernel, save a copy of the old image and copy the new
-   image over the old one.  Then, you MUST RERUN LILO to update the
-   loading map!! If you don't, you won't be able to boot the new kernel
-   image. 
+   kernel image file is usually /vmlinuz, /boot/vmlinuz, /bzImage or
+   /boot/bzImage.  To use the new kernel, save a copy of the old image
+   and copy the new image over the old one.  Then, you MUST RERUN LILO
+   to update the loading map!! If you don't, you won't be able to boot
+   the new kernel image.
 
    Reinstalling LILO is usually a matter of running /sbin/lilo. 
    You may wish to edit /etc/lilo.conf to specify an entry for your
@@ -260,9 +264,9 @@ IF SOMETHING GOES WRONG:
    the above example it's due to a bad kernel pointer). More information
    on making sense of the dump is in Documentation/oops-tracing.txt
 
- - You can use the "ksymoops" program to make sense of the dump.  Find
-   the C++ sources under the scripts/ directory to avoid having to do
-   the dump lookup by hand:
+ - You can use the "ksymoops" program to make sense of the dump.  This
+   utility can be downloaded from ftp://ftp.ocs.com.au/pub/ksymoops .
+   Alternately you can do the dump lookup by hand:
 
  - In debugging dumps like the above, it helps enormously if you can
    look up what the EIP value means.  The hex value as such doesn't help
index faba5841b4f0c8ddac3ecd4049019446c774b5b8..2210d05d6603d0cf8bd3d255247e2fc2a183ddea 100644 (file)
@@ -54,7 +54,7 @@ void __init amiga_init_sound(void)
 }
 
 static void nosound( unsigned long ignored );
-static struct timer_list sound_timer = { NULL, NULL, 0, 0, nosound };
+static struct timer_list sound_timer = { function: nosound };
 
 void amiga_mksound( unsigned int hz, unsigned int ticks )
 {
index e3a6281070a2ed21312b5a375e44be5433fe72fa..d46ba08529ebde17745a5a3967b26bbac460ee77 100644 (file)
@@ -128,8 +128,7 @@ static void dn_nosound (unsigned long ignored) {
 
 void dn_mksound( unsigned int count, unsigned int ticks ) {
 
-       static struct timer_list sound_timer = { NULL, NULL, 0, 0,
-                                                                                        dn_nosound };
+       static struct timer_list sound_timer = { function: dn_nosound };
 
        del_timer( &sound_timer );
        if(count) {
index ebef991e98183b05219c7f5ea9c6808c0bc0bd81..d7a64faea53eed57472c1384964b0bb39866eb5d 100644 (file)
@@ -272,7 +272,7 @@ static unsigned int key_repeat_delay = DEFAULT_KEYB_REP_DELAY;
 static unsigned int key_repeat_rate  = DEFAULT_KEYB_REP_RATE;
 
 static unsigned char rep_scancode;
-static struct timer_list atakeyb_rep_timer = { NULL, NULL, 0, 0, atakeyb_rep };
+static struct timer_list atakeyb_rep_timer = { function: atakeyb_rep };
 
 static void atakeyb_rep( unsigned long ignore )
 
index 557bcba2752fb6516f75751d964234ed1275fe1e..2a05a013f6113795fc3f8905742eeb1f8c8de162 100644 (file)
@@ -56,7 +56,7 @@ static void ( *mac_special_bell )( unsigned int, unsigned int, unsigned int ) =
 /*
  * our timer to start/continue/stop the bell
  */
-static struct timer_list mac_sound_timer = { NULL, NULL, 0, 0, mac_nosound };
+static struct timer_list mac_sound_timer = { function: mac_nosound };
 
 /*
  * Sort of initialize the sound chip (called from mac_mksound on the first
index 11a0a947f1ff723c3304c9b5ff6cd99cc3c08599..b8f1c693e17bce08f7832e25f8a337bd5b928bcd 100644 (file)
@@ -270,7 +270,7 @@ static int slm_get_pagesize( int device, int *w, int *h );
 /************************* End of Prototypes **************************/
 
 
-static struct timer_list slm_timer = { NULL, NULL, 0, 0, slm_test_ready };
+static struct timer_list slm_timer = { function: slm_test_ready };
 
 static struct file_operations slm_fops = {
        owner:          THIS_MODULE,
index 61cb27ec7aa0a86c88ec2800b3412b4a7da23f8f..8ff56a70aac8185b92e5596a63b45d93bb3c12bf 100644 (file)
@@ -114,14 +114,14 @@ static DECLARE_WAIT_QUEUE_HEAD(ps2esdi_int);
 static DECLARE_WAIT_QUEUE_HEAD(ps2esdi_wait_open);
 
 int no_int_yet;
-static int access_count[MAX_HD] = {0,};
-static char ps2esdi_valid[MAX_HD] = {0,};
-static int ps2esdi_sizes[MAX_HD << 6] = {0,};
-static int ps2esdi_blocksizes[MAX_HD << 6] = {0,};
-static int ps2esdi_drives = 0;
+static int access_count[MAX_HD];
+static char ps2esdi_valid[MAX_HD];
+static int ps2esdi_sizes[MAX_HD << 6];
+static int ps2esdi_blocksizes[MAX_HD << 6];
+static int ps2esdi_drives;
 static struct hd_struct ps2esdi[MAX_HD << 6];
 static u_short io_base;
-static struct timer_list esdi_timer = {{NULL, NULL}, 0, 0L, ps2esdi_reset_timer};
+static struct timer_list esdi_timer = { function: ps2esdi_reset_timer };
 static int reset_status;
 static int ps2esdi_slot = -1;
 int tp720esdi = 0;             /* Is it Integrated ESDI of ThinkPad-720? */
index 8b551a99daa4a8589fa16d737d18902ec5c1bfdb..b71f023aa699f7d55f601c84394837f9ec424090 100644 (file)
@@ -310,7 +310,7 @@ static char  azt_auto_eject = AZT_AUTO_EJECT;
 
 static int AztTimeout, AztTries;
 static DECLARE_WAIT_QUEUE_HEAD(azt_waitq);
-static struct timer_list delay_timer = { {NULL, NULL}, 0, 0, NULL };
+static struct timer_list delay_timer;
 
 static struct azt_DiskInfo DiskInfo;
 static struct azt_Toc Toc[MAX_TRACKS];
index b793bac4bf21fefb5c42a33ff70c2d50320ae652..eb102a4a7fca1f1c36b5e4a4816fe89d8fc8b064 100644 (file)
@@ -150,7 +150,7 @@ static struct sjcd_stat statistic;
 /*
  * Timer.
  */
-static struct timer_list sjcd_delay_timer = { function: NULL };
+static struct timer_list sjcd_delay_timer;
 
 #define SJCD_SET_TIMER( func, tmout )           \
     ( sjcd_delay_timer.expires = jiffies+tmout,         \
index 15e21be68ccf7c86ecb51ec90f5a0ab26d892fa0..73b8fecd21dec6be13174f87c28e29180c4f92d6 100644 (file)
@@ -176,7 +176,7 @@ static unsigned int key_repeat_rate  = DEFAULT_KEYB_REP_RATE;
 
 static unsigned char rep_scancode;
 static void amikeyb_rep(unsigned long ignore);
-static struct timer_list amikeyb_rep_timer = {NULL, NULL, 0, 0, amikeyb_rep};
+static struct timer_list amikeyb_rep_timer = {function: amikeyb_rep};
 
 static void amikeyb_rep(unsigned long ignore)
 {
index 8d8766b85a7fc951cf5ec9dab50e4db9d7f3d1c0..980ee13baaa1a793bc1bc34ddc63c3d591cb293c 100644 (file)
@@ -51,8 +51,7 @@ static u_char *shadow_buf=&debug_buf2[0];
 static short debug_buf_count=0;
 static int debug_buf_overrun=0,debug_timer_running=0;
 static unsigned long debug_buffer_updated=0;
-static struct timer_list debug_keyb_timer = { NULL, NULL, 0, 0,
-                                                                                         debug_keyb_timer_handler };
+static struct timer_list debug_keyb_timer = { function: debug_keyb_timer_handler };
 #endif
 
 static u_short dnplain_map[NR_KEYS] __initdata = {
index 449bd2f76a2aca638860274929cae7fb9f2d350e..6fbfe22dfa641a7f33cdaed78404d298d949f97a 100644 (file)
@@ -329,8 +329,7 @@ static long bh_counter = 0;
  * selected, the board is serviced periodically to see if anything needs doing.
  */
 #define  POLL_TIMEOUT   (jiffies + 1)
-static struct timer_list PollTimer = { {NULL, NULL},       0,   0, ip2_poll };
-//                                     next, prev, expires,data, func()
+static struct timer_list PollTimer = { function: ip2_poll };
 static char  TimerOn = 0;
 
 #ifdef IP2DEBUG_TRACE
index b175eb893544ba1921e49a5373ee17d22b859387..6030b63b38bb8da0dce652932cfa1e2adf33ffd6 100644 (file)
-# $Id: Makefile,v 1.21 2000/07/13 10:42:55 dwmw2 Exp $
-
-# Uncomment this to enable the DBG macro (see mtd.h)
-#CFLAGS+= -DZDBG
+#
+# Makefile for the memory technology device drivers.
+#
+# Note! Dependencies are done automagically by 'make dep', which also
+# removes any old dependencies. DON'T put your own dependencies here
+# unless it's something special (ie not a .c file).
+#
+# Note 2! The CFLAGS definitions are now inherited from the
+# parent makes..
+#
+# $Id: Makefile,v 1.22 2000/07/14 08:10:52 dwmw2 Exp $
 
 ifndef CONFIG_MTD
+
 # We're being invoked outside a normal kernel build. Fake it
 EXTRA_CFLAGS= -I$(shell pwd)/../include
 
-HWDRIVERS = slram.o docprobe.o doc1000.o nora.o physmap.o rpxlite.o vmax301.o octagon-5066.o pmc551.o mtdram.o
-USERDRIVERS = ftl.o nftl.o mtdblock.o mtdchar.o
-MIX_OBJS = mtdcore.o mapped.o doc2000.o doc2001.o cfi_probe.o cfi_cmdset_0001.o
-MI_OBJS = $(HWDRIVERS) $(USERDRIVERS)
-CFLAGS_nftl.o := -DCONFIG_NFTL_RW
-else
-
-O_TARGET       := mtdlink.o
-SUB_DIRS       :=
-ALL_SUB_DIRS   :=
-MOD_LIST_NAME  := MTD_MODULES
-
-
-ifeq ($(CONFIG_MTD),y)
-  OX_OBJS += mtdcore.o mapped.o
-else
-  ifeq ($(CONFIG_MTD),m)
-    MX_OBJS += mtdcore.o mapped.o
-  endif
-endif
-
-ifeq ($(CONFIG_MTD_NORA),y)
-  O_OBJS += nora.o
-else
-  ifeq ($(CONFIG_MTD_NORA),m)
-    M_OBJS += nora.o
-  endif
-endif
-
-ifeq ($(CONFIG_MTD_RPXLITE),y)
-  O_OBJS += rpxlite.o
-else
-  ifeq ($(CONFIG_MTD_RPXLITE),m)
-    M_OBJS += rpxlite.o
-  endif
-endif
-
-ifeq ($(CONFIG_MTD_PHYSMAP),y)
-  O_OBJS += physmap.o
-else
-  ifeq ($(CONFIG_MTD_PHYSMAP),m)
-    M_OBJS += physmap.o
-  endif
-endif
-
-ifeq ($(CONFIG_MTD_CFI),y)
-  OX_OBJS += cfi_probe.o
-else
-  ifeq ($(CONFIG_MTD_CFI),m)
-    MX_OBJS += cfi_probe.o
-  endif
-endif
-
-ifeq ($(CONFIG_MTD_CFI_INTELEXT),y)
-  OX_OBJS += cfi_cmdset_0001.o
-else
-  ifeq ($(CONFIG_MTD_CFI_INTELEXT),m)
-    MX_OBJS += cfi_cmdset_0001.o
-  endif
-endif
-
-ifeq ($(CONFIG_MTD_CFI_AMDSTD),y)
-  OX_OBJS += cfi_cmdset_0002.o
-else
-  ifeq ($(CONFIG_MTD_CFI_AMDSTD),m)
-    MX_OBJS += cfi_cmdset_0002.o
-  endif
-endif
-
-ifeq ($(CONFIG_MTD_DOC1000),y)
-  O_OBJS += doc1000.o
-else
-  ifeq ($(CONFIG_MTD_DOC1000),m)
-    M_OBJS += doc1000.o
-  endif
-endif
-
-ifeq ($(CONFIG_MTD_DOC2000),y)
-  OX_OBJS += doc2000.o
-else
-  ifeq ($(CONFIG_MTD_DOC2000),m)
-    MX_OBJS += doc2000.o
-  endif
-endif
+MIX_OBJS = mtdcore.o doc2000.o doc2001.o cfi_probe.o cfi_cmdset_0001.o \
+       map_ram.o map_rom.o cfi_cmdset_0002.o
+MI_OBJS = doc1000.o docprobe.o slram.o pmc551.o mtdram.o physmap.o \
+       nora.o octagon-5066.o pnc2000.o rpxlite.o vmax301.o mtdchar.o \
+       mtdblock.o ftl.o nftl.o
 
-ifeq ($(CONFIG_MTD_DOC2001),y)
-  OX_OBJS += doc2001.o
-else
-  ifeq ($(CONFIG_MTD_DOC2001),m)
-    MX_OBJS += doc2001.o
-  endif
-endif
-
-ifeq ($(CONFIG_MTD_DOCPROBE),y)
-  O_OBJS += docprobe.o
-else
-  ifeq ($(CONFIG_MTD_DOCPROBE),m)
-    M_OBJS += docprobe.o
-  endif
-endif
-
-ifeq ($(CONFIG_MTD_SLRAM),y)
-  O_OBJS += slram.o
-else
-  ifeq ($(CONFIG_MTD_SLRAM),m)
-    M_OBJS += slram.o
-  endif
-endif
-
-ifeq ($(CONFIG_MTD_OCTAGON),y)
-  O_OBJS += octagon-5066.o
-else
-  ifeq ($(CONFIG_MTD_OCTAGON),m)
-    M_OBJS += octagon-5066.o
-  endif
-endif
-
-ifeq ($(CONFIG_MTD_PMC551),y)
-  O_OBJS += pmc551.o
-else
-  ifeq ($(CONFIG_MTD_PMC551),m)
-    M_OBJS += pmc551.o
-  endif
-endif
-
-ifeq ($(CONFIG_MTD_PMC551_BUGFIX),y)
-  CFLAGS_pmc551.o += -DPMC551_DRAM_BUG
-endif
-
-ifeq ($(CONFIG_MTD_VMAX),y)
-  O_OBJS += vmax301.o
-else
-  ifeq ($(CONFIG_MTD_VMAX),m)
-    M_OBJS += vmax301.o
-  endif
-endif
+CFLAGS_nftl.o := -DCONFIG_NFTL_RW
+CFLAGS_mtdram.o := -DCONFIG_MTDRAM_TOTAL_SIZE=4096 -DCONFIG_MTDRAM_ERASE_SIZE=128
+CFLAGS_physmap.o := -DCONFIG_MTD_PHYSMAP_START=0x8000000 -DCONFIG_MTD_PHYSMAP_LEN=0x4000000
 
-ifeq ($(CONFIG_MTD_MIXMEM),y)
-  O_OBJS += mixmem.o
-else
-  ifeq ($(CONFIG_MTD_MIXMEM),m)
-    M_OBJS += mixmem.o
-  endif
-endif
+else 
 
-ifeq ($(CONFIG_MTD_MTDRAM),y)
-  O_OBJS += mtdram.o
-else
-  ifeq ($(CONFIG_MTD_MTDRAM),m)
-    M_OBJS += mtdram.o
-  endif
-endif
+O_OBJS          :=
+OX_OBJS         :=
+M_OBJS          :=
+MX_OBJS         :=
 
-ifeq ($(CONFIG_MTD_PNC2000),y)
-  O_OBJS += pnc2000.o
-else
-  ifeq ($(CONFIG_MTD_PNC2000),m)
-    M_OBJS += pnc2000.o
-  endif
-endif
+# Object file lists.
 
-ifeq ($(CONFIG_FTL),y)
-  O_OBJS += ftl.o
-else
-  ifeq ($(CONFIG_FTL),m)
-    M_OBJS += ftl.o
-  endif
-endif
-
-ifeq ($(CONFIG_NFTL),y)
-  O_OBJS += nftl.o
-else
-  ifeq ($(CONFIG_NFTL),m)
-    M_OBJS += nftl.o
-  endif
-endif
+obj-y           :=
+obj-m           :=
+obj-n           :=
+obj-            :=
 
-ifeq ($(CONFIG_MTD_BLOCK),y)
-  O_OBJS += mtdblock.o
-else
-  ifeq ($(CONFIG_MTD_BLOCK),m)
-    M_OBJS += mtdblock.o
-  endif
-endif
+O_TARGET       := mtdlink.o
+SUB_DIRS       :=
+ALL_SUB_DIRS   :=
+MOD_SUB_DIRS   :=
+MOD_LIST_NAME  := MTD_MODULES
 
+export-objs    :=      mtdcore.o doc2000.o doc2001.o cfi_probe.o cfi_cmdset_0001.o cfi_cmdset_0002.o
+list-multi     :=
+
+# MTD devices
+obj-$(CONFIG_MTD)              += mtdcore.o
+obj-$(CONFIG_MTD_DOC1000)      += doc1000.o
+obj-$(CONFIG_MTD_DOC2000)      += doc2000.o
+obj-$(CONFIG_MTD_DOC2001)      += doc2001.o
+obj-$(CONFIG_MTD_DOCPROBE)     += docprobe.o
+obj-$(CONFIG_MTD_SLRAM)                += slram.o
+obj-$(CONFIG_MTD_PMC551)       += pmc551.o
+obj-$(CONFIG_MTD_MTDRAM)       += mtdram.o
+
+# Chip drivers
+obj-$(CONFIG_MTD_JEDEC)                += jedec.o
+obj-$(CONFIG_MTD_RAM)          += map_ram.o
+obj-$(CONFIG_MTD_ROM)          += map_rom.o
+obj-$(CONFIG_MTD_CFI)          += cfi_probe.o
+obj-$(CONFIG_MTD_CFI_INTELEXT) += cfi_cmdset_0001.o
+obj-$(CONFIG_MTD_CFI_AMDSTD)   += cfi_cmdset_0002.o
+
+# Chip mappings
+obj-$(CONFIG_MTD_PHYSMAP)      += physmap.o
+obj-$(CONFIG_MTD_MIXMEM)       += mixmem.o
+obj-$(CONFIG_MTD_NORA)         += nora.o
+obj-$(CONFIG_MTD_OCTAGON)      += octagon-5066.o
+obj-$(CONFIG_MTD_PNC2000)      += pnc2000.o
+obj-$(CONFIG_MTD_RPXLITE)      += rpxlite.o
+obj-$(CONFIG_MTD_VMAX)         += vmax301.o
+
+# Users
+obj-$(CONFIG_MTD_CHAR)         += mtdchar.o
+obj-$(CONFIG_MTD_BLOCK)                += mtdblock.o
+obj-$(CONFIG_FTL)              += ftl.o
+obj-$(CONFIG_NFTL)             += nftl.o
+
+# Extract lists of the multi-part drivers.
+# The 'int-*' lists are the intermediate files used to build the multi's.
+
+multi-y         := $(filter $(list-multi), $(obj-y))
+multi-m         := $(filter $(list-multi), $(obj-m))
+int-y           := $(sort $(foreach m, $(multi-y), $($(basename $(m))-objs)))
+int-m           := $(sort $(foreach m, $(multi-m), $($(basename $(m))-objs)))
+
+# Files that are both resident and modular: remove from modular.
+
+obj-m           := $(filter-out $(obj-y), $(obj-m))
+int-m           := $(filter-out $(int-y), $(int-m))
+
+# Take multi-part drivers out of obj-y and put components in.
+
+obj-y           := $(filter-out $(list-multi), $(obj-y)) $(int-y)
+
+# Translate to Rules.make lists.
+
+O_OBJS          := $(filter-out $(export-objs), $(obj-y))
+OX_OBJS         := $(filter     $(export-objs), $(obj-y))
+M_OBJS          := $(sort $(filter-out $(export-objs), $(obj-m)))
+MX_OBJS         := $(sort $(filter     $(export-objs), $(obj-m)))
 
-ifeq ($(CONFIG_MTD_CHAR),y)
-  O_OBJS += mtdchar.o
-else
-  ifeq ($(CONFIG_MTD_CHAR),m)
-    M_OBJS += mtdchar.o
-  endif
-endif
 
 endif
 
index 98d5c306929c98bfa1c70487f47db159322239e8..fdc80cbcfd202435310d839b9f960f199697a3a4 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: pmc551.c,v 1.7 2000/07/03 10:01:38 dwmw2 Exp $
+ * $Id: pmc551.c,v 1.8 2000/07/14 07:53:31 dwmw2 Exp $
  *
  * PMC551 PCI Mezzanine Ram Device
  *
@@ -53,6 +53,7 @@
  *       hang w/ a reboot beeing the only chance at recover.
  */
 
+#include <linux/config.h>
 #include <linux/kernel.h>
 #include <linux/module.h>
 #include <asm/uaccess.h>
@@ -343,7 +344,7 @@ out:
  */
 static u32 fixup_pmc551 (struct pci_dev *dev)
 {
-#ifdef PMC551_DRAM_BUG
+#ifdef CONFIG_MTD_PMC551_BUGFIX
         u32 dram_data;
 #endif
         u32 size, dcmd;
@@ -362,7 +363,7 @@ static u32 fixup_pmc551 (struct pci_dev *dev)
          * row mux values.  We fix them here, but this will break other
          * memory configurations.
          */
-#ifdef PMC551_DRAM_BUG
+#ifdef CONFIG_MTD_PMC551_BUGFIX
         pci_read_config_dword(dev, PMC551_DRAM_BLK0, &dram_data);
         size = PMC551_DRAM_BLK_GET_SIZE(dram_data);
         dram_data = PMC551_DRAM_BLK_SET_COL_MUX(dram_data, 0x5);
@@ -386,7 +387,7 @@ static u32 fixup_pmc551 (struct pci_dev *dev)
         dram_data = PMC551_DRAM_BLK_SET_COL_MUX(dram_data, 0x5);
         dram_data = PMC551_DRAM_BLK_SET_ROW_MUX(dram_data, 0x9);
         pci_write_config_dword(dev, PMC551_DRAM_BLK3, dram_data);
-#endif /* PMC551_DRAM_BUG */
+#endif /* CONFIG_MTD_PMC551_BUGFIX */
 
         /*
          * Oops .. something went wrong
@@ -550,7 +551,7 @@ int __init init_pmc551(void)
 
 
         printk(KERN_NOTICE "Ramix PMC551 PCI Mezzanine Ram Driver. (C) 1999,2000 Nortel Networks.\n");
-        printk(KERN_INFO "$Id: pmc551.c,v 1.7 2000/07/03 10:01:38 dwmw2 Exp $\n");
+        printk(KERN_INFO "$Id: pmc551.c,v 1.8 2000/07/14 07:53:31 dwmw2 Exp $\n");
 
         if(!pci_present()) {
                 printk(KERN_NOTICE "pmc551: PCI not enabled.\n");
index b0d8e73d46e03a6d3342461f09e24f0f68d235e0..275ef3296bf6c68a6e956c916e3f5d4f495f659d 100644 (file)
@@ -158,7 +158,7 @@ static int bionet_close(struct net_device *dev);
 static struct net_device_stats *net_get_stats(struct net_device *dev);
 static void bionet_tick(unsigned long);
 
-static struct timer_list bionet_timer = { NULL, NULL, 0, 0, bionet_tick };
+static struct timer_list bionet_timer = { function: bionet_tick };
 
 #define STRAM_ADDR(a)  (((a) & 0xff000000) == 0)
 
index f9b1eef796916dd40d144981bfe9127d86d7233b..6aeb737d5d864e72f9170d827a41fffc8968273d 100644 (file)
@@ -168,7 +168,7 @@ static void pamsnet_tick(unsigned long);
 
 static void pamsnet_intr(int irq, void *data, struct pt_regs *fp);
 
-static struct timer_list pamsnet_timer = { NULL, NULL, 0, 0, pamsnet_tick };
+static struct timer_list pamsnet_timer = { function: amsnet_tick };
 
 #define STRAM_ADDR(a)  (((a) & 0xff000000) == 0)
 
index f8075373e5b78983b59c619f8355ad3f59797271..46f37e946a60174ad594952d26e6de8fcc48a5f2 100644 (file)
@@ -3010,7 +3010,8 @@ static void set_rx_mode(struct net_device *dev)
                        /* Same setup recently queued, we need not add it. */
                } else {
                        unsigned long flags;
-                       unsigned int entry, dummy = -1;
+                       unsigned int entry;
+                       int dummy = -1;
 
                        save_flags(flags); cli();
                        entry = tp->cur_tx++ % TX_RING_SIZE;
index 1a6da6e790f0c03bd3c055363fe494ab0dc17cf8..8ecc46db2dd104af9c666237753ae5feaba29859 100644 (file)
@@ -632,6 +632,8 @@ static int __init SK_init_module (void)
        if (!SK_dev)
                return -ENOMEM;
        
+       SK_dev->base_addr = io;
+
        rc = SK_init (SK_dev);
        if (rc) {
                unregister_netdev (SK_dev);
index 9079f8113f9cdac21a285d133f35381240123f3b..4f6252383d04edc8e5b6880ac51b220a4ec3cf13 100644 (file)
@@ -19,8 +19,6 @@
 
 */
 
-static const char version[] = "Linux Tulip driver version 0.9.7 (June 17, 2000)\n";
-
 #include <linux/module.h>
 #include "tulip.h"
 #include <linux/pci.h>
@@ -29,6 +27,9 @@ static const char version[] = "Linux Tulip driver version 0.9.7 (June 17, 2000)\
 #include <linux/delay.h>
 #include <asm/unaligned.h>
 
+static char version[] __devinitdata =
+       "Linux Tulip driver version 0.9.8 (July 13, 2000)\n";
+
 
 /* A few user-configurable values. */
 
@@ -948,7 +949,8 @@ static void set_rx_mode(struct net_device *dev)
                if (tp->cur_tx - tp->dirty_tx > TX_RING_SIZE - 2) {
                        /* Same setup recently queued, we need not add it. */
                } else {
-                       unsigned int entry, dummy = -1;
+                       unsigned int entry;
+                       int dummy = -1;
 
                        /* Now add this frame to the Tx list. */
 
index eff2559d0f508eabde5f24b8f69d0d14af61cddd..207c9e21c4bb29ef5b78a2c9f76774b26840f3bf 100644 (file)
@@ -13,6 +13,8 @@
 *              as published by the Free Software Foundation; either version
 *              2 of the License, or (at your option) any later version.
 * ============================================================================
+* 2000/07/13   acme            remove useless #ifdef MODULE and crap
+*                                                      #if KERNEL_VERSION > blah
 * 2000/07/06   acme            __exit at cyclomx_cleanup
 * 2000/04/02   acme            dprintk and cycx_debug
 *                              module_init/module_exit
 
 unsigned int cycx_debug = 0;
 
-#ifdef MODULE
 MODULE_AUTHOR("Arnaldo Carvalho de Melo");
 MODULE_DESCRIPTION("Cyclom 2X Sync Card Driver.");
 MODULE_PARM(debug, "i");
 MODULE_PARM_DESC(debug, "cyclomx debug level");
-#endif
 
 /* Defines & Macros */
 
 #define        DRV_VERSION     0               /* version number */
-#define        DRV_RELEASE     8               /* release (minor version) number */
+#define        DRV_RELEASE     9               /* release (minor version) number */
 #define        MAX_CARDS       1               /* max number of adapters */
 
-#ifndef        CONFIG_CYCLOMX_CARDS            /* configurable option */
 #define        CONFIG_CYCLOMX_CARDS 1
-#endif
 
 /* Function Prototypes */
 
@@ -225,11 +223,7 @@ static int setup (wan_device_t *wandev, wandev_conf_t *conf)
        card->hw.dpmsize = CYCX_WINDOWSIZE;
        card->hw.fwid = CFID_X25_2X;
        card->lock = SPIN_LOCK_UNLOCKED;
-#if LINUX_VERSION_CODE >= 0x020300
        init_waitqueue_head(&card->wait_stats);
-#else
-       card->wait_stats = NULL;
-#endif
        err = cycx_setup(&card->hw, conf->data, conf->data_size);
 
        if (err) {
index 50eb808429c8d0f0f1517503ce6ee1f11d548df1..92618e7b4680efa41e186920c08b23490a8f880d 100644 (file)
@@ -122,7 +122,7 @@ static void attach_driver_chain(struct parport *port)
 
        spin_lock (&driverlist_lock);
        for (i = 0, drv = driver_chain; drv && i < count; drv = drv->next)
-               attach[i] = drv->attach;
+               attach[i++] = drv->attach;
        spin_unlock (&driverlist_lock);
 
        for (count = 0; count < i; count++)
@@ -181,6 +181,9 @@ int parport_register_driver (struct parport_driver *drv)
        struct parport **ports;
        int count = 0, i;
 
+       if (!portlist)
+               get_lowlevel_driver ();
+
        /* We have to take the portlist lock for this to be sure
         * that port is valid for the duration of the callback. */
 
@@ -201,7 +204,7 @@ int parport_register_driver (struct parport_driver *drv)
                spin_lock (&parportlist_lock);
                for (i = 0, port = portlist; port && i < count;
                     port = port->next)
-                       ports[i] = port;
+                       ports[i++] = port;
                spin_unlock (&parportlist_lock);
 
                for (count = 0; count < i; count++)
@@ -210,9 +213,6 @@ int parport_register_driver (struct parport_driver *drv)
                kfree (ports);
        }
 
-       if (!portlist)
-               get_lowlevel_driver ();
-
        spin_lock (&driverlist_lock);
        drv->next = driver_chain;
        driver_chain = drv;
index 518f1e26edb5ec50f43227d0628183f98d37cb69..b4ebd88f38e0238b1545848213e4593d587eb791 100644 (file)
@@ -48,7 +48,6 @@ static struct ctrl_inquiry {
 } *fcs __initdata = { 0 };
 static int fcscount __initdata = 0;
 static atomic_t fcss __initdata = ATOMIC_INIT(0);
-static struct timer_list fc_timer __initdata = { function: NULL };
 DECLARE_MUTEX_LOCKED(fc_sem);
 
 static int pluto_encode_addr(Scsi_Cmnd *SCpnt, u16 *addr, fc_channel *fc, fcp_cmnd *fcmd);
@@ -92,6 +91,7 @@ int __init pluto_detect(Scsi_Host_Template *tpnt)
        int i, retry, nplutos;
        fc_channel *fc;
        Scsi_Device dev;
+       struct timer_list fc_timer = { function: pluto_detect_timeout };
 
        tpnt->proc_name = "pluto";
        fcscount = 0;
@@ -121,7 +121,6 @@ int __init pluto_detect(Scsi_Host_Template *tpnt)
        memset (fcs, 0, sizeof (struct ctrl_inquiry) * fcscount);
        memset (&dev, 0, sizeof(dev));
        atomic_set (&fcss, fcscount);
-       fc_timer.function = pluto_detect_timeout;
        
        i = 0;
        for_each_online_fc_channel(fc) {
@@ -192,7 +191,7 @@ int __init pluto_detect(Scsi_Host_Template *tpnt)
                if (!atomic_read(&fcss))
                        break; /* All fc channels have answered us */
        }
-       del_timer(&fc_timer);
+       del_timer_sync(&fc_timer);
 
        PLND(("Finished search\n"))
        for (i = 0, nplutos = 0; i < fcscount; i++) {
index 983295c1835778ce7c72411f6927d834014229f7..555d38fbeed65e42afbdc7272606cb23cf6b1a17 100644 (file)
@@ -13,6 +13,7 @@
 *              as published by the Free Software Foundation; either version
 *              2 of the License, or (at your option) any later version.
 * ============================================================================
+* 2000/07/13    acme           remove crap #if KERNEL_VERSION > blah
 * 2000/01/21    acme            rename cyclomx_open to cyclomx_mod_inc_use_count
 *                               and cyclomx_close to cyclomx_mod_dec_use_count
 * 1999/05/19   acme            wait_queue_head_t wait_stats(support for 2.3.*)
@@ -58,11 +59,7 @@ typedef struct cycx {
        spinlock_t lock;
        char in_isr;                    /* interrupt-in-service flag */
        char buff_int_mode_unbusy;      /* flag for carrying out dev_tint */
-#if (LINUX_VERSION_CODE >= 0x20300)
        wait_queue_head_t wait_stats;  /* to wait for the STATS indication */
-#else
-       struct wait_queue* wait_stats;  /* to wait for the STATS indication */
-#endif
        u32 mbox;                       /* -> mailbox */
        void (*isr)(struct cycx* card); /* interrupt service routine */
        int (*exec)(struct cycx* card, void* u_cmd, void* u_data);
index 28735e0c1d0e51b011bbb6360c7e0189809a13e8..e34e08331052855f0412558cf94c683cd581f5c9 100644 (file)
@@ -16,10 +16,10 @@ extern unsigned int do_bindings(struct ip_conntrack *ct,
 
 extern struct list_head protos;
 
-extern void icmp_reply_translation(struct sk_buff *skb,
-                                  struct ip_conntrack *conntrack,
-                                  unsigned int hooknum,
-                                  int dir);
+extern unsigned int icmp_reply_translation(struct sk_buff *skb,
+                                          struct ip_conntrack *conntrack,
+                                          unsigned int hooknum,
+                                          int dir);
 
 extern void replace_in_hashes(struct ip_conntrack *conntrack,
                              struct ip_nat_info *info);
index c1d6ff3128556aa68ccd495ac5af8ff9f402d436..362f07bee40fc03094723e14cd76e518e5cd184e 100644 (file)
@@ -280,7 +280,7 @@ struct ipt_get_entries
        unsigned int size;
 
        /* The entries. */
-       unsigned char entries[0];
+       struct ipt_entry entrytable[0];
 };
 
 /* Standard return verdict, or do jump. */
index eeafdf46896f34cd6447306793efc224f8bdc206..ad195e435ba9a69f0204ded507dc5ed4f77dafba 100644 (file)
@@ -6,7 +6,10 @@ enum ipt_reject_with {
        IPT_ICMP_HOST_UNREACHABLE,
        IPT_ICMP_PROT_UNREACHABLE,
        IPT_ICMP_PORT_UNREACHABLE,
-       IPT_ICMP_ECHOREPLY
+       IPT_ICMP_ECHOREPLY,
+       IPT_ICMP_NET_PROHIBITED,
+       IPT_ICMP_HOST_PROHIBITED,
+       IPT_TCP_RESET
 };
 
 struct ipt_reject_info {
index f3617397cbe964ee426bf3ad54e3a774a08133d5..0716ae947661e6c9862a453646c387eb4dc5e5ff 100644 (file)
@@ -286,7 +286,7 @@ struct ip6t_get_entries
        unsigned int size;
 
        /* The entries. */
-       unsigned char entries[0];
+       struct ip6t_entry entrytable[0];
 };
 
 /* Standard return verdict, or do jump. */
index f19721ee5920f8fe9b860465c8722370955cdac8..c43456da621a74afed730c6e59ab80113ffa0b19 100644 (file)
@@ -548,9 +548,9 @@ static int do_try_to_free_pages(unsigned int gfp_mask)
                if (!--count)
                        goto done;
        }
-       /* We return 1 if we are freed some page, or
-        * there are no memory pressure remaining   */
-       return (count != FREE_COUNT || !memory_pressure());
+       /* Return 1 if any page is freed, or
+        * there are no more memory pressure   */
+       return (count < FREE_COUNT || !memory_pressure());
  
 done:
        return 1;
index b1f8a9fe8083185d0fc20669e8e4521fdcc22169..c372ab029f5a7a67e0403fd0f442966b9ba4c023 100644 (file)
@@ -261,11 +261,11 @@ void nf_debug_ip_finish_output2(struct sk_buff *skb)
                if (skb->nf_debug != ((1 << NF_IP_PRE_ROUTING)
                                      | (1 << NF_IP_FORWARD)
                                      | (1 << NF_IP_POST_ROUTING))) {
-                       /* Fragments will have no owners, but still
-                           may be local */
-                       if (!(skb->nh.iph->frag_off & htons(IP_MF|IP_OFFSET))
-                           || skb->nf_debug != ((1 << NF_IP_LOCAL_OUT)
-                                                | (1 << NF_IP_POST_ROUTING))){
+                       /* Fragments, entunnelled packets, TCP RSTs
+                           generated by ipt_REJECT will have no
+                           owners, but still may be local */
+                       if (skb->nf_debug != ((1 << NF_IP_LOCAL_OUT)
+                                             | (1 << NF_IP_POST_ROUTING))){
                                printk("ip_finish_output:"
                                       " bad unowned skb = %p: ",skb);
                                debug_print_hooks_ip(skb->nf_debug);
index d97558a24a709a90964b2da39c3bd4c37513a420..a2bc393987a7ede33fe0bdb881c9a1847c6495b0 100644 (file)
@@ -104,7 +104,7 @@ static void dn_run_flush(unsigned long dummy);
 static struct dn_rt_hash_bucket *dn_rt_hash_table;
 static unsigned dn_rt_hash_mask;
 
-static struct timer_list dn_route_timer = { function: NULL };
+static struct timer_list dn_route_timer;
 static struct timer_list dn_rt_flush_timer = { function: dn_run_flush };
 int decnet_dst_gc_interval = 2;
 
index 47e7fb01bdf24f5c8fab4163a84cf49d60811a23..14ebb46e11830ea1dc6737996ae5419cc4e8dd52 100644 (file)
@@ -551,6 +551,7 @@ static inline struct ip_conntrack *
 resolve_normal_ct(struct sk_buff *skb,
                  struct ip_conntrack_protocol *proto,
                  int *set_reply,
+                 unsigned int hooknum,
                  enum ip_conntrack_info *ctinfo)
 {
        struct ip_conntrack_tuple tuple;
@@ -573,6 +574,21 @@ resolve_normal_ct(struct sk_buff *skb,
        if (DIRECTION(h) == IP_CT_DIR_REPLY) {
                /* Reply on unconfirmed connection => unclassifiable */
                if (!(h->ctrack->status & IPS_CONFIRMED)) {
+                       /* Exception: local TCP RSTs (generated by
+                           REJECT target). */
+                       if (hooknum == NF_IP_LOCAL_OUT
+                           && h->tuple.dst.protonum == IPPROTO_TCP) {
+                               const struct tcphdr *tcph
+                                       = (const struct tcphdr *)
+                                       ((u_int32_t *)skb->nh.iph
+                                        + skb->nh.iph->ihl);
+                               if (tcph->rst) {
+                                       *ctinfo = IP_CT_ESTABLISHED
+                                               + IP_CT_IS_REPLY;
+                                       *set_reply = 0;
+                                       goto set_skb;
+                               }
+                       }
                        DEBUGP("Reply on unconfirmed connection\n");
                        ip_conntrack_put(h->ctrack);
                        return NULL;
@@ -598,6 +614,7 @@ resolve_normal_ct(struct sk_buff *skb,
                }
                *set_reply = 0;
        }
+ set_skb:
        skb->nfct = &h->ctrack->infos[*ctinfo];
        return h->ctrack;
 }
@@ -669,7 +686,7 @@ unsigned int ip_conntrack_in(unsigned int hooknum,
            && icmp_error_track(*pskb, &ctinfo, hooknum))
                return NF_ACCEPT;
 
-       if (!(ct = resolve_normal_ct(*pskb, proto, &set_reply, &ctinfo)))
+       if (!(ct = resolve_normal_ct(*pskb, proto,&set_reply,hooknum,&ctinfo)))
                /* Not valid part of a connection */
                return NF_ACCEPT;
 
index 77db6572fd6e3c3c2024f16338683d77ce0377a4..486683bec6623c8e0799b911a32d489e2f616b47 100644 (file)
@@ -169,11 +169,15 @@ static unsigned int ip_confirm(unsigned int hooknum,
                               const struct net_device *out,
                               int (*okfn)(struct sk_buff *))
 {
-       /* We've seen it coming out the other side: confirm */
+       /* We've seen it coming out the other side: confirm (only if
+           new packet: REJECT can generate TCP RESET response, or ICMP
+           errors) */
        if ((*pskb)->nfct) {
                struct ip_conntrack *ct
                        = (struct ip_conntrack *)(*pskb)->nfct->master;
-               if (!(ct->status & IPS_CONFIRMED))
+               /* ctinfo is the index of the nfct inside the conntrack */
+               if ((*pskb)->nfct - ct->infos == IP_CT_NEW
+                   && !(ct->status & IPS_CONFIRMED))
                        ip_conntrack_confirm(ct);
        }
        return NF_ACCEPT;
@@ -191,7 +195,8 @@ static unsigned int ip_refrag(unsigned int hooknum,
        if ((*pskb)->nfct) {
                struct ip_conntrack *ct
                        = (struct ip_conntrack *)(*pskb)->nfct->master;
-               if (!(ct->status & IPS_CONFIRMED))
+               if ((*pskb)->nfct - ct->infos == IP_CT_NEW
+                   && !(ct->status & IPS_CONFIRMED))
                        ip_conntrack_confirm(ct);
        }
 
index 6f0503e058f7a76aab985f59535ac2e46bb1010f..3c8c2e8518e39c34652f5fd3809b12d879834aa4 100644 (file)
@@ -71,7 +71,8 @@ confirm_connection(struct sk_buff *skb)
                struct ip_conntrack *ct
                        = (struct ip_conntrack *)skb->nfct->master;
 
-               if (!(ct->status & IPS_CONFIRMED))
+               if (skb->nfct - ct->infos == IP_CT_NEW
+                   && !(ct->status & IPS_CONFIRMED))
                        ip_conntrack_confirm(ct);
        }
 }
index 1e67211744f89cf84d3412cda5a9a507e1d81a2b..ce3180d392eca29d50cd0e3d95d8d385b8c6dd79 100644 (file)
@@ -105,7 +105,7 @@ check_for_masq_error(struct sk_buff *skb)
        /* Wouldn't be here if not tracked already => masq'ed ICMP
            ping or error related to masq'd connection */
        IP_NF_ASSERT(ct);
-       if (CTINFO2DIR(ctinfo) == IP_CT_DIR_ORIGINAL) {
+       if (ctinfo == IP_CT_RELATED) {
                icmp_reply_translation(skb, ct, NF_IP_PRE_ROUTING,
                                       CTINFO2DIR(ctinfo));
                icmp_reply_translation(skb, ct, NF_IP_POST_ROUTING,
index a07749ecb774b5fed8b8709de8722b3b030c6743..c8bf259b9469f7b81aeb8ba9f0a919cd0a68b83a 100644 (file)
@@ -735,7 +735,7 @@ do_bindings(struct ip_conntrack *ct,
        } else return NF_ACCEPT;
 }
 
-void
+unsigned int
 icmp_reply_translation(struct sk_buff *skb,
                       struct ip_conntrack *conntrack,
                       unsigned int hooknum,
@@ -749,6 +749,22 @@ icmp_reply_translation(struct sk_buff *skb,
        struct ip_nat_info *info = &conntrack->nat.info;
 
        IP_NF_ASSERT(skb->len >= iph->ihl*4 + sizeof(struct icmphdr));
+       /* Must be RELATED */
+       IP_NF_ASSERT(skb->nfct - (struct ip_conntrack *)skb->nfct->master
+                    == IP_CT_RELATED
+                    || skb->nfct - (struct ip_conntrack *)skb->nfct->master
+                    == IP_CT_RELATED+IP_CT_IS_REPLY);
+
+       /* Redirects on non-null nats must be dropped, else they'll
+           start talking to each other without our translation, and be
+           confused... --RR */
+       if (hdr->type == ICMP_REDIRECT) {
+               /* Don't care about races here. */
+               if (info->initialized
+                   != ((1 << IP_NAT_MANIP_SRC) | (1 << IP_NAT_MANIP_DST))
+                   || info->num_manips != 0)
+                       return NF_DROP;
+       }
 
        DEBUGP("icmp_reply_translation: translating error %p hook %u dir %s\n",
               skb, hooknum, dir == IP_CT_DIR_ORIGINAL ? "ORIG" : "REPLY");
@@ -810,6 +826,8 @@ icmp_reply_translation(struct sk_buff *skb,
        hdr->checksum = 0;
        hdr->checksum = ip_compute_csum((unsigned char *)hdr,
                                        sizeof(*hdr) + datalen);
+
+       return NF_ACCEPT;
 }
 
 int ip_nat_helper_register(struct ip_nat_helper *me)
index 11e16e25e3915f60ad2f4b59aec96b5630c66ab3..3334a64c28da83a69f88e7ce803a9f0658c32371 100644 (file)
@@ -84,9 +84,8 @@ ip_nat_fn(unsigned int hooknum,
        case IP_CT_RELATED:
        case IP_CT_RELATED+IP_CT_IS_REPLY:
                if ((*pskb)->nh.iph->protocol == IPPROTO_ICMP) {
-                       icmp_reply_translation(*pskb, ct, hooknum,
-                                              CTINFO2DIR(ctinfo));
-                       return NF_ACCEPT;
+                       return icmp_reply_translation(*pskb, ct, hooknum,
+                                                     CTINFO2DIR(ctinfo));
                }
                /* Fall thru... (Only ICMPs can be IP_CT_IS_REPLY) */
        case IP_CT_NEW:
index 792ae1552297df8bae5cc44139e6b431ea116df4..39574b7d477ace3db17aa86d9b0da6caccc41d8c 100644 (file)
@@ -244,7 +244,7 @@ static int ipq_set_verdict(ipq_queue_t *q,
 {
        ipq_queue_element_t *e;
 
-       if (v->value < 0 || v->value > NF_MAX_VERDICT)
+       if (v->value > NF_MAX_VERDICT)
                return -EINVAL;
        e = ipq_dequeue(q, id_cmp, v->id);
        if (e == NULL)
@@ -309,10 +309,9 @@ static inline int dev_cmp(ipq_queue_element_t *e, unsigned long ifindex)
                if (e->info->indev->ifindex == ifindex)
                        return 1;
        if (e->info->outdev)
-               if (e->info->outdev->ifindex == ifindex);
+               if (e->info->outdev->ifindex == ifindex)
                        return 1;
        return 0;
-       
 }
 
 /* Drop any queued packets associated with device ifindex */
index 3105f5a18a373fcd35b84b3cb1dfcd382b21bd47..40b19760bc546eef6b6b979849d584ec6d0bcb72 100644 (file)
@@ -1029,7 +1029,7 @@ get_entries(const struct ipt_get_entries *entries,
                         t->private->number);
                if (entries->size == t->private->size)
                        ret = copy_entries_to_user(t->private->size,
-                                                  t, uptr->entries);
+                                                  t, uptr->entrytable);
                else {
                        duprintf("get_entries: I've got %u not %u!\n",
                                 t->private->size,
index 220cdb568d35a3bbb9988f3e721d357b880d1802..c63e95fe84cf5c053802300e6a97a2d64c154205 100644 (file)
@@ -7,6 +7,7 @@
 #include <linux/ip.h>
 #include <net/icmp.h>
 #include <net/ip.h>
+#include <net/tcp.h>
 struct in_device;
 #include <net/route.h>
 #include <linux/netfilter_ipv4/ip_tables.h>
@@ -18,6 +19,113 @@ struct in_device;
 #define DEBUGP(format, args...)
 #endif
 
+/* Send RST reply */
+static void send_reset(struct sk_buff *oldskb)
+{
+       struct sk_buff *nskb;
+       struct tcphdr *tcph;
+       struct rtable *rt;
+       unsigned int tcplen;
+       int needs_ack;
+
+       /* Clone skb (skb is about to be dropped, so we don't care) */
+       nskb = skb_clone(oldskb, GFP_ATOMIC);
+       if (!nskb)
+               return;
+
+       /* This packet will not be the same as the other: clear nf fields */
+       nf_conntrack_put(nskb->nfct);
+       nskb->nfct = NULL;
+       nskb->nfcache = 0;
+#ifdef CONFIG_NETFILTER_DEBUG
+       nskb->nf_debug = 0;
+#endif
+
+       /* IP header checks: fragment, too short. */
+       if (nskb->nh.iph->frag_off & htons(IP_OFFSET)
+           || nskb->len < (nskb->nh.iph->ihl<<2) + sizeof(struct tcphdr))
+               goto free_nskb;
+
+       tcph = (struct tcphdr *)((u_int32_t*)nskb->nh.iph + nskb->nh.iph->ihl);
+       tcplen = nskb->len - nskb->nh.iph->ihl*4;
+
+       /* Check checksum. */
+       if (tcp_v4_check(tcph, tcplen, nskb->nh.iph->saddr,
+                        nskb->nh.iph->daddr,
+                        csum_partial((char *)tcph, tcplen, 0)) != 0)
+               goto free_nskb;
+
+       /* No RST for RST. */
+       if (tcph->rst)
+               goto free_nskb;
+
+       nskb->nh.iph->daddr = xchg(&nskb->nh.iph->saddr, nskb->nh.iph->daddr);
+       tcph->source = xchg(&tcph->dest, tcph->source);
+
+       /* Truncate to length (no data) */
+       tcph->doff = sizeof(struct tcphdr)/4;
+       skb_trim(nskb, nskb->nh.iph->ihl*4 + sizeof(struct tcphdr));
+
+       if (tcph->ack) {
+               needs_ack = 0;
+               tcph->seq = tcph->ack_seq;
+               tcph->ack_seq = 0;
+       } else {
+               needs_ack = 1;
+               tcph->seq = 0;
+               tcph->ack_seq = htonl(ntohl(tcph->seq) + tcph->syn + tcph->fin
+                                     + tcplen - (tcph->doff<<2));
+       }
+
+       /* Reset flags */
+       ((u_int8_t *)tcph)[13] = 0;
+       tcph->rst = 1;
+       if (needs_ack)
+               tcph->ack = 1;
+
+       tcph->window = 0;
+       tcph->urg_ptr = 0;
+
+       /* Adjust TCP checksum */
+       tcph->check = 0;
+       tcph->check = tcp_v4_check(tcph, sizeof(struct tcphdr),
+                                  nskb->nh.iph->saddr,
+                                  nskb->nh.iph->daddr,
+                                  csum_partial((char *)tcph,
+                                               sizeof(struct tcphdr), 0));
+
+       /* Adjust IP TTL, DF */
+       nskb->nh.iph->ttl = MAXTTL;
+       /* Set DF, id = 0 */
+       nskb->nh.iph->frag_off = htons(IP_DF);
+       nskb->nh.iph->id = 0;
+
+       /* Adjust IP checksum */
+       nskb->nh.iph->check = 0;
+       nskb->nh.iph->check = ip_fast_csum((unsigned char *)nskb->nh.iph, 
+                                          nskb->nh.iph->ihl);
+
+       /* Routing */
+       if (ip_route_output(&rt, nskb->nh.iph->daddr, nskb->nh.iph->saddr,
+                           RT_TOS(nskb->nh.iph->tos) | RTO_CONN,
+                           0) != 0)
+               goto free_nskb;
+
+       dst_release(nskb->dst);
+       nskb->dst = &rt->u.dst;
+
+       /* "Never happens" */
+       if (nskb->len > nskb->dst->pmtu)
+               goto free_nskb;
+
+       NF_HOOK(PF_INET, NF_IP_LOCAL_OUT, nskb, NULL, nskb->dst->dev,
+               ip_finish_output);
+       return;
+
+ free_nskb:
+       kfree_skb(nskb);
+}
+
 static unsigned int reject(struct sk_buff **pskb,
                           unsigned int hooknum,
                           const struct net_device *in,
@@ -43,6 +151,12 @@ static unsigned int reject(struct sk_buff **pskb,
        case IPT_ICMP_PORT_UNREACHABLE:
                icmp_send(*pskb, ICMP_DEST_UNREACH, ICMP_PORT_UNREACH, 0);
                break;
+       case IPT_ICMP_NET_PROHIBITED:
+               icmp_send(*pskb, ICMP_DEST_UNREACH, ICMP_NET_ANO, 0);
+               break;
+       case IPT_ICMP_HOST_PROHIBITED:
+               icmp_send(*pskb, ICMP_DEST_UNREACH, ICMP_HOST_ANO, 0);
+               break;
        case IPT_ICMP_ECHOREPLY: {
                struct icmphdr *icmph  = (struct icmphdr *)
                        ((u_int32_t *)(*pskb)->nh.iph + (*pskb)->nh.iph->ihl);
@@ -64,6 +178,9 @@ static unsigned int reject(struct sk_buff **pskb,
                }
        }
        break;
+       case IPT_TCP_RESET:
+               send_reset(*pskb);
+               break;
        }
 
        return NF_DROP;
@@ -96,7 +213,7 @@ static int check(const char *tablename,
 
        /* Only allow these for packet filtering. */
        if (strcmp(tablename, "filter") != 0) {
-               DEBUGP("REJECT: bad table `%s'.\n", table);
+               DEBUGP("REJECT: bad table `%s'.\n", tablename);
                return 0;
        }
        if ((hook_mask & ~((1 << NF_IP_LOCAL_IN)
@@ -118,6 +235,18 @@ static int check(const char *tablename,
                        DEBUGP("REJECT: ECHOREPLY illegal for non-ping\n");
                        return 0;
                }
+       } else if (rejinfo->with == IPT_TCP_RESET) {
+               /* Must specify that it's a TCP packet */
+               if (e->ip.proto != IPPROTO_TCP
+                   || (e->ip.invflags & IPT_INV_PROTO)) {
+                       DEBUGP("REJECT: TCP_RESET illegal for non-tcp\n");
+                       return 0;
+               }
+               /* Only for local input.  Rest is too dangerous. */
+               if ((hook_mask & ~(1 << NF_IP_LOCAL_IN)) != 0) {
+                       DEBUGP("REJECT: TCP_RESET only from INPUT\n");
+                       return 0;
+               }
        }
 
        return 1;
index dea475febb76ef520469ec37d4788117290bbceb..b3ba4383d59b6c9c761135a130a8d1f41436eff3 100644 (file)
@@ -1075,7 +1075,7 @@ get_entries(const struct ip6t_get_entries *entries,
                         t->private->number);
                if (entries->size == t->private->size)
                        ret = copy_entries_to_user(t->private->size,
-                                                  t, uptr->entries);
+                                                  t, uptr->entrytable);
                else {
                        duprintf("get_entries: I've got %u not %u!\n",
                                 t->private->size,
index c59053f1ffbda76dd7f31fadee104379e97096ec..77d919b5189004b002ca12718589abb17b3aa265 100644 (file)
@@ -1441,7 +1441,7 @@ then
        if [ ! -f .hdepend -o "$CONFIG_MODVERSIONS" = "y" ] ; then
            echo "*** Next, you must run 'make dep'."
        else
-           echo "*** Next, you may run 'make zImage', 'make zdisk', or 'make zlilo.'"
+           echo "*** Next, you may run 'make bzImage', 'make bzdisk', or 'make install'."
        fi
        echo
 else