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
---------
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?)
VERSION = 2
PATCHLEVEL = 4
SUBLEVEL = 0
-EXTRAVERSION = -test4
+EXTRAVERSION = -test5
KERNELRELEASE=$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)
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".
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
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
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
}
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 )
{
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) {
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 )
/*
* 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
/************************* 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,
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? */
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];
/*
* 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, \
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)
{
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 = {
* 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
-# $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
/*
- * $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
*
* 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>
*/
static u32 fixup_pmc551 (struct pci_dev *dev)
{
-#ifdef PMC551_DRAM_BUG
+#ifdef CONFIG_MTD_PMC551_BUGFIX
u32 dram_data;
#endif
u32 size, dcmd;
* 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);
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
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");
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)
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)
/* 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;
if (!SK_dev)
return -ENOMEM;
+ SK_dev->base_addr = io;
+
rc = SK_init (SK_dev);
if (rc) {
unregister_netdev (SK_dev);
*/
-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>
#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. */
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. */
* 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 */
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) {
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++)
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. */
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++)
kfree (ports);
}
- if (!portlist)
- get_lowlevel_driver ();
-
spin_lock (&driverlist_lock);
drv->next = driver_chain;
driver_chain = drv;
} *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);
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;
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) {
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++) {
* 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.*)
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);
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);
unsigned int size;
/* The entries. */
- unsigned char entries[0];
+ struct ipt_entry entrytable[0];
};
/* Standard return verdict, or do jump. */
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 {
unsigned int size;
/* The entries. */
- unsigned char entries[0];
+ struct ip6t_entry entrytable[0];
};
/* Standard return verdict, or do jump. */
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;
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);
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;
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;
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;
}
*set_reply = 0;
}
+ set_skb:
skb->nfct = &h->ctrack->infos[*ctinfo];
return h->ctrack;
}
&& 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;
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;
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);
}
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);
}
}
/* 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,
} else return NF_ACCEPT;
}
-void
+unsigned int
icmp_reply_translation(struct sk_buff *skb,
struct ip_conntrack *conntrack,
unsigned int hooknum,
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");
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)
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:
{
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)
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 */
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,
#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>
#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,
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);
}
}
break;
+ case IPT_TCP_RESET:
+ send_reset(*pskb);
+ break;
}
return NF_DROP;
/* 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)
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;
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,
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