Initial version (2.6.22-based with vserver 2.3) of the patches method.
authorDaniel Hokka Zakrisson <dhokka@cs.princeton.edu>
Sat, 17 Nov 2007 00:22:36 +0000 (00:22 +0000)
committerDaniel Hokka Zakrisson <dhokka@cs.princeton.edu>
Sat, 17 Nov 2007 00:22:36 +0000 (00:22 +0000)
17 files changed:
Makefile [new file with mode: 0644]
kernel-2.6-onelab.spec [deleted file]
kernel-2.6-planetlab.spec
kernel-2.6.22-i586-planetlab.config [new file with mode: 0644]
kernel-2.6.22-i686-planetlab.config [new file with mode: 0644]
kernel-2.6.22-x86_64-planetlab.config [new file with mode: 0644]
kompare [moved from configs/kompare with 100% similarity]
kread [moved from configs/kread with 100% similarity]
linux-2.6-100-build-nonintconfig.patch [new file with mode: 0644]
linux-2.6-250-ipsets.patch [new file with mode: 0644]
linux-2.6-500-vserver-filesharing.patch [new file with mode: 0644]
linux-2.6-510-ipod.patch [new file with mode: 0644]
linux-2.6-520-vnet+.patch [new file with mode: 0644]
linux-2.6-530-built-by-support.patch [new file with mode: 0644]
linux-2.6-540-oom-kill.patch [new file with mode: 0644]
linux-2.6-550-raise-default-nfile-ulimit.patch [new file with mode: 0644]
sources [new file with mode: 0644]

diff --git a/Makefile b/Makefile
new file mode 100644 (file)
index 0000000..c71305a
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,77 @@
+CURL   ?= $(shell if test -f /usr/bin/curl ; then echo "curl -H Pragma: -O -R -S --fail --show-error" ; fi)
+WGET   ?= $(shell if test -f /usr/bin/wget ; then echo "wget -nd -m" ; fi)
+CLIENT ?= $(if $(CURL),$(CURL),$(if $(WGET),$(WGET)))
+AWK    = awk
+MD5SUM = md5sum
+SED    = sed
+
+SPECFILE = kernel-2.6-planetlab.spec
+
+# get nevr from specfile.
+ifndef NAME
+NAME := $(shell rpm $(RPMDEFS) $(DISTDEFS) -q --qf "%{NAME}\n" --specfile $(SPECFILE) | head -1)
+endif
+ifndef EPOCH
+EPOCH := $(shell rpm $(RPMDEFS) $(DISTDEFS) -q --qf "%{EPOCH}\n" --specfile $(SPECFILE) | head -1 | sed 's/(none)//')
+endif
+ifeq ($(EPOCH),(none))
+override EPOCH := ""
+endif
+ifndef VERSION
+VERSION := $(shell rpm $(RPMDEFS) $(DISTDEFS) -q --qf "%{VERSION}\n" --specfile $(SPECFILE)| head -1)
+endif
+ifndef RELEASE
+RELEASE := $(shell rpm $(RPMDEFS) $(DISTDEFS) -q --qf "%{RELEASE}\n" --specfile $(SPECFILE)| head -1)
+endif
+
+define get_sources_md5
+$(shell cat sources 2>/dev/null | awk 'gensub("^.*/", "", 1, $$2) == "$@" { print $$1; exit; }')
+endef
+define get_sources_url
+$(shell cat sources 2>/dev/null | awk 'gensub("^.*/", "", 1, $$2) == "$@" { print $$2; exit; }')
+endef
+SOURCEFILES := $(shell cat sources 2>/dev/null | awk '{ print gensub("^.*/", "", 1, $$2) }')
+
+sources: $(SOURCEFILES) $(TARGETS)
+
+$(SOURCEFILES): #FORCE
+       @if [ ! -e "$@" ] ; then $(CLIENT) $(get_sources_url) ; fi
+       @if [ ! -e "$@" ] ; then echo "Could not download source file: $@ does not exist" ; exit 1 ; fi
+       @if test "$$(md5sum $@ | awk '{print $$1}')" != "$(get_sources_md5)" ; then \
+           echo "md5sum of the downloaded $@ does not match the one from 'sources' file" ; \
+           echo "Local copy: $$(md5sum $@)" ; \
+           echo "In sources: $$(grep $@ sources)" ; \
+           exit 1 ; \
+       else \
+           ls -l $@ ; \
+       fi
+
+download-sources:
+       @for i in $(SOURCES); do \
+               if [ ! -e "$${i##*/}" ]; then \
+                       echo "$(CLIENT) $$i"; \
+                       $(CLIENT) $$i; \
+               fi; \
+       done
+
+replace-sources:
+       rm -f sources
+       @$(MAKE) new-sources
+
+new-sources: download-sources
+       @for i in $(SOURCES); do \
+               echo "$(MD5SUM) $$i >> sources"; \
+               $(MD5SUM) $${i##*/} | $(AWK) '{ printf "%s  %s\n", $$1, "'"$$i"'" }' >> sources; \
+       done
+
+PREPARCH ?= noarch
+RPMDIRDEFS = --define "_sourcedir $(PWD)" --define "_builddir $(PWD)" --define "_srcrpmdir $(PWD)" --define "_rpmdir $(PWD)"
+trees: sources
+       rpmbuild $(RPMDIRDEFS) $(RPMDEFS) --nodeps -bp --target $(PREPARCH) $(SPECFILE)
+
+srpm: sources
+       rpmbuild $(RPMDIRDEFS) $(RPMDEFS) --nodeps -bs $(SPECFILE)
+
+TARGET ?= $(shell uname -m)
+rpm: sources
+       rpmbuild $(RPMDIRDEFS) $(RPMDEFS) --nodeps --target $(TARGET) -bb $(SPECFILE)
diff --git a/kernel-2.6-onelab.spec b/kernel-2.6-onelab.spec
deleted file mode 100644 (file)
index 811f9e5..0000000
+++ /dev/null
@@ -1,862 +0,0 @@
-Summary: The Linux kernel (the core of the Linux operating system)
-
-# What parts do we want to build?  We must build at least one kernel.
-# These are the kernels that are built IF the architecture allows it.
-
-%define buildup 1
-%define buildsmp 1
-%define builduml 0
-%define buildxen 0
-%define builddoc 0
-
-# Versions of various parts
-
-#
-# Polite request for people who spin their own kernel rpms:
-# please modify the "release" field in a way that identifies
-# that the kernel isn't the stock distribution kernel, for example by
-# adding some text to the end of the version number.
-#
-%define sublevel 16
-%define kversion 2.6.%{sublevel}
-%define rpmversion 2.6.%{sublevel}
-%define release 38.vs_2_0_3_rc1.0%{?pldistro:.%{pldistro}}%{?date:.%{date}}
-%define signmodules 0
-%define make_target bzImage
-
-%define KVERREL %{PACKAGE_VERSION}-%{PACKAGE_RELEASE}
-
-# Override generic defaults with per-arch defaults
-
-%define image_install_path boot
-
-#
-# Three sets of minimum package version requirements in the form of Conflicts:
-# to versions below the minimum
-#
-
-#
-# First the general kernel 2.6 required versions as per
-# Documentation/Changes
-#
-%define kernel_dot_org_conflicts  ppp <= 2.3.15, pcmcia-cs <= 3.1.20, isdn4k-utils <= 3.0, mount < 2.10r-5, nfs-utils < 1.0.3, e2fsprogs < 1.29, util-linux < 2.10, jfsutils < 1.0.14, reiserfsprogs < 3.6.3, xfsprogs < 2.1.0, procps < 2.0.9, oprofile < 0.5.3
-
-# 
-# Then a series of requirements that are distribution specific, either 
-# because we add patches for something, or the older versions have 
-# problems with the newer kernel or lack certain things that make 
-# integration in the distro harder than needed.
-#
-%define package_conflicts  cipe < 1.4.5, kudzu <= 0.92, initscripts < 7.23, dev < 3.2-7, iptables < 1.2.5-3, bcm5820 < 1.81, nvidia-rh72 <= 1.0 selinux-policy-targeted < 1.23.16-1
-
-#
-# Several packages had bugs in them that became obvious when the NPTL
-# threading code got integrated.
-#
-%define nptl_conflicts SysVinit < 2.84-13, pam < 0.75-48, vixie-cron < 3.0.1-73, privoxy < 3.0.0-8, spamassassin < 2.44-4.8.x,  cups < 1.1.17-13
-
-#
-# The ld.so.conf.d file we install uses syntax older ldconfig's don't grok.
-#
-
-# MEF commented out
-# %define xen_conflicts glibc < 2.3.5-1
-
-#
-# Packages that need to be installed before the kernel is, because the %post
-# scripts use them.
-#
-%define kernel_prereq  fileutils, module-init-tools, initscripts >= 5.83, mkinitrd >= 3.5.5
-
-Vendor: PlanetLab
-Packager: PlanetLab Central <support@planet-lab.org>
-Distribution: PlanetLab 3.0
-URL: http://cvs.planet-lab.org/cvs/linux-2.6
-
-Name: kernel
-Group: System Environment/Kernel
-License: GPLv2
-Version: %{rpmversion}
-Release: %{release}
-ExclusiveOS: Linux
-Provides: kernel = %{version}
-Provides: kernel-drm = 4.3.0
-Provides: kernel-%{_target_cpu} = %{rpmversion}-%{release}
-Prereq: %{kernel_prereq}
-Conflicts: %{kernel_dot_org_conflicts}
-Conflicts: %{package_conflicts}
-Conflicts: %{nptl_conflicts}
-# We can't let RPM do the dependencies automatic because it'll then pick up
-# a correct but undesirable perl dependency from the module headers which
-# isn't required for the kernel proper to function
-AutoReqProv: no
-
-#
-# List the packages used during the kernel build
-#
-BuildPreReq: module-init-tools, patch >= 2.5.4, bash >= 2.03, sh-utils, tar
-BuildPreReq: bzip2, findutils, gzip, m4, perl, make >= 3.78, gnupg, diffutils
-BuildRequires: gcc >= 3.3.3, binutils >= 2.12, redhat-rpm-config
-BuildConflicts: rhbuildsys(DiskFree) < 500Mb
-
-
-Source0: ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-%{kversion}.tar.bz2
-
-BuildRoot: %{_tmppath}/kernel-%{KVERREL}-root
-
-%description
-The kernel package contains the Linux kernel (vmlinuz), the core of any
-Linux operating system.  The kernel handles the basic functions
-of the operating system:  memory allocation, process allocation, device
-input and output, etc.
-
-%package devel
-Summary: Development package for building kernel modules to match the kernel.
-Group: System Environment/Kernel
-AutoReqProv: no
-Provides: kernel-devel-%{_target_cpu} = %{rpmversion}-%{release}
-Prereq: /usr/bin/find
-
-%description devel
-This package provides kernel headers and makefiles sufficient to build modules
-against the kernel package.
-
-
-%package doc
-Summary: Various documentation bits found in the kernel source.
-Group: Documentation
-
-%description doc
-This package contains documentation files from the kernel
-source. Various bits of information about the Linux kernel and the
-device drivers shipped with it are documented in these files.
-
-You'll want to install this package if you need a reference to the
-options that can be passed to Linux kernel modules at load time.
-
-%package smp
-Summary: The Linux kernel compiled for SMP machines.
-
-Group: System Environment/Kernel
-Provides: kernel = %{version}
-Provides: kernel-drm = 4.3.0
-Provides: kernel-%{_target_cpu} = %{rpmversion}-%{release}smp
-Prereq: %{kernel_prereq}
-Conflicts: %{kernel_dot_org_conflicts}
-Conflicts: %{package_conflicts}
-Conflicts: %{nptl_conflicts}
-# upto and including kernel 2.4.9 rpms, the 4Gb+ kernel was called kernel-enterprise
-# now that the smp kernel offers this capability, obsolete the old kernel
-Obsoletes: kernel-enterprise < 2.4.10
-# We can't let RPM do the dependencies automatic because it'll then pick up
-# a correct but undesirable perl dependency from the module headers which
-# isn't required for the kernel proper to function
-AutoReqProv: no
-
-%description smp
-This package includes a SMP version of the Linux kernel. It is
-required only on machines with two or more CPUs as well as machines with
-hyperthreading technology.
-
-Install the kernel-smp package if your machine uses two or more CPUs.
-
-%package smp-devel
-Summary: Development package for building kernel modules to match the SMP kernel.
-Group: System Environment/Kernel
-Provides: kernel-smp-devel-%{_target_cpu} = %{rpmversion}-%{release}
-Provides: kernel-devel-%{_target_cpu} = %{rpmversion}-%{release}smp
-Provides: kernel-devel = %{rpmversion}-%{release}smp
-AutoReqProv: no
-Prereq: /usr/bin/find
-
-%description smp-devel
-This package provides kernel headers and makefiles sufficient to build modules
-against the SMP kernel package.
-
-%package xenU
-Summary: The Linux kernel compiled for unprivileged Xen guest VMs
-
-Group: System Environment/Kernel
-Provides: kernel = %{version}
-Provides: kernel-%{_target_cpu} = %{rpmversion}-%{release}xenU
-Prereq: %{kernel_prereq}
-Conflicts: %{kernel_dot_org_conflicts}
-Conflicts: %{package_conflicts}
-Conflicts: %{nptl_conflicts}
-
-# MEF commented out 
-# Conflicts: %{xen_conflicts}
-
-# We can't let RPM do the dependencies automatic because it'll then pick up
-# a correct but undesirable perl dependency from the module headers which
-# isn't required for the kernel proper to function
-AutoReqProv: no
-
-%description xenU
-This package includes a version of the Linux kernel which
-runs in Xen unprivileged guest VMs.  This should be installed
-both inside the unprivileged guest (for the modules) and in
-the guest0 domain.
-
-%package xenU-devel
-Summary: Development package for building kernel modules to match the kernel.
-Group: System Environment/Kernel
-AutoReqProv: no
-Provides: kernel-xenU-devel-%{_target_cpu} = %{rpmversion}-%{release}
-Provides: kernel-devel-%{_target_cpu} = %{rpmversion}-%{release}xenU
-Provides: kernel-devel = %{rpmversion}-%{release}xenU
-Prereq: /usr/sbin/hardlink, /usr/bin/find
-
-%description xenU-devel
-This package provides kernel headers and makefiles sufficient to build modules
-against the kernel package.
-
-%package uml
-Summary: The Linux kernel compiled for use in user mode (User Mode Linux).
-
-Group: System Environment/Kernel
-
-%description uml
-This package includes a user mode version of the Linux kernel.
-
-%package uml-devel
-Summary: Development package for building kernel modules to match the UML kernel.
-Group: System Environment/Kernel
-Provides: kernel-uml-devel-%{_target_cpu} = %{rpmversion}-%{release}
-Provides: kernel-devel-%{_target_cpu} = %{rpmversion}-%{release}smp
-Provides: kernel-devel = %{rpmversion}-%{release}smp
-AutoReqProv: no
-Prereq: /usr/sbin/hardlink, /usr/bin/find
-
-%description uml-devel
-This package provides kernel headers and makefiles sufficient to build modules
-against the User Mode Linux kernel package.
-
-%package uml-modules
-Summary: The Linux kernel modules compiled for use in user mode (User Mode Linux).
-
-Group: System Environment/Kernel
-
-%description uml-modules
-This package includes a user mode version of the Linux kernel modules.
-
-%package vserver
-Summary: A placeholder RPM that provides kernel and kernel-drm
-
-Group: System Environment/Kernel
-Provides: kernel = %{version}
-Provides: kernel-drm = 4.3.0
-Provides: kernel-%{_target_cpu} = %{rpmversion}-%{release}
-
-%description vserver
-VServers do not require and cannot use kernels, but some RPMs have
-implicit or explicit dependencies on the "kernel" package
-(e.g. tcpdump). This package installs no files but provides the
-necessary dependencies to make rpm and yum happy.
-
-
-%prep
-# First we unpack the kernel tarball.
-# If this isn't the first make prep, we use links to the existing clean tarball
-# which speeds things up quite a bit.
-if [ ! -d kernel-%{kversion}/vanilla ]; then
-  # Ok, first time we do a make prep.
-  rm -f pax_global_header
-%setup -q -n %{name}-%{version} -c
-  mv linux-%{kversion} vanilla
-else
-  # We already have a vanilla dir.
-  cd kernel-%{kversion}
-fi
-
-cd vanilla
-
-# make sure the kernel has the sublevel we know it has. This looks weird
-# but for -pre and -rc versions we need it since we only want to use
-# the higher version when the final kernel is released.
-perl -p -i -e "s/^SUBLEVEL.*/SUBLEVEL = %{sublevel}/" Makefile
-perl -p -i -e "s/^EXTRAVERSION.*/EXTRAVERSION = -prep/" Makefile
-
-# get rid of unwanted files resulting from patch fuzz
-find . \( -name "*.orig" -o -name "*~" \) -exec rm -f {} \; >/dev/null
-
-
-###
-### build
-###
-%build
-
-BuildKernel() {
-    MakeTarget=$1
-    Arch=$2
-    Flavour=$3
-
-    # create a clean copy in BUILD/ (for backward compatibility with
-    # other RPMs that bootstrap off of the kernel build)
-    cd $RPM_BUILD_DIR
-    # Thierry - I think that this is wrong :
-    #rm -rf linux-%{kversion}$Flavour
-    # and that it should rather read
-    rm -rf linux-%{_target_cpu}-%{kversion}$Flavour
-    cp -rl kernel-%{kversion}/vanilla linux-%{_target_cpu}-%{kversion}$Flavour
-    cd linux-%{_target_cpu}-%{kversion}$Flavour
-
-    # Pick the right config file for the kernel we're building
-    if [ -n "$Flavour" ] ; then
-      Config=kernel-%{kversion}-%{_target_cpu}-$Flavour-%{pldistro}.config
-      DevelDir=/usr/src/kernels/%{KVERREL}-$Flavour-%{_target_cpu}
-      DevelLink=/usr/src/kernels/%{KVERREL}$Flavour-%{_target_cpu}
-    else
-      Config=kernel-%{kversion}-%{_target_cpu}-%{pldistro}.config
-      DevelDir=/usr/src/kernels/%{KVERREL}-%{_target_cpu}
-      DevelLink=
-    fi
-
-    KernelVer=%{version}-%{release}$Flavour
-    echo BUILDING A KERNEL FOR $Flavour %{_target_cpu}...
-
-    # make sure EXTRAVERSION says what we want it to say
-    perl -p -i -e "s/^EXTRAVERSION.*/EXTRAVERSION = -%{release}$Flavour/" Makefile
-
-    # and now to start the build process
-
-    make -s mrproper
-    cp configs/$Config .config
-
-    #Arch=`head -1 .config | cut -b 3-`
-    echo USING ARCH=$Arch
-
-    make -s ARCH=$Arch nonint_oldconfig > /dev/null
-    make -s ARCH=$Arch %{?_smp_mflags} $MakeTarget
-    make -s ARCH=$Arch %{?_smp_mflags} modules || exit 1
-
-    # Start installing the results
-
-%if "%{_enable_debug_packages}" == "1"
-    mkdir -p $RPM_BUILD_ROOT/usr/lib/debug/boot
-%endif
-    mkdir -p $RPM_BUILD_ROOT/%{image_install_path}
-    install -m 644 .config $RPM_BUILD_ROOT/boot/config-$KernelVer
-    install -m 644 System.map $RPM_BUILD_ROOT/boot/System.map-$KernelVer
-    if [ -f arch/$Arch/boot/bzImage ]; then
-      cp arch/$Arch/boot/bzImage $RPM_BUILD_ROOT/%{image_install_path}/vmlinuz-$KernelVer
-    fi
-    if [ -f arch/$Arch/boot/zImage.stub ]; then
-      cp arch/$Arch/boot/zImage.stub $RPM_BUILD_ROOT/%{image_install_path}/zImage.stub-$KernelVer || :
-    fi
-    if [ "$Flavour" = "uml" ] ; then
-       install -D -m 755 linux $RPM_BUILD_ROOT/%{_bindir}/linux
-    fi
-
-    mkdir -p $RPM_BUILD_ROOT/lib/modules/$KernelVer
-    make -s ARCH=$Arch INSTALL_MOD_PATH=$RPM_BUILD_ROOT modules_install KERNELRELEASE=$KernelVer
-
-    # And save the headers/makefiles etc for building modules against
-    #
-    # This all looks scary, but the end result is supposed to be:
-    # * all arch relevant include/ files
-    # * all Makefile/Kconfig files
-    # * all script/ files
-
-    rm -f $RPM_BUILD_ROOT/lib/modules/$KernelVer/build
-    rm -f $RPM_BUILD_ROOT/lib/modules/$KernelVer/source
-    mkdir -p $RPM_BUILD_ROOT/lib/modules/$KernelVer/build
-    (cd $RPM_BUILD_ROOT/lib/modules/$KernelVer ; ln -s build source)
-    # dirs for additional modules per module-init-tools, kbuild/modules.txt
-    mkdir -p $RPM_BUILD_ROOT/lib/modules/$KernelVer/extra
-    mkdir -p $RPM_BUILD_ROOT/lib/modules/$KernelVer/updates
-    # first copy everything
-    cp --parents `find  -type f -name "Makefile*" -o -name "Kconfig*"` $RPM_BUILD_ROOT/lib/modules/$KernelVer/build 
-       cp Module.symvers $RPM_BUILD_ROOT/lib/modules/$KernelVer/build
-    if [ "$Flavour" = "uml" ] ; then
-      cp --parents -a `find arch/um -name include` $RPM_BUILD_ROOT/lib/modules/$KernelVer/build
-    fi
-    # then drop all but the needed Makefiles/Kconfig files
-    rm -rf $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/Documentation
-    rm -rf $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/scripts
-    rm -rf $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/include
-    cp arch/%{_arch}/kernel/asm-offsets.s $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/arch/%{_arch}/kernel || :
-    cp .config $RPM_BUILD_ROOT/lib/modules/$KernelVer/build
-    cp -a scripts $RPM_BUILD_ROOT/lib/modules/$KernelVer/build
-    if [ -d arch/%{_arch}/scripts ]; then
-      cp -a arch/%{_arch}/scripts $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/arch/%{_arch} || :
-    fi
-    if [ -f arch/%{_arch}/*lds ]; then
-      cp -a arch/%{_arch}/*lds $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/arch/%{_arch}/ || :
-    fi
-    rm -f $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/scripts/*.o
-    rm -f $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/scripts/*/*.o
-    mkdir -p $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/include
-    cd include
-    cp -a acpi config keys linux math-emu media mtd net pcmcia rdma rxrpc scsi sound video asm asm-generic $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/include
-    cp -a `readlink asm` $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/include
-    if [ "$Arch" = "x86_64" ]; then
-      cp -a asm-i386 $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/include
-    fi
-%if %{buildxen}
-    if [ "$Flavour" = "xenU" ]; then
-      cp -a xen $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/include
-      cp -a asm-i386 $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/include
-    fi
-%endif
-%if %{builduml}
-    if [ "$Flavour" = "uml" ] ; then
-      cp -a `readlink -f asm/arch` $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/include
-    fi
-%endif
-    # While arch/powerpc/include/asm is still a symlink to the old
-    # include/asm-ppc{64,} directory, include that in kernel-devel too.
-    if [ "$Arch" = "powerpc" -a -r ../arch/powerpc/include/asm ]; then
-      cp -a `readlink ../arch/powerpc/include/asm` $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/include
-      mkdir -p $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/arch/$Arch/include
-      pushd $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/arch/$Arch/include
-      ln -sf ../../../include/asm-ppc* asm
-      popd
-    fi
-
-    # Make sure the Makefile and version.h have a matching timestamp so that
-    # external modules can be built
-    touch -r $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/Makefile $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/include/linux/version.h
-    touch -r $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/.config $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/include/linux/autoconf.h
-    cd ..
-
-    #
-    # save the vmlinux file for kernel debugging into the kernel-debuginfo rpm
-    #
-%if "%{_enable_debug_packages}" == "1"
-    mkdir -p $RPM_BUILD_ROOT/usr/lib/debug/lib/modules/$KernelVer
-    cp vmlinux $RPM_BUILD_ROOT/usr/lib/debug/lib/modules/$KernelVer
-%endif
-%if %{buildxen}
-    if [ -f vmlinuz ]; then
-      cp vmlinuz $RPM_BUILD_ROOT/%{image_install_path}/vmlinuz-$KernelVer
-    fi
-%endif
-
-    find $RPM_BUILD_ROOT/lib/modules/$KernelVer -name "*.ko" -type f >modnames
-
-    # mark modules executable so that strip-to-file can strip them
-    cat modnames | xargs chmod u+x
-
-    # remove files that will be auto generated by depmod at rpm -i time
-    rm -f $RPM_BUILD_ROOT/lib/modules/$KernelVer/modules.*
-
-    # Move the devel headers out of the root file system
-    mkdir -p $RPM_BUILD_ROOT/usr/src/kernels
-    mv $RPM_BUILD_ROOT/lib/modules/$KernelVer/build $RPM_BUILD_ROOT/$DevelDir
-    ln -sf ../../..$DevelDir $RPM_BUILD_ROOT/lib/modules/$KernelVer/build
-    [ -z "$DevelLink" ] || ln -sf `basename $DevelDir` $RPM_BUILD_ROOT/$DevelLink
-}
-
-###
-# DO it...
-###
-
-# prepare directories
-rm -rf $RPM_BUILD_ROOT
-mkdir -p $RPM_BUILD_ROOT/boot
-
-%if "%{_target_cpu}" == "x86_64"
-%define kernel_arch %{_target_cpu}
-%else
-%define kernel_arch i386
-%endif
-
-%if %{buildup}
-BuildKernel %make_target %kernel_arch
-%endif
-
-%if %{buildsmp} && "%{_target_cpu}" != "i586"
-BuildKernel %make_target %kernel_arch smp
-%endif
-
-%if %{builduml} && "%{_target_cpu}" != "i586"
-BuildKernel linux um uml
-%endif
-
-%if %{buildxen} && "%{_target_cpu}" != "i586"
-BuildKernel vmlinuz %kernel_arch xenU
-%endif
-
-###
-### install
-###
-
-%install
-
-cd vanilla
-
-%if %{buildxen} && "%{_target_cpu}" == "i686"
-mkdir -p $RPM_BUILD_ROOT/etc/ld.so.conf.d
-rm -f $RPM_BUILD_ROOT/etc/ld.so.conf.d/kernelcap-%{KVERREL}.conf
-cat > $RPM_BUILD_ROOT/etc/ld.so.conf.d/kernelcap-%{KVERREL}.conf <<\EOF
-# This directive teaches ldconfig to search in nosegneg subdirectories
-# and cache the DSOs there with extra bit 0 set in their hwcap match
-# fields.  In Xen guest kernels, the vDSO tells the dynamic linker to
-# search in nosegneg subdirectories and to match this extra hwcap bit
-# in the ld.so.cache file.
-hwcap 0 nosegneg
-EOF
-chmod 444 $RPM_BUILD_ROOT/etc/ld.so.conf.d/kernelcap-%{KVERREL}.conf
-%endif
-
-%if %{builddoc}
-mkdir -p $RPM_BUILD_ROOT/usr/share/doc/kernel-doc-%{kversion}/Documentation
-
-# sometimes non-world-readable files sneak into the kernel source tree
-chmod -R a+r *
-# copy the source over
-tar cf - Documentation | tar xf - -C $RPM_BUILD_ROOT/usr/share/doc/kernel-doc-%{kversion}
-%endif
-
-###
-### clean
-###
-
-%clean
-rm -rf $RPM_BUILD_ROOT
-
-###
-### scripts
-###
-
-# load the loop module for upgrades...in case the old modules get removed we have
-# loopback in the kernel so that mkinitrd will work.
-%pre
-/sbin/modprobe loop 2> /dev/null > /dev/null  || :
-exit 0
-
-%pre smp
-/sbin/modprobe loop 2> /dev/null > /dev/null  || :
-exit 0
-
-%post
-if [ `uname -i` == "x86_64" ]; then
-  if [ -f /etc/sysconfig/kernel ]; then
-    /bin/sed -i -e 's/^DEFAULTKERNEL=kernel-smp$/DEFAULTKERNEL=kernel/' /etc/sysconfig/kernel
-  fi
-fi
-
-# trick mkinitrd in case the current environment does not have device mapper
-rootdev=$(awk '/^[ \t]*[^#]/ { if ($2 == "/") { print $1; }}' /etc/fstab)
-if echo $rootdev |grep -q /dev/mapper 2>/dev/null ; then
-    if [ ! -f $rootdev ]; then
-       fake_root_lvm=1
-       mkdir -p $(dirname $rootdev)
-       touch $rootdev
-    fi
-fi
-
-[ ! -x /usr/sbin/module_upgrade ] || /usr/sbin/module_upgrade %{rpmversion}-%{release}
-#/sbin/new-kernel-pkg --package kernel --mkinitrd --depmod --install %{KVERREL}
-# Older modutils do not support --package option
-/sbin/new-kernel-pkg --mkinitrd --depmod --install %{KVERREL}
-
-# remove fake handle
-if [ -n "$fake_root_lvm" ]; then
-    rm -f $rootdev
-fi
-
-# make some useful links
-pushd /boot > /dev/null ; {
-       ln -sf config-%{KVERREL} config
-       ln -sf initrd-%{KVERREL}.img initrd-boot
-       ln -sf vmlinuz-%{KVERREL} kernel-boot
-}
-popd > /dev/null
-
-# ask for a reboot
-mkdir -p /etc/planetlab
-touch /etc/planetlab/update-reboot
-
-%post devel
-[ -f /etc/sysconfig/kernel ] && . /etc/sysconfig/kernel
-if [ "$HARDLINK" != "no" -a -x /usr/sbin/hardlink ] ; then
-  pushd /usr/src/kernels/%{KVERREL}-%{_target_cpu} > /dev/null
-  /usr/bin/find . -type f | while read f; do hardlink -c /usr/src/kernels/*FC*/$f $f ; done
-  popd > /dev/null
-fi
-
-%post smp
-# trick mkinitrd in case the current environment does not have device mapper
-rootdev=$(awk '/^[ \t]*[^#]/ { if ($2 == "/") { print $1; }}' /etc/fstab)
-if echo $rootdev |grep -q /dev/mapper 2>/dev/null ; then
-    if [ ! -f $rootdev ]; then
-       fake_root_lvm=1
-       mkdir -p $(dirname $rootdev)
-       touch $rootdev
-    fi
-fi
-
-[ ! -x /usr/sbin/module_upgrade ] || /usr/sbin/module_upgrade %{rpmversion}-%{release}smp
-#/sbin/new-kernel-pkg --package kernel-smp --mkinitrd --depmod --install %{KVERREL}smp
-# Older modutils do not support --package option
-/sbin/new-kernel-pkg --mkinitrd --depmod --install %{KVERREL}smp
-
-# remove fake handle
-if [ -n "$fake_root_lvm" ]; then
-    rm -f $rootdev
-fi
-
-# make some useful links
-pushd /boot > /dev/null ; {
-       ln -sf config-%{KVERREL}smp configsmp
-       ln -sf initrd-%{KVERREL}smp.img initrd-bootsmp
-       ln -sf vmlinuz-%{KVERREL}smp kernel-bootsmp
-}
-popd > /dev/null
-
-# ask for a reboot
-mkdir -p /etc/planetlab
-touch /etc/planetlab/update-reboot
-
-%post smp-devel
-[ -f /etc/sysconfig/kernel ] && . /etc/sysconfig/kernel
-if [ "$HARDLINK" != "no" -a -x /usr/sbin/hardlink ] ; then
-  pushd /usr/src/kernels/%{KVERREL}-smp-%{_target_cpu} > /dev/null
-  /usr/bin/find . -type f | while read f; do hardlink -c /usr/src/kernels/*FC*/$f $f ; done
-  popd > /dev/null
-fi
-
-%post xenU
-[ ! -x /usr/sbin/module_upgrade ] || /usr/sbin/module_upgrade
-[ ! -x /sbin/ldconfig ] || /sbin/ldconfig -X
-
-%post xenU-devel
-[ -f /etc/sysconfig/kernel ] && . /etc/sysconfig/kernel
-if [ "$HARDLINK" != "no" -a -x /usr/sbin/hardlink ] ; then
-  pushd /usr/src/kernels/%{KVERREL}-xenU-%{_target_cpu} > /dev/null
-  /usr/bin/find . -type f | while read f; do hardlink -c /usr/src/kernels/*FC*/$f $f ; done
-  popd > /dev/null
-fi
-
-%post uml-modules
-depmod -ae %{KVERREL}uml
-
-%preun
-/sbin/modprobe loop 2> /dev/null > /dev/null  || :
-/sbin/new-kernel-pkg --rminitrd --rmmoddep --remove %{KVERREL}
-
-%preun smp
-/sbin/modprobe loop 2> /dev/null > /dev/null  || :
-/sbin/new-kernel-pkg --rminitrd --rmmoddep --remove %{KVERREL}smp
-
-%preun xenU
-/sbin/modprobe loop 2> /dev/null > /dev/null  || :
-/sbin/new-kernel-pkg --rmmoddep --remove %{KVERREL}xenU
-
-%preun uml-modules
-rm -f /lib/modules/%{KVERREL}uml/modules.*
-
-
-###
-### file lists
-###
-
-%if %{buildup}
-%files 
-%defattr(-,root,root)
-/%{image_install_path}/vmlinuz-%{KVERREL}
-/boot/System.map-%{KVERREL}
-/boot/config-%{KVERREL}
-%dir /lib/modules/%{KVERREL}
-/lib/modules/%{KVERREL}/kernel
-/lib/modules/%{KVERREL}/build
-/lib/modules/%{KVERREL}/source
-/lib/modules/%{KVERREL}/extra
-/lib/modules/%{KVERREL}/updates
-
-%files devel
-%defattr(-,root,root)
-%verify(not mtime) /usr/src/kernels/%{KVERREL}-%{_target_cpu}
-%endif
-
-%if %{buildsmp} && "%{_target_cpu}" == "i686"
-%files smp
-%defattr(-,root,root)
-/%{image_install_path}/vmlinuz-%{KVERREL}smp
-/boot/System.map-%{KVERREL}smp
-/boot/config-%{KVERREL}smp
-%dir /lib/modules/%{KVERREL}smp
-/lib/modules/%{KVERREL}smp/kernel
-/lib/modules/%{KVERREL}smp/build
-/lib/modules/%{KVERREL}smp/source
-/lib/modules/%{KVERREL}smp/extra
-/lib/modules/%{KVERREL}smp/updates
-
-%files smp-devel
-%defattr(-,root,root)
-%verify(not mtime) /usr/src/kernels/%{KVERREL}-smp-%{_target_cpu}
-/usr/src/kernels/%{KVERREL}smp-%{_target_cpu}
-%endif
-
-%if %{builduml} && "%{_target_cpu}" == "i686"
-%files uml
-%defattr(-,root,root)
-%{_bindir}/linux
-
-%files uml-devel
-%defattr(-,root,root)
-%verify(not mtime) /usr/src/kernels/%{KVERREL}-uml-%{_target_cpu}
-/usr/src/kernels/%{KVERREL}uml-%{_target_cpu}
-
-%files uml-modules
-%defattr(-,root,root)
-/boot/System.map-%{KVERREL}uml
-/boot/config-%{KVERREL}uml
-%dir /lib/modules/%{KVERREL}uml
-/lib/modules/%{KVERREL}uml/kernel
-/lib/modules/%{KVERREL}uml/build
-/lib/modules/%{KVERREL}uml/source
-/lib/modules/%{KVERREL}uml/extra
-/lib/modules/%{KVERREL}uml/updates
-%endif
-
-%if %{buildxen} && "%{_target_cpu}" == "i686"
-%files xenU
-%defattr(-,root,root)
-/%{image_install_path}/vmlinuz-%{KVERREL}xenU
-/boot/System.map-%{KVERREL}xenU
-/boot/config-%{KVERREL}xenU
-%dir /lib/modules/%{KVERREL}xenU
-/lib/modules/%{KVERREL}xenU/kernel
-/lib/modules/%{KVERREL}xenU/build
-/lib/modules/%{KVERREL}xenU/source
-/lib/modules/%{KVERREL}xenU/extra
-/lib/modules/%{KVERREL}xenU/updates
-/etc/ld.so.conf.d/kernelcap-%{KVERREL}.conf
-
-%files xenU-devel
-%defattr(-,root,root)
-%verify(not mtime) /usr/src/kernels/%{KVERREL}-xenU-%{_target_cpu}
-/usr/src/kernels/%{KVERREL}xenU-%{_target_cpu}
-%endif
-
-%files vserver
-%defattr(-,root,root)
-# no files
-
-# only some architecture builds need kernel-doc
-
-%if %{builddoc}
-%files doc
-%defattr(-,root,root)
-%{_datadir}/doc/kernel-doc-%{kversion}/Documentation/*
-%dir %{_datadir}/doc/kernel-doc-%{kversion}/Documentation
-%dir %{_datadir}/doc/kernel-doc-%{kversion}
-%endif
-
-%changelog
-* Tue Jul 11 2006 Dave Jones <davej@redhat.com> [2.6.17-1.2142_FC4]
-- 2.6.17.4
-- Disable split pagetable lock.
-
-* Wed Jul  5 2006 Dave Jones <davej@redhat.com>
-- Get rid of stack backtrace on panic, which in most
-  cases actually caused a loss of info instead of a gain.
-
-* Fri Jun 30 2006 Dave Jones <davej@redhat.com> [2.6.17-1.2141_FC4]
-- 2.6.17.3
-
-* Fri Jun 30 2006 Dave Jones <davej@redhat.com> [2.6.17-1.2140_FC4]
-- 2.6.17.2
-- Fix up the alsa list_add bug.
-
-* Mon Jun 26 2006 Dave Jones <davej@redhat.com>
-- Fix up various stupidities incurred by the last big rebase.
-  - Reenable SMP x86-64 builds.
-  - Reenable SMBFS.
-- Enable PCI fake hotplug driver.
-- Enable gameport/joystick on i586 builds. (#196581)
-
-* Sat Jun 24 2006 Dave Jones <davej@redhat.com>
-- Enable profiling for 586 kernels.
-
-* Fri Jun 23 2006 Dave Jones <davej@redhat.com> [2.6.17-1.2139_FC4]
-- Rebuild with slab debug off.
-
-* Tue Jun 20 2006 Dave Jones <davej@redhat.com> [2.6.17-1.2138_FC4]
-- 2.6.17.1
-
-* Mon Jun  5 2006 Dave Jones <davej@redhat.com> [2.6.16-1.2115_FC4]
-- 2.6.16.20
-
-* Tue May 30 2006 Dave Jones <davej@redhat.com> [2.6.16-1.2114_FC4]
-- 2.6.16.19
-
-* Mon May 29 2006 Dave Jones <davej@redhat.com> [2.6.16-1.2113_FC4]
-- Improved list_head debugging.
-
-* Tue May 23 2006 Dave Jones <davej@redhat.com> [2.6.16-1.2112_FC4]
-- 2.6.16.18
-
-* Sat May 20 2006 Dave Jones <davej@redhat.com> [2.6.16-1.2111_FC4]
-- 2.6.16.17
-
-* Wed May 10 2006 Dave Jones <davej@redhat.com> [2.6.16-1.2110_FC4]
-- 2.6.16.16
-
-* Tue May  9 2006 Dave Jones <davej@redhat.com> [2.6.16-1.2109_FC4]
-- 2.6.16.15
-- make 16C950 UARTs work (again). (#126403)
-- Fix exec-shield default, which should fix a few programs that
-  stopped running.
-
-* Thu May  4 2006 Dave Jones <davej@redhat.com> [2.6.16-1.2108_FC4]
-- 2.6.16.14
-
-* Tue May  2 2006 Dave Jones <davej@redhat.com> [2.6.16-1.2107_FC4]
-- 2.6.16.13
-
-* Mon May  1 2006 Dave Jones <davej@redhat.com>
-- 2.6.16.12
-
-* Tue Apr 25 2006 Dave Jones <davej@redhat.com>
-- Fix up SCSI errors with mymusix usb mp3 player (#186187)
-
-* Mon Apr 24 2006 Dave Jones <davej@redhat.com>
-- 2.6.16.11
-
-* Wed Apr 19 2006 Dave Jones <davej@redhat.com>
-- Enable PCI MSI support.
-
-* Tue Apr 18 2006 Dave Jones <davej@redhat.com> [2.6.16-1.2096_FC4]
-- 2.6.16.9
-
-* Tue Apr 18 2006 Dave Jones <davej@redhat.com> [2.6.16-1.2093_FC4]
-- 2.6.16.7
-
-* Mon Apr 17 2006 Dave Jones <davej@redhat.com> [2.6.16-1.2092_FC4]
-- 2.6.16.6
-
-* Sun Apr 16 2006 Dave Jones <davej@redhat.com>
-- 2.6.16.5
-
-* Fri Apr  7 2006 Dave Jones <davej@redhat.com>
-- 2.6.16.2
-
-* Tue Apr  4 2006 Dave Jones <davej@redhat.com>
-- Reenable non-standard serial ports. (#187466)
-- Reenable snd-es18xx for x86-32 (#187733)
-
-* Thu Mar 30 2006 Dave Jones <davej@redhat.com>
-- ship the .kernelrelease file in -devel too.
-- Disable EDAC debug.
-
-* Tue Mar 26 2006 Dave Jones <davej@redhat.com> [2.6.16-1.2069_FC4]
-- 2.6.16.1
-
-* Mon Mar 25 2006 Dave Jones <davej@redhat.com>
-- Include patches posted for review for inclusion in 2.6.16.1
-- Updated new audit msg types.
-- Reenable HDLC driver (#186257)
-- Make acpi-cpufreq 'sticky'
-- Fix broken x86-64 32bit vDSO (#186924)
-
-* Tue Mar 21 2006 Dave Jones <davej@redhat.com>
-- Improve spinlock scalability on big machines.
-
-* Mon Mar 20 2006 Dave Jones <davej@redhat.com>
-- Sync with FC5's 2.6.16 kernel.
-- Update Tux & Exec-shield to latest.
-
index 0d9bfc9..25416f2 100644 (file)
@@ -4,8 +4,6 @@ Summary: The Linux kernel (the core of the Linux operating system)
 # These are the kernels that are built IF the architecture allows it.
 
 %define buildup 1
-# we now build smp by default when doing buildup
-%define buildsmp 0
 %define builduml 0
 %define buildxen 0
 %define builddoc 0
@@ -18,13 +16,21 @@ Summary: The Linux kernel (the core of the Linux operating system)
 # that the kernel isn't the stock distribution kernel, for example by
 # adding some text to the end of the version number.
 #
-%define sublevel 20
+%define sublevel 22
+%define patchlevel 12
 %define kversion 2.6.%{sublevel}
-%define rpmversion 2.6.%{sublevel}
-%define release 1.2949.fc6.vs2.2.0.1.0%{?pldistro:.%{pldistro}}%{?date:.%{date}}
+%define rpmversion 2.6.%{sublevel}%{?patchlevel:.%{patchlevel}}
+
+%define vsversion 2.3.0.29
+
+%define specrelease 1
+
+%define release vs%{vsversion}.%{specrelease}%{?pldistro:.%{pldistro}}%{?date:.%{date}}
+
+%{!?pldistro:%global pldistro planetlab}
+
 %define signmodules 0
 %define make_target bzImage
-
 %define KVERREL %{PACKAGE_VERSION}-%{PACKAGE_RELEASE}
 
 # Override generic defaults with per-arch defaults
@@ -69,10 +75,7 @@ Summary: The Linux kernel (the core of the Linux operating system)
 #
 %define kernel_prereq  fileutils, module-init-tools, initscripts >= 5.83, mkinitrd >= 3.5.5
 
-Vendor: PlanetLab
-Packager: PlanetLab Central <support@planet-lab.org>
-Distribution: PlanetLab 3.0
-URL: http://cvs.planet-lab.org/cvs/linux-2.6
+URL: http://svn.planet-lab.org/wiki/linux-2.6
 
 Name: kernel
 Group: System Environment/Kernel
@@ -83,6 +86,8 @@ ExclusiveOS: Linux
 Provides: kernel = %{version}
 Provides: kernel-drm = 4.3.0
 Provides: kernel-%{_target_cpu} = %{rpmversion}-%{release}
+Provides: kernel-smp = %{rpmversion}-%{release}
+Provides: kernel-smp-%{_target_cpu} = %{rpmversion}-%{release}
 Prereq: %{kernel_prereq}
 Conflicts: %{kernel_dot_org_conflicts}
 Conflicts: %{package_conflicts}
@@ -103,6 +108,38 @@ BuildConflicts: rhbuildsys(DiskFree) < 500Mb
 
 Source0: ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-%{kversion}.tar.bz2
 
+Source10: kernel-%{kversion}-i586-%{pldistro}.config
+Source11: kernel-%{kversion}-i686-%{pldistro}.config
+Source12: kernel-%{kversion}-x86_64-%{pldistro}.config
+%if %{builduml}
+Source20: kernel-%{kversion}-i686-uml-%{pldidstro}.config
+%endif
+%if %{buildxen}
+Source30: kernel-%{kversion}-i686-xenU-%{pldistro}.config
+%endif
+
+# Mainline patches
+%if "0%{patchlevel}"
+Patch000: ftp://ftp.kernel.org/pub/linux/kernel/v2.6/patch-%{rpmversion}.bz2
+%endif
+
+# These are patches picked up from Fedora/RHEL
+Patch100: linux-2.6-100-build-nonintconfig.patch
+
+# Linux-VServer
+Patch200: patch-%{rpmversion}-vs%{vsversion}.diff
+
+# IP sets
+Patch250: linux-2.6-250-ipsets.patch
+
+# PlanetLab
+Patch500: linux-2.6-500-vserver-filesharing.patch
+Patch510: linux-2.6-510-ipod.patch
+Patch520: linux-2.6-520-vnet+.patch
+Patch530: linux-2.6-530-built-by-support.patch
+Patch540: linux-2.6-540-oom-kill.patch
+Patch550: linux-2.6-550-raise-default-nfile-ulimit.patch
+
 BuildRoot: %{_tmppath}/kernel-%{KVERREL}-root
 
 %description
@@ -116,6 +153,8 @@ Summary: Development package for building kernel modules to match the kernel.
 Group: System Environment/Kernel
 AutoReqProv: no
 Provides: kernel-devel-%{_target_cpu} = %{rpmversion}-%{release}
+Provides: kernel-smp-devel = %{rpmversion}-%{release}
+Provides: kernel-smp-devel-%{_target_cpu} = %{rpmversion}-%{release}
 Prereq: /usr/bin/find
 
 %description devel
@@ -135,45 +174,6 @@ device drivers shipped with it are documented in these files.
 You'll want to install this package if you need a reference to the
 options that can be passed to Linux kernel modules at load time.
 
-%package smp
-Summary: The Linux kernel compiled for SMP machines.
-
-Group: System Environment/Kernel
-Provides: kernel = %{version}
-Provides: kernel-drm = 4.3.0
-Provides: kernel-%{_target_cpu} = %{rpmversion}-%{release}smp
-Prereq: %{kernel_prereq}
-Conflicts: %{kernel_dot_org_conflicts}
-Conflicts: %{package_conflicts}
-Conflicts: %{nptl_conflicts}
-# upto and including kernel 2.4.9 rpms, the 4Gb+ kernel was called kernel-enterprise
-# now that the smp kernel offers this capability, obsolete the old kernel
-Obsoletes: kernel-enterprise < 2.4.10
-# We can't let RPM do the dependencies automatic because it'll then pick up
-# a correct but undesirable perl dependency from the module headers which
-# isn't required for the kernel proper to function
-AutoReqProv: no
-
-%description smp
-This package includes a SMP version of the Linux kernel. It is
-required only on machines with two or more CPUs as well as machines with
-hyperthreading technology.
-
-Install the kernel-smp package if your machine uses two or more CPUs.
-
-%package smp-devel
-Summary: Development package for building kernel modules to match the SMP kernel.
-Group: System Environment/Kernel
-Provides: kernel-smp-devel-%{_target_cpu} = %{rpmversion}-%{release}
-Provides: kernel-devel-%{_target_cpu} = %{rpmversion}-%{release}smp
-Provides: kernel-devel = %{rpmversion}-%{release}smp
-AutoReqProv: no
-Prereq: /usr/bin/find
-
-%description smp-devel
-This package provides kernel headers and makefiles sufficient to build modules
-against the SMP kernel package.
-
 %package xenU
 Summary: The Linux kernel compiled for unprivileged Xen guest VMs
 
@@ -263,14 +263,54 @@ necessary dependencies to make rpm and yum happy.
 if [ ! -d kernel-%{kversion}/vanilla ]; then
   # Ok, first time we do a make prep.
   rm -f pax_global_header
-%setup -q -n %{name}-%{version} -c
+%setup -q -n %{name}-%{kversion} -c
   mv linux-%{kversion} vanilla
 else
   # We already have a vanilla dir.
   cd kernel-%{kversion}
 fi
 
-cd vanilla
+KERNEL_PREVIOUS=vanilla
+# Dark RPM-magic to apply each patch to a hardlinked copy of the tree.
+%define ApplyPatch() \
+  rm -fr linux-%{kversion}-%1                          \
+  cp -al $KERNEL_PREVIOUS linux-%{kversion}-%1         \
+  patchflag=-p1                                                \
+  test "%2" != "%%2" && patchflag="%2"                 \
+  PATCH="%{expand:%{PATCH%1}}"                         \
+  if test ! -e "$PATCH"; then                          \
+    echo "Patch %1 does not exist!"                    \
+    exit 1                                             \
+  fi                                                   \
+  case "$PATCH" in                                     \
+    *.bz2)  bzcat "$PATCH";;                           \
+    *.gz)   zcat "$PATCH";;                            \
+    *)      cat "$PATCH";;                             \
+  esac | patch -F1 -s -d linux-%{kversion}-%1 $patchflag \
+  KERNEL_PREVIOUS=linux-%{kversion}-%1
+
+# This is where the patches get applied
+%if "0%{patchlevel}"
+%ApplyPatch 0
+%endif
+
+%ApplyPatch 100
+
+%ApplyPatch 200
+
+%ApplyPatch 250
+
+%ApplyPatch 500
+%ApplyPatch 510
+%ApplyPatch 520
+%ApplyPatch 530
+%ApplyPatch 540
+%ApplyPatch 550
+
+
+ln -sf $KERNEL_PREVIOUS linux-%{kversion}
+cd linux-%{kversion}
+
 
 # make sure the kernel has the sublevel we know it has. This looks weird
 # but for -pre and -rc versions we need it since we only want to use
@@ -292,20 +332,17 @@ BuildKernel() {
     Arch=$2
     Flavour=$3
 
-    # create a clean copy in BUILD/ (for backward compatibility with
-    # other RPMs that bootstrap off of the kernel build)
-    cd $RPM_BUILD_DIR
     rm -rf linux-%{_target_cpu}-%{kversion}$Flavour
-    cp -rl kernel-%{kversion}/vanilla linux-%{_target_cpu}-%{kversion}$Flavour
+    cp -rl linux-%{kversion}/ linux-%{_target_cpu}-%{kversion}$Flavour
     cd linux-%{_target_cpu}-%{kversion}$Flavour
 
     # Pick the right config file for the kernel we're building
     if [ -n "$Flavour" ] ; then
-      Config=kernel-%{kversion}-%{_target_cpu}-$Flavour-planetlab.config
+      Config=kernel-%{kversion}-%{_target_cpu}-$Flavour-%{pldistro}.config
       DevelDir=/usr/src/kernels/%{KVERREL}-$Flavour-%{_target_cpu}
       DevelLink=/usr/src/kernels/%{KVERREL}$Flavour-%{_target_cpu}
     else
-      Config=kernel-%{kversion}-%{_target_cpu}-planetlab.config
+      Config=kernel-%{kversion}-%{_target_cpu}-%{pldistro}.config
       DevelDir=/usr/src/kernels/%{KVERREL}-%{_target_cpu}
       DevelLink=
     fi
@@ -314,12 +351,12 @@ BuildKernel() {
     echo BUILDING A KERNEL FOR $Flavour %{_target_cpu}...
 
     # make sure EXTRAVERSION says what we want it to say
-    perl -p -i -e "s/^EXTRAVERSION.*/EXTRAVERSION = -%{release}$Flavour/" Makefile
+    perl -p -i -e "s/^EXTRAVERSION.*/EXTRAVERSION = %{?patchlevel:.%{patchlevel}}-%{release}$Flavour/" Makefile
 
     # and now to start the build process
 
     make -s mrproper
-    cp configs/$Config .config
+    cp %{_sourcedir}/$Config .config
 
     #Arch=`head -1 .config | cut -b 3-`
     echo USING ARCH=$Arch
@@ -468,11 +505,7 @@ mkdir -p $RPM_BUILD_ROOT/boot
 BuildKernel %make_target %kernel_arch
 %endif
 
-%if "%{_target_cpu}" == "i686"
-%if %{buildsmp} 
-BuildKernel %make_target %kernel_arch smp
-%endif
-
+%ifarch i686
 %if %{builduml}
 BuildKernel linux um uml
 %endif
@@ -482,12 +515,6 @@ BuildKernel vmlinuz %kernel_arch xenU
 %endif
 %endif
 
-%if "%{_target_cpu}" == "x86_64"
-%if %{buildsmp} 
-BuildKernel %make_target %kernel_arch smp
-%endif
-%endif
-
 ###
 ### install
 ###
@@ -536,15 +563,9 @@ rm -rf $RPM_BUILD_ROOT
 /sbin/modprobe loop 2> /dev/null > /dev/null  || :
 exit 0
 
-%pre smp
-/sbin/modprobe loop 2> /dev/null > /dev/null  || :
-exit 0
-
 %post
-if [ `uname -i` == "x86_64" ]; then
-  if [ -f /etc/sysconfig/kernel ]; then
-    /bin/sed -i -e 's/^DEFAULTKERNEL=kernel-smp$/DEFAULTKERNEL=kernel/' /etc/sysconfig/kernel
-  fi
+if [ -f /etc/sysconfig/kernel ]; then
+  /bin/sed -i -e 's/^DEFAULTKERNEL=kernel-smp$/DEFAULTKERNEL=kernel/' /etc/sysconfig/kernel
 fi
 
 # trick mkinitrd in case the current environment does not have device mapper
@@ -570,8 +591,11 @@ fi
 # make some useful links
 pushd /boot > /dev/null ; {
        ln -sf config-%{KVERREL} config
+       ln -sf config-%{KVERREL} configsmp
        ln -sf initrd-%{KVERREL}.img initrd-boot
+       ln -sf initrd-%{KVERREL}.img initrd-bootsmp
        ln -sf vmlinuz-%{KVERREL} kernel-boot
+       ln -sf vmlinuz-%{KVERREL} kernel-bootsmp
 }
 popd > /dev/null
 
@@ -587,47 +611,6 @@ if [ "$HARDLINK" != "no" -a -x /usr/sbin/hardlink ] ; then
   popd > /dev/null
 fi
 
-%post smp
-# trick mkinitrd in case the current environment does not have device mapper
-rootdev=$(awk '/^[ \t]*[^#]/ { if ($2 == "/") { print $1; }}' /etc/fstab)
-if echo $rootdev |grep -q /dev/mapper 2>/dev/null ; then
-    if [ ! -f $rootdev ]; then
-       fake_root_lvm=1
-       mkdir -p $(dirname $rootdev)
-       touch $rootdev
-    fi
-fi
-
-[ ! -x /usr/sbin/module_upgrade ] || /usr/sbin/module_upgrade %{rpmversion}-%{release}smp
-#/sbin/new-kernel-pkg --package kernel-smp --mkinitrd --depmod --install %{KVERREL}smp
-# Older modutils do not support --package option
-/sbin/new-kernel-pkg --mkinitrd --depmod --install %{KVERREL}smp
-
-# remove fake handle
-if [ -n "$fake_root_lvm" ]; then
-    rm -f $rootdev
-fi
-
-# make some useful links
-pushd /boot > /dev/null ; {
-       ln -sf config-%{KVERREL}smp configsmp
-       ln -sf initrd-%{KVERREL}smp.img initrd-bootsmp
-       ln -sf vmlinuz-%{KVERREL}smp kernel-bootsmp
-}
-popd > /dev/null
-
-# ask for a reboot
-mkdir -p /etc/planetlab
-touch /etc/planetlab/update-reboot
-
-%post smp-devel
-[ -f /etc/sysconfig/kernel ] && . /etc/sysconfig/kernel
-if [ "$HARDLINK" != "no" -a -x /usr/sbin/hardlink ] ; then
-  pushd /usr/src/kernels/%{KVERREL}-smp-%{_target_cpu} > /dev/null
-  /usr/bin/find . -type f | while read f; do hardlink -c /usr/src/kernels/*FC*/$f $f ; done
-  popd > /dev/null
-fi
-
 %post xenU
 [ ! -x /usr/sbin/module_upgrade ] || /usr/sbin/module_upgrade
 [ ! -x /sbin/ldconfig ] || /sbin/ldconfig -X
@@ -647,10 +630,6 @@ depmod -ae %{KVERREL}uml
 /sbin/modprobe loop 2> /dev/null > /dev/null  || :
 /sbin/new-kernel-pkg --rminitrd --rmmoddep --remove %{KVERREL}
 
-%preun smp
-/sbin/modprobe loop 2> /dev/null > /dev/null  || :
-/sbin/new-kernel-pkg --rminitrd --rmmoddep --remove %{KVERREL}smp
-
 %preun xenU
 /sbin/modprobe loop 2> /dev/null > /dev/null  || :
 /sbin/new-kernel-pkg --rmmoddep --remove %{KVERREL}xenU
@@ -681,27 +660,6 @@ rm -f /lib/modules/%{KVERREL}uml/modules.*
 %verify(not mtime) /usr/src/kernels/%{KVERREL}-%{_target_cpu}
 %endif
 
-%if %{buildsmp} 
-%if "%{_target_cpu}" == "i686" || "%{_target_cpu}" == "x86_64"
-%files smp
-%defattr(-,root,root)
-/%{image_install_path}/vmlinuz-%{KVERREL}smp
-/boot/System.map-%{KVERREL}smp
-/boot/config-%{KVERREL}smp
-%dir /lib/modules/%{KVERREL}smp
-/lib/modules/%{KVERREL}smp/kernel
-/lib/modules/%{KVERREL}smp/build
-/lib/modules/%{KVERREL}smp/source
-/lib/modules/%{KVERREL}smp/extra
-/lib/modules/%{KVERREL}smp/updates
-
-%files smp-devel
-%defattr(-,root,root)
-%verify(not mtime) /usr/src/kernels/%{KVERREL}-smp-%{_target_cpu}
-/usr/src/kernels/%{KVERREL}smp-%{_target_cpu}
-%endif
-%endif
-
 %if %{builduml} && "%{_target_cpu}" == "i686"
 %files uml
 %defattr(-,root,root)
diff --git a/kernel-2.6.22-i586-planetlab.config b/kernel-2.6.22-i586-planetlab.config
new file mode 100644 (file)
index 0000000..1d8f621
--- /dev/null
@@ -0,0 +1,2171 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.22-prep
+# Fri Nov 16 15:23:40 2007
+#
+CONFIG_X86_32=y
+CONFIG_GENERIC_TIME=y
+CONFIG_CLOCKSOURCE_WATCHDOG=y
+CONFIG_GENERIC_CLOCKEVENTS=y
+CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y
+CONFIG_LOCKDEP_SUPPORT=y
+CONFIG_STACKTRACE_SUPPORT=y
+CONFIG_SEMAPHORE_SLEEPERS=y
+CONFIG_X86=y
+CONFIG_MMU=y
+CONFIG_ZONE_DMA=y
+CONFIG_QUICKLIST=y
+CONFIG_GENERIC_ISA_DMA=y
+CONFIG_GENERIC_IOMAP=y
+CONFIG_GENERIC_BUG=y
+CONFIG_GENERIC_HWEIGHT=y
+CONFIG_ARCH_MAY_HAVE_PC_FDC=y
+CONFIG_DMI=y
+CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
+
+#
+# Code maturity level options
+#
+CONFIG_EXPERIMENTAL=y
+CONFIG_LOCK_KERNEL=y
+CONFIG_INIT_ENV_ARG_LIMIT=32
+
+#
+# General setup
+#
+CONFIG_LOCALVERSION=""
+# CONFIG_LOCALVERSION_AUTO is not set
+CONFIG_SWAP=y
+CONFIG_SYSVIPC=y
+CONFIG_IPC_NS=y
+CONFIG_SYSVIPC_SYSCTL=y
+CONFIG_POSIX_MQUEUE=y
+CONFIG_BSD_PROCESS_ACCT=y
+# CONFIG_BSD_PROCESS_ACCT_V3 is not set
+CONFIG_TASKSTATS=y
+CONFIG_TASK_DELAY_ACCT=y
+CONFIG_TASK_XACCT=y
+CONFIG_TASK_IO_ACCOUNTING=y
+CONFIG_UTS_NS=y
+# CONFIG_AUDIT is not set
+# CONFIG_IKCONFIG is not set
+CONFIG_LOG_BUF_SHIFT=17
+CONFIG_OOM_PANIC=y
+CONFIG_CPUSETS=y
+CONFIG_SYSFS_DEPRECATED=y
+CONFIG_RELAY=y
+CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS_SOURCE=""
+CONFIG_CC_OPTIMIZE_FOR_SIZE=y
+CONFIG_SYSCTL=y
+# CONFIG_EMBEDDED is not set
+CONFIG_UID16=y
+CONFIG_SYSCTL_SYSCALL=y
+CONFIG_KALLSYMS=y
+CONFIG_KALLSYMS_ALL=y
+CONFIG_KALLSYMS_EXTRA_PASS=y
+CONFIG_HOTPLUG=y
+CONFIG_PRINTK=y
+CONFIG_BUG=y
+CONFIG_ELF_CORE=y
+CONFIG_BASE_FULL=y
+CONFIG_FUTEX=y
+CONFIG_ANON_INODES=y
+CONFIG_EPOLL=y
+CONFIG_SIGNALFD=y
+CONFIG_EVENTFD=y
+CONFIG_SHMEM=y
+CONFIG_VM_EVENT_COUNTERS=y
+CONFIG_SLAB=y
+# CONFIG_SLUB is not set
+# CONFIG_SLOB is not set
+CONFIG_RT_MUTEXES=y
+# CONFIG_TINY_SHMEM is not set
+CONFIG_BASE_SMALL=0
+
+#
+# Loadable module support
+#
+CONFIG_MODULES=y
+CONFIG_MODULE_UNLOAD=y
+# CONFIG_MODULE_FORCE_UNLOAD is not set
+CONFIG_MODVERSIONS=y
+CONFIG_MODULE_SRCVERSION_ALL=y
+CONFIG_KMOD=y
+CONFIG_STOP_MACHINE=y
+
+#
+# Block layer
+#
+CONFIG_BLOCK=y
+CONFIG_LBD=y
+CONFIG_BLK_DEV_IO_TRACE=y
+CONFIG_LSF=y
+
+#
+# IO Schedulers
+#
+CONFIG_IOSCHED_NOOP=y
+CONFIG_IOSCHED_AS=y
+CONFIG_IOSCHED_DEADLINE=y
+CONFIG_IOSCHED_CFQ=y
+# CONFIG_DEFAULT_AS is not set
+# CONFIG_DEFAULT_DEADLINE is not set
+CONFIG_DEFAULT_CFQ=y
+# CONFIG_DEFAULT_NOOP is not set
+CONFIG_DEFAULT_IOSCHED="cfq"
+
+#
+# Processor type and features
+#
+CONFIG_TICK_ONESHOT=y
+# CONFIG_NO_HZ is not set
+CONFIG_HIGH_RES_TIMERS=y
+CONFIG_SMP=y
+# CONFIG_X86_PC is not set
+# CONFIG_X86_ELAN is not set
+# CONFIG_X86_VOYAGER is not set
+# CONFIG_X86_NUMAQ is not set
+# CONFIG_X86_SUMMIT is not set
+# CONFIG_X86_BIGSMP is not set
+# CONFIG_X86_VISWS is not set
+CONFIG_X86_GENERICARCH=y
+# CONFIG_X86_ES7000 is not set
+# CONFIG_PARAVIRT is not set
+CONFIG_X86_CYCLONE_TIMER=y
+# CONFIG_M386 is not set
+# CONFIG_M486 is not set
+CONFIG_M586=y
+# CONFIG_M586TSC is not set
+# CONFIG_M586MMX is not set
+# CONFIG_M686 is not set
+# CONFIG_MPENTIUMII is not set
+# CONFIG_MPENTIUMIII is not set
+# CONFIG_MPENTIUMM is not set
+# CONFIG_MCORE2 is not set
+# CONFIG_MPENTIUM4 is not set
+# CONFIG_MK6 is not set
+# CONFIG_MK7 is not set
+# CONFIG_MK8 is not set
+# CONFIG_MCRUSOE is not set
+# CONFIG_MEFFICEON is not set
+# CONFIG_MWINCHIPC6 is not set
+# CONFIG_MWINCHIP2 is not set
+# CONFIG_MWINCHIP3D is not set
+# CONFIG_MGEODEGX1 is not set
+# CONFIG_MGEODE_LX is not set
+# CONFIG_MCYRIXIII is not set
+# CONFIG_MVIAC3_2 is not set
+# CONFIG_MVIAC7 is not set
+CONFIG_X86_GENERIC=y
+CONFIG_X86_CMPXCHG=y
+CONFIG_X86_L1_CACHE_SHIFT=7
+CONFIG_X86_XADD=y
+CONFIG_RWSEM_XCHGADD_ALGORITHM=y
+# CONFIG_ARCH_HAS_ILOG2_U32 is not set
+# CONFIG_ARCH_HAS_ILOG2_U64 is not set
+CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_X86_PPRO_FENCE=y
+CONFIG_X86_F00F_BUG=y
+CONFIG_X86_WP_WORKS_OK=y
+CONFIG_X86_INVLPG=y
+CONFIG_X86_BSWAP=y
+CONFIG_X86_POPAD_OK=y
+CONFIG_X86_ALIGNMENT_16=y
+CONFIG_X86_INTEL_USERCOPY=y
+CONFIG_X86_MINIMUM_CPU_MODEL=4
+CONFIG_HPET_TIMER=y
+CONFIG_HPET_EMULATE_RTC=y
+CONFIG_NR_CPUS=4
+CONFIG_SCHED_SMT=y
+CONFIG_SCHED_MC=y
+CONFIG_PREEMPT_NONE=y
+# CONFIG_PREEMPT_VOLUNTARY is not set
+# CONFIG_PREEMPT is not set
+# CONFIG_PREEMPT_BKL is not set
+CONFIG_X86_LOCAL_APIC=y
+CONFIG_X86_IO_APIC=y
+CONFIG_X86_MCE=y
+# CONFIG_X86_MCE_NONFATAL is not set
+CONFIG_X86_MCE_P4THERMAL=y
+CONFIG_VM86=y
+CONFIG_TOSHIBA=m
+CONFIG_I8K=m
+# CONFIG_X86_REBOOTFIXUPS is not set
+CONFIG_MICROCODE=m
+CONFIG_MICROCODE_OLD_INTERFACE=y
+CONFIG_X86_MSR=m
+CONFIG_X86_CPUID=m
+
+#
+# Firmware Drivers
+#
+CONFIG_EDD=m
+CONFIG_EFI_VARS=y
+CONFIG_DELL_RBU=m
+CONFIG_DCDBAS=m
+CONFIG_NOHIGHMEM=y
+# CONFIG_HIGHMEM4G is not set
+# CONFIG_HIGHMEM64G is not set
+CONFIG_PAGE_OFFSET=0xC0000000
+CONFIG_ARCH_POPULATES_NODE_MAP=y
+CONFIG_SELECT_MEMORY_MODEL=y
+CONFIG_FLATMEM_MANUAL=y
+# CONFIG_DISCONTIGMEM_MANUAL is not set
+# CONFIG_SPARSEMEM_MANUAL is not set
+CONFIG_FLATMEM=y
+CONFIG_FLAT_NODE_MEM_MAP=y
+# CONFIG_SPARSEMEM_STATIC is not set
+CONFIG_SPLIT_PTLOCK_CPUS=4
+CONFIG_RESOURCES_64BIT=y
+CONFIG_ZONE_DMA_FLAG=1
+CONFIG_NR_QUICK=1
+# CONFIG_MATH_EMULATION is not set
+CONFIG_MTRR=y
+CONFIG_EFI=y
+# CONFIG_IRQBALANCE is not set
+CONFIG_BOOT_IOREMAP=y
+# CONFIG_SECCOMP is not set
+# CONFIG_HZ_100 is not set
+# CONFIG_HZ_250 is not set
+# CONFIG_HZ_300 is not set
+CONFIG_HZ_1000=y
+CONFIG_HZ=1000
+CONFIG_KEXEC=y
+CONFIG_PHYSICAL_START=0x100000
+CONFIG_RELOCATABLE=y
+CONFIG_PHYSICAL_ALIGN=0x400000
+CONFIG_HOTPLUG_CPU=y
+# CONFIG_COMPAT_VDSO is not set
+
+#
+# Power management options (ACPI, APM)
+#
+CONFIG_PM=y
+CONFIG_PM_LEGACY=y
+CONFIG_PM_DEBUG=y
+# CONFIG_DISABLE_CONSOLE_SUSPEND is not set
+CONFIG_PM_TRACE=y
+# CONFIG_PM_SYSFS_DEPRECATED is not set
+CONFIG_SOFTWARE_SUSPEND=y
+CONFIG_PM_STD_PARTITION=""
+CONFIG_SUSPEND_SMP=y
+
+#
+# ACPI (Advanced Configuration and Power Interface) Support
+#
+CONFIG_ACPI=y
+# CONFIG_ACPI_SLEEP is not set
+CONFIG_ACPI_PROCFS=y
+# CONFIG_ACPI_AC is not set
+# CONFIG_ACPI_BATTERY is not set
+# CONFIG_ACPI_BUTTON is not set
+# CONFIG_ACPI_VIDEO is not set
+# CONFIG_ACPI_FAN is not set
+# CONFIG_ACPI_DOCK is not set
+# CONFIG_ACPI_PROCESSOR is not set
+# CONFIG_ACPI_ASUS is not set
+CONFIG_ACPI_TOSHIBA=m
+CONFIG_ACPI_BLACKLIST_YEAR=1999
+# CONFIG_ACPI_DEBUG is not set
+CONFIG_ACPI_EC=y
+CONFIG_ACPI_POWER=y
+CONFIG_ACPI_SYSTEM=y
+CONFIG_X86_PM_TIMER=y
+CONFIG_ACPI_CONTAINER=y
+CONFIG_ACPI_SBS=m
+# CONFIG_APM is not set
+
+#
+# CPU Frequency scaling
+#
+# CONFIG_CPU_FREQ is not set
+
+#
+# Bus options (PCI, PCMCIA, EISA, MCA, ISA)
+#
+CONFIG_PCI=y
+# CONFIG_PCI_GOBIOS is not set
+# CONFIG_PCI_GOMMCONFIG is not set
+# CONFIG_PCI_GODIRECT is not set
+CONFIG_PCI_GOANY=y
+CONFIG_PCI_BIOS=y
+CONFIG_PCI_DIRECT=y
+CONFIG_PCI_MMCONFIG=y
+CONFIG_PCIEPORTBUS=y
+CONFIG_PCIEAER=y
+CONFIG_ARCH_SUPPORTS_MSI=y
+CONFIG_PCI_MSI=y
+# CONFIG_PCI_DEBUG is not set
+CONFIG_HT_IRQ=y
+CONFIG_ISA_DMA_API=y
+CONFIG_ISA=y
+# CONFIG_EISA is not set
+# CONFIG_MCA is not set
+# CONFIG_SCx200 is not set
+CONFIG_K8_NB=y
+
+#
+# PCCARD (PCMCIA/CardBus) support
+#
+CONFIG_PCCARD=y
+# CONFIG_PCMCIA_DEBUG is not set
+CONFIG_PCMCIA=y
+CONFIG_PCMCIA_LOAD_CIS=y
+CONFIG_PCMCIA_IOCTL=y
+CONFIG_CARDBUS=y
+
+#
+# PC-card bridges
+#
+CONFIG_YENTA=y
+CONFIG_YENTA_O2=y
+CONFIG_YENTA_RICOH=y
+CONFIG_YENTA_TI=y
+CONFIG_YENTA_ENE_TUNE=y
+CONFIG_YENTA_TOSHIBA=y
+CONFIG_PD6729=m
+CONFIG_I82092=m
+CONFIG_I82365=m
+# CONFIG_TCIC is not set
+CONFIG_PCMCIA_PROBE=y
+CONFIG_PCCARD_NONSTATIC=y
+# CONFIG_HOTPLUG_PCI is not set
+
+#
+# Executable file formats
+#
+CONFIG_BINFMT_ELF=y
+# CONFIG_BINFMT_AOUT is not set
+CONFIG_BINFMT_MISC=y
+
+#
+# Networking
+#
+CONFIG_NET=y
+
+#
+# Networking options
+#
+CONFIG_PACKET=y
+CONFIG_PACKET_MMAP=y
+CONFIG_UNIX=y
+CONFIG_XFRM=y
+CONFIG_XFRM_USER=y
+CONFIG_XFRM_SUB_POLICY=y
+CONFIG_XFRM_MIGRATE=y
+CONFIG_NET_KEY=m
+CONFIG_NET_KEY_MIGRATE=y
+CONFIG_INET=y
+CONFIG_IP_MULTICAST=y
+CONFIG_IP_ADVANCED_ROUTER=y
+CONFIG_ASK_IP_FIB_HASH=y
+# CONFIG_IP_FIB_TRIE is not set
+CONFIG_IP_FIB_HASH=y
+CONFIG_IP_MULTIPLE_TABLES=y
+CONFIG_IP_ROUTE_MULTIPATH=y
+# CONFIG_IP_ROUTE_MULTIPATH_CACHED is not set
+CONFIG_IP_ROUTE_VERBOSE=y
+# CONFIG_IP_PNP is not set
+CONFIG_NET_IPIP=m
+CONFIG_NET_IPGRE=m
+CONFIG_NET_IPGRE_BROADCAST=y
+CONFIG_IP_MROUTE=y
+CONFIG_IP_PIMSM_V1=y
+CONFIG_IP_PIMSM_V2=y
+# CONFIG_ARPD is not set
+CONFIG_SYN_COOKIES=y
+CONFIG_INET_AH=m
+CONFIG_INET_ESP=m
+CONFIG_INET_IPCOMP=m
+CONFIG_INET_XFRM_TUNNEL=m
+CONFIG_INET_TUNNEL=m
+CONFIG_INET_XFRM_MODE_TRANSPORT=m
+CONFIG_INET_XFRM_MODE_TUNNEL=m
+CONFIG_INET_XFRM_MODE_BEET=m
+CONFIG_INET_DIAG=m
+CONFIG_INET_TCP_DIAG=m
+CONFIG_TCP_CONG_ADVANCED=y
+CONFIG_TCP_CONG_BIC=m
+CONFIG_TCP_CONG_CUBIC=y
+CONFIG_TCP_CONG_WESTWOOD=m
+CONFIG_TCP_CONG_HTCP=m
+CONFIG_TCP_CONG_HSTCP=m
+CONFIG_TCP_CONG_HYBLA=m
+CONFIG_TCP_CONG_VEGAS=m
+CONFIG_TCP_CONG_SCALABLE=m
+CONFIG_TCP_CONG_LP=m
+CONFIG_TCP_CONG_VENO=m
+CONFIG_TCP_CONG_YEAH=m
+CONFIG_TCP_CONG_ILLINOIS=m
+# CONFIG_DEFAULT_BIC is not set
+CONFIG_DEFAULT_CUBIC=y
+# CONFIG_DEFAULT_HTCP is not set
+# CONFIG_DEFAULT_VEGAS is not set
+# CONFIG_DEFAULT_WESTWOOD is not set
+# CONFIG_DEFAULT_RENO is not set
+CONFIG_DEFAULT_TCP_CONG="cubic"
+CONFIG_TCP_MD5SIG=y
+# CONFIG_IP_VS is not set
+CONFIG_ICMP_IPOD=y
+CONFIG_IPV6=y
+CONFIG_IPV6_PRIVACY=y
+CONFIG_IPV6_ROUTER_PREF=y
+CONFIG_IPV6_ROUTE_INFO=y
+CONFIG_IPV6_OPTIMISTIC_DAD=y
+CONFIG_INET6_AH=m
+CONFIG_INET6_ESP=m
+CONFIG_INET6_IPCOMP=m
+CONFIG_IPV6_MIP6=y
+CONFIG_INET6_XFRM_TUNNEL=m
+CONFIG_INET6_TUNNEL=m
+CONFIG_INET6_XFRM_MODE_TRANSPORT=m
+CONFIG_INET6_XFRM_MODE_TUNNEL=m
+CONFIG_INET6_XFRM_MODE_BEET=m
+CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION=m
+CONFIG_IPV6_SIT=m
+CONFIG_IPV6_TUNNEL=m
+CONFIG_IPV6_MULTIPLE_TABLES=y
+CONFIG_IPV6_SUBTREES=y
+CONFIG_NETLABEL=y
+CONFIG_NETWORK_SECMARK=y
+CONFIG_NETFILTER=y
+# CONFIG_NETFILTER_DEBUG is not set
+CONFIG_BRIDGE_NETFILTER=y
+
+#
+# Core Netfilter Configuration
+#
+CONFIG_NETFILTER_NETLINK=m
+CONFIG_NETFILTER_NETLINK_QUEUE=m
+CONFIG_NETFILTER_NETLINK_LOG=m
+CONFIG_NF_CONNTRACK_ENABLED=m
+CONFIG_NF_CONNTRACK=m
+CONFIG_NF_CT_ACCT=y
+CONFIG_NF_CONNTRACK_MARK=y
+CONFIG_NF_CONNTRACK_SECMARK=y
+CONFIG_NF_CONNTRACK_EVENTS=y
+CONFIG_NF_CT_PROTO_GRE=m
+CONFIG_NF_CT_PROTO_SCTP=m
+CONFIG_NF_CONNTRACK_AMANDA=m
+CONFIG_NF_CONNTRACK_FTP=m
+CONFIG_NF_CONNTRACK_H323=m
+CONFIG_NF_CONNTRACK_IRC=m
+CONFIG_NF_CONNTRACK_NETBIOS_NS=m
+CONFIG_NF_CONNTRACK_PPTP=m
+CONFIG_NF_CONNTRACK_SANE=m
+CONFIG_NF_CONNTRACK_SIP=m
+CONFIG_NF_CONNTRACK_TFTP=m
+CONFIG_NF_CT_NETLINK=m
+CONFIG_NETFILTER_XTABLES=m
+CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m
+CONFIG_NETFILTER_XT_TARGET_CONNMARK=m
+CONFIG_NETFILTER_XT_TARGET_DSCP=m
+CONFIG_NETFILTER_XT_TARGET_MARK=m
+CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m
+CONFIG_NETFILTER_XT_TARGET_NFLOG=m
+CONFIG_NETFILTER_XT_TARGET_NOTRACK=m
+CONFIG_NETFILTER_XT_TARGET_SECMARK=m
+CONFIG_NETFILTER_XT_TARGET_CONNSECMARK=m
+CONFIG_NETFILTER_XT_TARGET_TCPMSS=m
+CONFIG_NETFILTER_XT_TARGET_SETXID=m
+CONFIG_NETFILTER_XT_MATCH_COMMENT=m
+CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m
+CONFIG_NETFILTER_XT_MATCH_CONNMARK=m
+CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m
+CONFIG_NETFILTER_XT_MATCH_DCCP=m
+CONFIG_NETFILTER_XT_MATCH_DSCP=m
+CONFIG_NETFILTER_XT_MATCH_ESP=m
+CONFIG_NETFILTER_XT_MATCH_HELPER=m
+CONFIG_NETFILTER_XT_MATCH_LENGTH=m
+CONFIG_NETFILTER_XT_MATCH_LIMIT=m
+CONFIG_NETFILTER_XT_MATCH_MAC=m
+CONFIG_NETFILTER_XT_MATCH_MARK=m
+CONFIG_NETFILTER_XT_MATCH_POLICY=m
+CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m
+CONFIG_NETFILTER_XT_MATCH_PHYSDEV=m
+CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m
+CONFIG_NETFILTER_XT_MATCH_QUOTA=m
+CONFIG_NETFILTER_XT_MATCH_REALM=m
+CONFIG_NETFILTER_XT_MATCH_SCTP=m
+CONFIG_NETFILTER_XT_MATCH_STATE=m
+CONFIG_NETFILTER_XT_MATCH_STATISTIC=m
+CONFIG_NETFILTER_XT_MATCH_STRING=m
+CONFIG_NETFILTER_XT_MATCH_TCPMSS=m
+CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m
+
+#
+# IP: Netfilter Configuration
+#
+CONFIG_NF_CONNTRACK_IPV4=m
+# CONFIG_NF_CONNTRACK_PROC_COMPAT is not set
+CONFIG_IP_NF_QUEUE=m
+CONFIG_IP_NF_IPTABLES=m
+CONFIG_IP_NF_MATCH_IPRANGE=m
+CONFIG_IP_NF_MATCH_TOS=m
+CONFIG_IP_NF_MATCH_RECENT=m
+CONFIG_IP_NF_MATCH_ECN=m
+CONFIG_IP_NF_MATCH_AH=m
+CONFIG_IP_NF_MATCH_TTL=m
+CONFIG_IP_NF_MATCH_OWNER=m
+CONFIG_IP_NF_MATCH_ADDRTYPE=m
+CONFIG_IP_NF_FILTER=m
+CONFIG_IP_NF_TARGET_REJECT=m
+CONFIG_IP_NF_TARGET_LOG=m
+CONFIG_IP_NF_TARGET_ULOG=m
+CONFIG_NF_NAT=m
+CONFIG_NF_NAT_NEEDED=y
+CONFIG_IP_NF_TARGET_MASQUERADE=m
+CONFIG_IP_NF_TARGET_REDIRECT=m
+CONFIG_IP_NF_TARGET_NETMAP=m
+CONFIG_IP_NF_TARGET_SAME=m
+CONFIG_NF_NAT_SNMP_BASIC=m
+CONFIG_NF_NAT_PROTO_GRE=m
+CONFIG_NF_NAT_FTP=m
+CONFIG_NF_NAT_IRC=m
+CONFIG_NF_NAT_TFTP=m
+CONFIG_NF_NAT_AMANDA=m
+CONFIG_NF_NAT_PPTP=m
+CONFIG_NF_NAT_H323=m
+CONFIG_NF_NAT_SIP=m
+CONFIG_IP_NF_MANGLE=m
+CONFIG_IP_NF_TARGET_TOS=m
+CONFIG_IP_NF_TARGET_ECN=m
+CONFIG_IP_NF_TARGET_TTL=m
+CONFIG_IP_NF_TARGET_CLUSTERIP=m
+CONFIG_IP_NF_RAW=m
+CONFIG_IP_NF_ARPTABLES=m
+CONFIG_IP_NF_ARPFILTER=m
+CONFIG_IP_NF_ARP_MANGLE=m
+CONFIG_IP_NF_SET=m
+CONFIG_IP_NF_SET_MAX=256
+CONFIG_IP_NF_SET_HASHSIZE=1024
+CONFIG_IP_NF_SET_IPMAP=m
+CONFIG_IP_NF_SET_MACIPMAP=m
+CONFIG_IP_NF_SET_PORTMAP=m
+CONFIG_IP_NF_SET_IPHASH=m
+CONFIG_IP_NF_SET_NETHASH=m
+CONFIG_IP_NF_SET_IPPORTHASH=m
+CONFIG_IP_NF_SET_IPTREE=m
+CONFIG_IP_NF_SET_IPTREEMAP=m
+CONFIG_IP_NF_MATCH_SET=m
+CONFIG_IP_NF_TARGET_SET=m
+
+#
+# IPv6: Netfilter Configuration (EXPERIMENTAL)
+#
+CONFIG_NF_CONNTRACK_IPV6=m
+CONFIG_IP6_NF_QUEUE=m
+CONFIG_IP6_NF_IPTABLES=m
+CONFIG_IP6_NF_MATCH_RT=m
+CONFIG_IP6_NF_MATCH_OPTS=m
+CONFIG_IP6_NF_MATCH_FRAG=m
+CONFIG_IP6_NF_MATCH_HL=m
+CONFIG_IP6_NF_MATCH_OWNER=m
+CONFIG_IP6_NF_MATCH_IPV6HEADER=m
+CONFIG_IP6_NF_MATCH_AH=m
+CONFIG_IP6_NF_MATCH_MH=m
+CONFIG_IP6_NF_MATCH_EUI64=m
+CONFIG_IP6_NF_FILTER=m
+CONFIG_IP6_NF_TARGET_LOG=m
+CONFIG_IP6_NF_TARGET_REJECT=m
+CONFIG_IP6_NF_MANGLE=m
+CONFIG_IP6_NF_TARGET_HL=m
+CONFIG_IP6_NF_RAW=m
+
+#
+# Bridge: Netfilter Configuration
+#
+CONFIG_BRIDGE_NF_EBTABLES=m
+CONFIG_BRIDGE_EBT_BROUTE=m
+CONFIG_BRIDGE_EBT_T_FILTER=m
+CONFIG_BRIDGE_EBT_T_NAT=m
+CONFIG_BRIDGE_EBT_802_3=m
+CONFIG_BRIDGE_EBT_AMONG=m
+CONFIG_BRIDGE_EBT_ARP=m
+CONFIG_BRIDGE_EBT_IP=m
+CONFIG_BRIDGE_EBT_LIMIT=m
+CONFIG_BRIDGE_EBT_MARK=m
+CONFIG_BRIDGE_EBT_PKTTYPE=m
+CONFIG_BRIDGE_EBT_STP=m
+CONFIG_BRIDGE_EBT_VLAN=m
+CONFIG_BRIDGE_EBT_ARPREPLY=m
+CONFIG_BRIDGE_EBT_DNAT=m
+CONFIG_BRIDGE_EBT_MARK_T=m
+CONFIG_BRIDGE_EBT_REDIRECT=m
+CONFIG_BRIDGE_EBT_SNAT=m
+CONFIG_BRIDGE_EBT_LOG=m
+CONFIG_BRIDGE_EBT_ULOG=m
+# CONFIG_IP_DCCP is not set
+# CONFIG_IP_SCTP is not set
+# CONFIG_TIPC is not set
+# CONFIG_ATM is not set
+CONFIG_BRIDGE=m
+CONFIG_VLAN_8021Q=m
+# CONFIG_DECNET is not set
+CONFIG_LLC=y
+# CONFIG_LLC2 is not set
+# CONFIG_IPX is not set
+# CONFIG_ATALK is not set
+# CONFIG_X25 is not set
+# CONFIG_LAPB is not set
+# CONFIG_ECONET is not set
+# CONFIG_WAN_ROUTER is not set
+
+#
+# QoS and/or fair queueing
+#
+CONFIG_NET_SCHED=y
+CONFIG_NET_SCH_FIFO=y
+
+#
+# Queueing/Scheduling
+#
+CONFIG_NET_SCH_CBQ=m
+CONFIG_NET_SCH_HTB=m
+CONFIG_NET_SCH_HFSC=m
+CONFIG_NET_SCH_PRIO=m
+CONFIG_NET_SCH_RED=m
+CONFIG_NET_SCH_SFQ=m
+CONFIG_NET_SCH_TEQL=m
+CONFIG_NET_SCH_TBF=m
+CONFIG_NET_SCH_GRED=m
+CONFIG_NET_SCH_DSMARK=m
+CONFIG_NET_SCH_NETEM=m
+CONFIG_NET_SCH_INGRESS=m
+
+#
+# Classification
+#
+CONFIG_NET_CLS=y
+CONFIG_NET_CLS_BASIC=m
+CONFIG_NET_CLS_TCINDEX=m
+CONFIG_NET_CLS_ROUTE4=m
+CONFIG_NET_CLS_ROUTE=y
+CONFIG_NET_CLS_FW=m
+CONFIG_NET_CLS_U32=m
+CONFIG_CLS_U32_PERF=y
+CONFIG_CLS_U32_MARK=y
+CONFIG_NET_CLS_RSVP=m
+CONFIG_NET_CLS_RSVP6=m
+CONFIG_NET_EMATCH=y
+CONFIG_NET_EMATCH_STACK=32
+CONFIG_NET_EMATCH_CMP=m
+CONFIG_NET_EMATCH_NBYTE=m
+CONFIG_NET_EMATCH_U32=m
+CONFIG_NET_EMATCH_META=m
+CONFIG_NET_EMATCH_TEXT=m
+CONFIG_NET_CLS_ACT=y
+CONFIG_NET_ACT_POLICE=m
+CONFIG_NET_ACT_GACT=m
+CONFIG_GACT_PROB=y
+CONFIG_NET_ACT_MIRRED=m
+CONFIG_NET_ACT_IPT=m
+CONFIG_NET_ACT_PEDIT=m
+CONFIG_NET_ACT_SIMP=m
+CONFIG_NET_CLS_IND=y
+CONFIG_NET_ESTIMATOR=y
+
+#
+# Network testing
+#
+CONFIG_NET_PKTGEN=m
+# CONFIG_NET_TCPPROBE is not set
+# CONFIG_HAMRADIO is not set
+# CONFIG_IRDA is not set
+# CONFIG_BT is not set
+# CONFIG_AF_RXRPC is not set
+CONFIG_FIB_RULES=y
+
+#
+# Wireless
+#
+CONFIG_CFG80211=m
+CONFIG_WIRELESS_EXT=y
+CONFIG_MAC80211=m
+CONFIG_MAC80211_LEDS=y
+# CONFIG_MAC80211_DEBUGFS is not set
+# CONFIG_MAC80211_DEBUG is not set
+CONFIG_IEEE80211=m
+CONFIG_IEEE80211_DEBUG=y
+CONFIG_IEEE80211_CRYPT_WEP=m
+CONFIG_IEEE80211_CRYPT_CCMP=m
+CONFIG_IEEE80211_CRYPT_TKIP=m
+CONFIG_IEEE80211_SOFTMAC=m
+CONFIG_IEEE80211_SOFTMAC_DEBUG=y
+CONFIG_RFKILL=m
+CONFIG_RFKILL_INPUT=m
+
+#
+# Device Drivers
+#
+
+#
+# Generic Driver Options
+#
+CONFIG_STANDALONE=y
+CONFIG_PREVENT_FIRMWARE_BUILD=y
+CONFIG_FW_LOADER=y
+# CONFIG_DEBUG_DRIVER is not set
+CONFIG_DEBUG_DEVRES=y
+# CONFIG_SYS_HYPERVISOR is not set
+
+#
+# Connector - unified userspace <-> kernelspace linker
+#
+CONFIG_CONNECTOR=y
+CONFIG_PROC_EVENTS=y
+# CONFIG_MTD is not set
+
+#
+# Parallel port support
+#
+# CONFIG_PARPORT is not set
+
+#
+# Plug and Play support
+#
+CONFIG_PNP=y
+# CONFIG_PNP_DEBUG is not set
+
+#
+# Protocols
+#
+CONFIG_ISAPNP=y
+# CONFIG_PNPBIOS is not set
+CONFIG_PNPACPI=y
+
+#
+# Block devices
+#
+CONFIG_BLK_DEV_FD=m
+# CONFIG_BLK_DEV_XD is not set
+CONFIG_BLK_CPQ_DA=m
+CONFIG_BLK_CPQ_CISS_DA=m
+CONFIG_CISS_SCSI_TAPE=y
+CONFIG_BLK_DEV_DAC960=m
+CONFIG_BLK_DEV_UMEM=m
+# CONFIG_BLK_DEV_COW_COMMON is not set
+CONFIG_BLK_DEV_LOOP=m
+CONFIG_BLK_DEV_CRYPTOLOOP=m
+# CONFIG_BLK_DEV_VROOT is not set
+CONFIG_BLK_DEV_NBD=m
+CONFIG_BLK_DEV_SX8=m
+# CONFIG_BLK_DEV_UB is not set
+CONFIG_BLK_DEV_RAM=y
+CONFIG_BLK_DEV_RAM_COUNT=16
+CONFIG_BLK_DEV_RAM_SIZE=16384
+CONFIG_BLK_DEV_RAM_BLOCKSIZE=4096
+CONFIG_CDROM_PKTCDVD=m
+CONFIG_CDROM_PKTCDVD_BUFFERS=8
+# CONFIG_CDROM_PKTCDVD_WCACHE is not set
+CONFIG_ATA_OVER_ETH=m
+
+#
+# Misc devices
+#
+# CONFIG_IBM_ASM is not set
+# CONFIG_PHANTOM is not set
+# CONFIG_SGI_IOC4 is not set
+CONFIG_TIFM_CORE=m
+CONFIG_TIFM_7XX1=m
+CONFIG_ASUS_LAPTOP=m
+CONFIG_MSI_LAPTOP=m
+CONFIG_SONY_LAPTOP=m
+CONFIG_SONYPI_COMPAT=y
+# CONFIG_THINKPAD_ACPI is not set
+# CONFIG_IDE is not set
+
+#
+# SCSI device support
+#
+CONFIG_RAID_ATTRS=m
+CONFIG_SCSI=m
+CONFIG_SCSI_TGT=m
+CONFIG_SCSI_NETLINK=y
+CONFIG_SCSI_PROC_FS=y
+
+#
+# SCSI support type (disk, tape, CD-ROM)
+#
+CONFIG_BLK_DEV_SD=m
+CONFIG_CHR_DEV_ST=m
+CONFIG_CHR_DEV_OSST=m
+CONFIG_BLK_DEV_SR=m
+CONFIG_BLK_DEV_SR_VENDOR=y
+CONFIG_CHR_DEV_SG=m
+CONFIG_CHR_DEV_SCH=m
+
+#
+# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
+#
+CONFIG_SCSI_MULTI_LUN=y
+CONFIG_SCSI_CONSTANTS=y
+CONFIG_SCSI_LOGGING=y
+CONFIG_SCSI_SCAN_ASYNC=y
+CONFIG_SCSI_WAIT_SCAN=m
+
+#
+# SCSI Transports
+#
+CONFIG_SCSI_SPI_ATTRS=m
+CONFIG_SCSI_FC_ATTRS=m
+CONFIG_SCSI_ISCSI_ATTRS=m
+CONFIG_SCSI_SAS_ATTRS=m
+CONFIG_SCSI_SAS_LIBSAS=m
+# CONFIG_SCSI_SAS_LIBSAS_DEBUG is not set
+
+#
+# SCSI low-level drivers
+#
+CONFIG_ISCSI_TCP=m
+CONFIG_BLK_DEV_3W_XXXX_RAID=m
+CONFIG_SCSI_3W_9XXX=m
+# CONFIG_SCSI_7000FASST is not set
+CONFIG_SCSI_ACARD=m
+CONFIG_SCSI_AHA152X=m
+CONFIG_SCSI_AHA1542=m
+CONFIG_SCSI_AACRAID=m
+CONFIG_SCSI_AIC7XXX=m
+CONFIG_AIC7XXX_CMDS_PER_DEVICE=4
+CONFIG_AIC7XXX_RESET_DELAY_MS=15000
+# CONFIG_AIC7XXX_DEBUG_ENABLE is not set
+CONFIG_AIC7XXX_DEBUG_MASK=0
+# CONFIG_AIC7XXX_REG_PRETTY_PRINT is not set
+CONFIG_SCSI_AIC7XXX_OLD=m
+CONFIG_SCSI_AIC79XX=m
+CONFIG_AIC79XX_CMDS_PER_DEVICE=4
+CONFIG_AIC79XX_RESET_DELAY_MS=15000
+# CONFIG_AIC79XX_DEBUG_ENABLE is not set
+CONFIG_AIC79XX_DEBUG_MASK=0
+# CONFIG_AIC79XX_REG_PRETTY_PRINT is not set
+CONFIG_SCSI_AIC94XX=m
+# CONFIG_AIC94XX_DEBUG is not set
+# CONFIG_SCSI_DPT_I2O is not set
+# CONFIG_SCSI_ADVANSYS is not set
+# CONFIG_SCSI_IN2000 is not set
+CONFIG_SCSI_ARCMSR=m
+CONFIG_MEGARAID_NEWGEN=y
+CONFIG_MEGARAID_MM=m
+CONFIG_MEGARAID_MAILBOX=m
+CONFIG_MEGARAID_LEGACY=m
+CONFIG_MEGARAID_SAS=m
+CONFIG_SCSI_HPTIOP=m
+CONFIG_SCSI_BUSLOGIC=m
+# CONFIG_SCSI_OMIT_FLASHPOINT is not set
+# CONFIG_SCSI_DMX3191D is not set
+# CONFIG_SCSI_DTC3280 is not set
+# CONFIG_SCSI_EATA is not set
+# CONFIG_SCSI_FUTURE_DOMAIN is not set
+CONFIG_SCSI_GDTH=m
+# CONFIG_SCSI_GENERIC_NCR5380 is not set
+# CONFIG_SCSI_GENERIC_NCR5380_MMIO is not set
+CONFIG_SCSI_IPS=m
+CONFIG_SCSI_INITIO=m
+CONFIG_SCSI_INIA100=m
+# CONFIG_SCSI_NCR53C406A is not set
+CONFIG_SCSI_STEX=m
+CONFIG_SCSI_SYM53C8XX_2=m
+CONFIG_SCSI_SYM53C8XX_DMA_ADDRESSING_MODE=1
+CONFIG_SCSI_SYM53C8XX_DEFAULT_TAGS=16
+CONFIG_SCSI_SYM53C8XX_MAX_TAGS=64
+CONFIG_SCSI_SYM53C8XX_MMIO=y
+# CONFIG_SCSI_IPR is not set
+# CONFIG_SCSI_PAS16 is not set
+# CONFIG_SCSI_PSI240I is not set
+# CONFIG_SCSI_QLOGIC_FAS is not set
+CONFIG_SCSI_QLOGIC_1280=m
+CONFIG_SCSI_QLA_FC=m
+CONFIG_SCSI_QLA_ISCSI=m
+CONFIG_SCSI_LPFC=m
+# CONFIG_SCSI_SEAGATE is not set
+# CONFIG_SCSI_SYM53C416 is not set
+CONFIG_SCSI_DC395x=m
+CONFIG_SCSI_DC390T=m
+# CONFIG_SCSI_T128 is not set
+# CONFIG_SCSI_U14_34F is not set
+# CONFIG_SCSI_ULTRASTOR is not set
+# CONFIG_SCSI_NSP32 is not set
+# CONFIG_SCSI_DEBUG is not set
+CONFIG_SCSI_SRP=m
+
+#
+# PCMCIA SCSI adapter support
+#
+CONFIG_PCMCIA_AHA152X=m
+# CONFIG_PCMCIA_FDOMAIN is not set
+CONFIG_PCMCIA_NINJA_SCSI=m
+CONFIG_PCMCIA_QLOGIC=m
+CONFIG_PCMCIA_SYM53C500=m
+CONFIG_ATA=m
+# CONFIG_ATA_NONSTANDARD is not set
+CONFIG_ATA_ACPI=y
+CONFIG_SATA_AHCI=m
+CONFIG_SATA_SVW=m
+CONFIG_ATA_PIIX=m
+CONFIG_SATA_MV=m
+CONFIG_SATA_NV=m
+CONFIG_PDC_ADMA=m
+CONFIG_SATA_QSTOR=m
+CONFIG_SATA_PROMISE=m
+CONFIG_SATA_SX4=m
+CONFIG_SATA_SIL=m
+CONFIG_SATA_SIL24=m
+CONFIG_SATA_SIS=m
+CONFIG_SATA_ULI=m
+CONFIG_SATA_VIA=m
+CONFIG_SATA_VITESSE=m
+CONFIG_SATA_INIC162X=m
+CONFIG_PATA_ALI=m
+CONFIG_PATA_AMD=m
+CONFIG_PATA_ARTOP=m
+CONFIG_PATA_ATIIXP=m
+CONFIG_PATA_CMD640_PCI=m
+CONFIG_PATA_CMD64X=m
+CONFIG_PATA_CS5520=m
+CONFIG_PATA_CS5530=m
+CONFIG_PATA_CS5535=m
+CONFIG_PATA_CYPRESS=m
+CONFIG_PATA_EFAR=m
+CONFIG_ATA_GENERIC=m
+CONFIG_PATA_HPT366=m
+CONFIG_PATA_HPT37X=m
+CONFIG_PATA_HPT3X2N=m
+CONFIG_PATA_HPT3X3=m
+CONFIG_PATA_ISAPNP=m
+CONFIG_PATA_IT821X=m
+CONFIG_PATA_IT8213=m
+CONFIG_PATA_JMICRON=m
+# CONFIG_PATA_LEGACY is not set
+CONFIG_PATA_TRIFLEX=m
+CONFIG_PATA_MARVELL=m
+CONFIG_PATA_MPIIX=m
+CONFIG_PATA_OLDPIIX=m
+CONFIG_PATA_NETCELL=m
+CONFIG_PATA_NS87410=m
+CONFIG_PATA_OPTI=m
+CONFIG_PATA_OPTIDMA=m
+CONFIG_PATA_PCMCIA=m
+CONFIG_PATA_PDC_OLD=m
+CONFIG_PATA_QDI=m
+# CONFIG_PATA_RADISYS is not set
+# CONFIG_PATA_RZ1000 is not set
+# CONFIG_PATA_SC1200 is not set
+CONFIG_PATA_SERVERWORKS=m
+CONFIG_PATA_PDC2027X=m
+CONFIG_PATA_SIL680=m
+CONFIG_PATA_SIS=m
+CONFIG_PATA_VIA=m
+CONFIG_PATA_WINBOND=m
+# CONFIG_PATA_WINBOND_VLB is not set
+
+#
+# Old CD-ROM drivers (not SCSI, not IDE)
+#
+# CONFIG_CD_NO_IDESCSI is not set
+
+#
+# Multi-device support (RAID and LVM)
+#
+CONFIG_MD=y
+CONFIG_BLK_DEV_MD=y
+CONFIG_MD_LINEAR=m
+CONFIG_MD_RAID0=m
+CONFIG_MD_RAID1=m
+CONFIG_MD_RAID10=m
+CONFIG_MD_RAID456=m
+CONFIG_MD_RAID5_RESHAPE=y
+CONFIG_MD_MULTIPATH=m
+CONFIG_MD_FAULTY=m
+CONFIG_BLK_DEV_DM=m
+CONFIG_DM_DEBUG=y
+CONFIG_DM_CRYPT=m
+CONFIG_DM_SNAPSHOT=m
+CONFIG_DM_MIRROR=m
+CONFIG_DM_ZERO=m
+CONFIG_DM_MULTIPATH=m
+CONFIG_DM_MULTIPATH_EMC=m
+# CONFIG_DM_DELAY is not set
+
+#
+# Fusion MPT device support
+#
+CONFIG_FUSION=y
+CONFIG_FUSION_SPI=m
+CONFIG_FUSION_FC=m
+CONFIG_FUSION_SAS=m
+CONFIG_FUSION_MAX_SGE=40
+CONFIG_FUSION_CTL=m
+CONFIG_FUSION_LAN=m
+
+#
+# IEEE 1394 (FireWire) support
+#
+CONFIG_FIREWIRE=m
+CONFIG_FIREWIRE_OHCI=m
+CONFIG_FIREWIRE_SBP2=m
+# CONFIG_IEEE1394 is not set
+
+#
+# I2O device support
+#
+# CONFIG_I2O is not set
+CONFIG_MACINTOSH_DRIVERS=y
+CONFIG_MAC_EMUMOUSEBTN=y
+
+#
+# Network device support
+#
+CONFIG_NETDEVICES=y
+CONFIG_IFB=m
+CONFIG_DUMMY=m
+CONFIG_BONDING=m
+CONFIG_EQUALIZER=m
+CONFIG_TUN=m
+CONFIG_NET_SB1000=m
+# CONFIG_ARCNET is not set
+CONFIG_PHYLIB=m
+
+#
+# MII PHY device drivers
+#
+CONFIG_MARVELL_PHY=m
+CONFIG_DAVICOM_PHY=m
+CONFIG_QSEMI_PHY=m
+CONFIG_LXT_PHY=m
+CONFIG_CICADA_PHY=m
+CONFIG_VITESSE_PHY=m
+CONFIG_SMSC_PHY=m
+CONFIG_BROADCOM_PHY=m
+CONFIG_FIXED_PHY=m
+CONFIG_FIXED_MII_10_FDX=y
+CONFIG_FIXED_MII_100_FDX=y
+
+#
+# Ethernet (10 or 100Mbit)
+#
+CONFIG_NET_ETHERNET=y
+CONFIG_MII=m
+CONFIG_HAPPYMEAL=m
+CONFIG_SUNGEM=m
+CONFIG_CASSINI=m
+CONFIG_NET_VENDOR_3COM=y
+# CONFIG_EL1 is not set
+# CONFIG_EL2 is not set
+# CONFIG_ELPLUS is not set
+# CONFIG_EL16 is not set
+CONFIG_EL3=m
+# CONFIG_3C515 is not set
+CONFIG_VORTEX=m
+CONFIG_TYPHOON=m
+# CONFIG_LANCE is not set
+CONFIG_NET_VENDOR_SMC=y
+# CONFIG_WD80x3 is not set
+CONFIG_ULTRA=m
+# CONFIG_SMC9194 is not set
+# CONFIG_NET_VENDOR_RACAL is not set
+
+#
+# Tulip family network device support
+#
+CONFIG_NET_TULIP=y
+CONFIG_DE2104X=m
+CONFIG_TULIP=m
+# CONFIG_TULIP_MWI is not set
+CONFIG_TULIP_MMIO=y
+# CONFIG_TULIP_NAPI is not set
+CONFIG_DE4X5=m
+CONFIG_WINBOND_840=m
+CONFIG_DM9102=m
+CONFIG_ULI526X=m
+CONFIG_PCMCIA_XIRCOM=m
+# CONFIG_AT1700 is not set
+# CONFIG_DEPCA is not set
+# CONFIG_HP100 is not set
+CONFIG_NET_ISA=y
+# CONFIG_E2100 is not set
+CONFIG_EWRK3=m
+# CONFIG_EEXPRESS is not set
+# CONFIG_EEXPRESS_PRO is not set
+# CONFIG_HPLAN_PLUS is not set
+# CONFIG_HPLAN is not set
+# CONFIG_LP486E is not set
+# CONFIG_ETH16I is not set
+CONFIG_NE2000=m
+# CONFIG_ZNET is not set
+# CONFIG_SEEQ8005 is not set
+CONFIG_NET_PCI=y
+CONFIG_PCNET32=m
+CONFIG_PCNET32_NAPI=y
+CONFIG_AMD8111_ETH=m
+CONFIG_AMD8111E_NAPI=y
+CONFIG_ADAPTEC_STARFIRE=m
+CONFIG_ADAPTEC_STARFIRE_NAPI=y
+# CONFIG_AC3200 is not set
+# CONFIG_APRICOT is not set
+CONFIG_B44=m
+CONFIG_FORCEDETH=m
+CONFIG_FORCEDETH_NAPI=y
+# CONFIG_CS89x0 is not set
+# CONFIG_DGRS is not set
+# CONFIG_EEPRO100 is not set
+CONFIG_E100=m
+CONFIG_FEALNX=m
+CONFIG_NATSEMI=m
+CONFIG_NE2K_PCI=m
+CONFIG_8139CP=m
+CONFIG_8139TOO=m
+# CONFIG_8139TOO_PIO is not set
+# CONFIG_8139TOO_TUNE_TWISTER is not set
+CONFIG_8139TOO_8129=y
+# CONFIG_8139_OLD_RX_RESET is not set
+CONFIG_SIS900=m
+CONFIG_EPIC100=m
+CONFIG_SUNDANCE=m
+# CONFIG_SUNDANCE_MMIO is not set
+CONFIG_TLAN=m
+CONFIG_VIA_RHINE=m
+CONFIG_VIA_RHINE_MMIO=y
+CONFIG_VIA_RHINE_NAPI=y
+CONFIG_SC92031=m
+CONFIG_NETDEV_1000=y
+CONFIG_ACENIC=m
+# CONFIG_ACENIC_OMIT_TIGON_I is not set
+CONFIG_DL2K=m
+CONFIG_E1000=m
+CONFIG_E1000_NAPI=y
+# CONFIG_E1000_DISABLE_PACKET_SPLIT is not set
+CONFIG_NS83820=m
+CONFIG_HAMACHI=m
+CONFIG_YELLOWFIN=m
+CONFIG_R8169=m
+CONFIG_R8169_NAPI=y
+CONFIG_R8169_VLAN=y
+CONFIG_SIS190=m
+CONFIG_SKGE=m
+CONFIG_SKY2=m
+# CONFIG_SK98LIN is not set
+CONFIG_VIA_VELOCITY=m
+CONFIG_TIGON3=m
+CONFIG_BNX2=m
+CONFIG_QLA3XXX=m
+CONFIG_ATL1=m
+CONFIG_NETDEV_10000=y
+CONFIG_CHELSIO_T1=m
+CONFIG_CHELSIO_T1_1G=y
+CONFIG_CHELSIO_T1_NAPI=y
+CONFIG_CHELSIO_T3=m
+CONFIG_IXGB=m
+CONFIG_IXGB_NAPI=y
+CONFIG_S2IO=m
+CONFIG_S2IO_NAPI=y
+CONFIG_MYRI10GE=m
+CONFIG_NETXEN_NIC=m
+# CONFIG_MLX4_CORE is not set
+CONFIG_TR=y
+# CONFIG_IBMTR is not set
+CONFIG_IBMOL=m
+CONFIG_IBMLS=m
+CONFIG_3C359=m
+# CONFIG_TMS380TR is not set
+# CONFIG_SMCTR is not set
+
+#
+# Wireless LAN
+#
+CONFIG_WLAN_PRE80211=y
+# CONFIG_STRIP is not set
+# CONFIG_ARLAN is not set
+# CONFIG_WAVELAN is not set
+CONFIG_PCMCIA_WAVELAN=m
+CONFIG_PCMCIA_NETWAVE=m
+CONFIG_WLAN_80211=y
+# CONFIG_PCMCIA_RAYCS is not set
+# CONFIG_IPW2100 is not set
+# CONFIG_IPW2200 is not set
+CONFIG_LIBERTAS=m
+CONFIG_LIBERTAS_USB=m
+# CONFIG_LIBERTAS_DEBUG is not set
+CONFIG_AIRO=m
+CONFIG_HERMES=m
+CONFIG_PLX_HERMES=m
+CONFIG_TMD_HERMES=m
+CONFIG_NORTEL_HERMES=m
+CONFIG_PCI_HERMES=m
+CONFIG_ATMEL=m
+CONFIG_PCI_ATMEL=m
+CONFIG_PCMCIA_HERMES=m
+CONFIG_PCMCIA_SPECTRUM=m
+CONFIG_AIRO_CS=m
+CONFIG_PCMCIA_ATMEL=m
+CONFIG_PCMCIA_WL3501=m
+CONFIG_PRISM54=m
+CONFIG_USB_ZD1201=m
+CONFIG_HOSTAP=m
+CONFIG_HOSTAP_FIRMWARE=y
+CONFIG_HOSTAP_FIRMWARE_NVRAM=y
+CONFIG_HOSTAP_PLX=m
+CONFIG_HOSTAP_PCI=m
+CONFIG_HOSTAP_CS=m
+CONFIG_BCM43XX=m
+CONFIG_BCM43XX_DEBUG=y
+CONFIG_BCM43XX_DMA=y
+CONFIG_BCM43XX_PIO=y
+CONFIG_BCM43XX_DMA_AND_PIO_MODE=y
+# CONFIG_BCM43XX_DMA_MODE is not set
+# CONFIG_BCM43XX_PIO_MODE is not set
+CONFIG_ZD1211RW=m
+# CONFIG_ZD1211RW_DEBUG is not set
+
+#
+# USB Network Adapters
+#
+CONFIG_USB_CATC=m
+CONFIG_USB_KAWETH=m
+CONFIG_USB_PEGASUS=m
+CONFIG_USB_RTL8150=m
+CONFIG_USB_USBNET_MII=m
+CONFIG_USB_USBNET=m
+CONFIG_USB_NET_AX8817X=m
+CONFIG_USB_NET_CDCETHER=m
+CONFIG_USB_NET_DM9601=m
+CONFIG_USB_NET_GL620A=m
+CONFIG_USB_NET_NET1080=m
+CONFIG_USB_NET_PLUSB=m
+CONFIG_USB_NET_MCS7830=m
+CONFIG_USB_NET_RNDIS_HOST=m
+CONFIG_USB_NET_CDC_SUBSET=m
+CONFIG_USB_ALI_M5632=y
+CONFIG_USB_AN2720=y
+CONFIG_USB_BELKIN=y
+CONFIG_USB_ARMLINUX=y
+CONFIG_USB_EPSON2888=y
+CONFIG_USB_KC2190=y
+CONFIG_USB_NET_ZAURUS=m
+CONFIG_NET_PCMCIA=y
+CONFIG_PCMCIA_3C589=m
+CONFIG_PCMCIA_3C574=m
+CONFIG_PCMCIA_FMVJ18X=m
+CONFIG_PCMCIA_PCNET=m
+CONFIG_PCMCIA_NMCLAN=m
+CONFIG_PCMCIA_SMC91C92=m
+CONFIG_PCMCIA_XIRC2PS=m
+CONFIG_PCMCIA_AXNET=m
+CONFIG_PCMCIA_IBMTR=m
+# CONFIG_WAN is not set
+CONFIG_FDDI=y
+# CONFIG_DEFXX is not set
+CONFIG_SKFP=m
+# CONFIG_HIPPI is not set
+# CONFIG_PPP is not set
+# CONFIG_SLIP is not set
+CONFIG_NET_FC=y
+# CONFIG_SHAPER is not set
+CONFIG_NETCONSOLE=m
+CONFIG_NETPOLL=y
+CONFIG_NETPOLL_TRAP=y
+CONFIG_NET_POLL_CONTROLLER=y
+
+#
+# ISDN subsystem
+#
+# CONFIG_ISDN is not set
+
+#
+# Telephony Support
+#
+# CONFIG_PHONE is not set
+
+#
+# Input device support
+#
+CONFIG_INPUT=y
+CONFIG_INPUT_FF_MEMLESS=y
+CONFIG_INPUT_POLLDEV=m
+
+#
+# Userland interfaces
+#
+CONFIG_INPUT_MOUSEDEV=y
+# CONFIG_INPUT_MOUSEDEV_PSAUX is not set
+CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
+CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
+# CONFIG_INPUT_JOYDEV is not set
+# CONFIG_INPUT_TSDEV is not set
+CONFIG_INPUT_EVDEV=y
+# CONFIG_INPUT_EVBUG is not set
+
+#
+# Input Device Drivers
+#
+CONFIG_INPUT_KEYBOARD=y
+CONFIG_KEYBOARD_ATKBD=y
+# CONFIG_KEYBOARD_SUNKBD is not set
+# CONFIG_KEYBOARD_LKKBD is not set
+# CONFIG_KEYBOARD_XTKBD is not set
+# CONFIG_KEYBOARD_NEWTON is not set
+# CONFIG_KEYBOARD_STOWAWAY is not set
+CONFIG_INPUT_MOUSE=y
+CONFIG_MOUSE_PS2=y
+CONFIG_MOUSE_PS2_ALPS=y
+CONFIG_MOUSE_PS2_LOGIPS2PP=y
+CONFIG_MOUSE_PS2_SYNAPTICS=y
+CONFIG_MOUSE_PS2_LIFEBOOK=y
+CONFIG_MOUSE_PS2_TRACKPOINT=y
+# CONFIG_MOUSE_PS2_TOUCHKIT is not set
+CONFIG_MOUSE_SERIAL=m
+CONFIG_MOUSE_APPLETOUCH=m
+# CONFIG_MOUSE_INPORT is not set
+# CONFIG_MOUSE_LOGIBM is not set
+# CONFIG_MOUSE_PC110PAD is not set
+CONFIG_MOUSE_VSXXXAA=m
+# CONFIG_INPUT_JOYSTICK is not set
+# CONFIG_INPUT_TABLET is not set
+# CONFIG_INPUT_TOUCHSCREEN is not set
+# CONFIG_INPUT_MISC is not set
+
+#
+# Hardware I/O ports
+#
+CONFIG_SERIO=y
+CONFIG_SERIO_I8042=y
+CONFIG_SERIO_SERPORT=y
+# CONFIG_SERIO_CT82C710 is not set
+# CONFIG_SERIO_PCIPS2 is not set
+CONFIG_SERIO_LIBPS2=y
+CONFIG_SERIO_RAW=m
+CONFIG_GAMEPORT=m
+CONFIG_GAMEPORT_NS558=m
+CONFIG_GAMEPORT_L4=m
+CONFIG_GAMEPORT_EMU10K1=m
+CONFIG_GAMEPORT_FM801=m
+
+#
+# Character devices
+#
+CONFIG_VT=y
+CONFIG_VT_CONSOLE=y
+CONFIG_HW_CONSOLE=y
+CONFIG_VT_HW_CONSOLE_BINDING=y
+CONFIG_SERIAL_NONSTANDARD=y
+# CONFIG_COMPUTONE is not set
+CONFIG_ROCKETPORT=m
+CONFIG_CYCLADES=m
+# CONFIG_CYZ_INTR is not set
+# CONFIG_DIGIEPCA is not set
+# CONFIG_ESPSERIAL is not set
+# CONFIG_MOXA_INTELLIO is not set
+# CONFIG_MOXA_SMARTIO is not set
+# CONFIG_MOXA_SMARTIO_NEW is not set
+# CONFIG_ISI is not set
+CONFIG_SYNCLINK=m
+CONFIG_SYNCLINKMP=m
+CONFIG_SYNCLINK_GT=m
+CONFIG_N_HDLC=m
+# CONFIG_SPECIALIX is not set
+# CONFIG_SX is not set
+# CONFIG_RIO is not set
+# CONFIG_STALDRV is not set
+
+#
+# Serial drivers
+#
+CONFIG_SERIAL_8250=y
+CONFIG_SERIAL_8250_CONSOLE=y
+CONFIG_SERIAL_8250_PCI=y
+CONFIG_SERIAL_8250_PNP=y
+CONFIG_SERIAL_8250_CS=m
+CONFIG_SERIAL_8250_NR_UARTS=32
+CONFIG_SERIAL_8250_RUNTIME_UARTS=4
+CONFIG_SERIAL_8250_EXTENDED=y
+CONFIG_SERIAL_8250_MANY_PORTS=y
+# CONFIG_SERIAL_8250_FOURPORT is not set
+# CONFIG_SERIAL_8250_ACCENT is not set
+# CONFIG_SERIAL_8250_BOCA is not set
+# CONFIG_SERIAL_8250_EXAR_ST16C554 is not set
+# CONFIG_SERIAL_8250_HUB6 is not set
+CONFIG_SERIAL_8250_SHARE_IRQ=y
+CONFIG_SERIAL_8250_DETECT_IRQ=y
+CONFIG_SERIAL_8250_RSA=y
+
+#
+# Non-8250 serial port support
+#
+CONFIG_SERIAL_CORE=y
+CONFIG_SERIAL_CORE_CONSOLE=y
+CONFIG_SERIAL_JSM=m
+CONFIG_UNIX98_PTYS=y
+# CONFIG_LEGACY_PTYS is not set
+
+#
+# IPMI
+#
+CONFIG_IPMI_HANDLER=m
+# CONFIG_IPMI_PANIC_EVENT is not set
+CONFIG_IPMI_DEVICE_INTERFACE=m
+CONFIG_IPMI_SI=m
+CONFIG_IPMI_WATCHDOG=m
+CONFIG_IPMI_POWEROFF=m
+# CONFIG_WATCHDOG is not set
+CONFIG_HW_RANDOM=y
+CONFIG_HW_RANDOM_INTEL=m
+CONFIG_HW_RANDOM_AMD=m
+CONFIG_HW_RANDOM_GEODE=m
+CONFIG_HW_RANDOM_VIA=m
+# CONFIG_NVRAM is not set
+CONFIG_RTC=y
+CONFIG_DTLK=m
+CONFIG_R3964=m
+# CONFIG_APPLICOM is not set
+# CONFIG_SONYPI is not set
+CONFIG_AGP=y
+CONFIG_AGP_ALI=y
+CONFIG_AGP_ATI=y
+CONFIG_AGP_AMD=y
+CONFIG_AGP_AMD64=y
+CONFIG_AGP_INTEL=y
+CONFIG_AGP_NVIDIA=y
+CONFIG_AGP_SIS=y
+CONFIG_AGP_SWORKS=y
+CONFIG_AGP_VIA=y
+CONFIG_AGP_EFFICEON=y
+CONFIG_DRM=m
+CONFIG_DRM_TDFX=m
+CONFIG_DRM_R128=m
+CONFIG_DRM_RADEON=m
+CONFIG_DRM_I810=m
+CONFIG_DRM_I830=m
+CONFIG_DRM_I915=m
+CONFIG_DRM_MGA=m
+CONFIG_DRM_SIS=m
+CONFIG_DRM_VIA=m
+CONFIG_DRM_SAVAGE=m
+
+#
+# PCMCIA character devices
+#
+# CONFIG_SYNCLINK_CS is not set
+CONFIG_CARDMAN_4000=m
+CONFIG_CARDMAN_4040=m
+CONFIG_MWAVE=m
+CONFIG_PC8736x_GPIO=m
+CONFIG_NSC_GPIO=m
+CONFIG_CS5535_GPIO=m
+# CONFIG_RAW_DRIVER is not set
+# CONFIG_HPET is not set
+CONFIG_HANGCHECK_TIMER=m
+
+#
+# TPM devices
+#
+CONFIG_TCG_TPM=m
+CONFIG_TCG_TIS=m
+CONFIG_TCG_NSC=m
+CONFIG_TCG_ATMEL=m
+# CONFIG_TCG_INFINEON is not set
+# CONFIG_TELCLOCK is not set
+CONFIG_DEVPORT=y
+CONFIG_I2C=m
+CONFIG_I2C_BOARDINFO=y
+CONFIG_I2C_CHARDEV=m
+
+#
+# I2C Algorithms
+#
+CONFIG_I2C_ALGOBIT=m
+CONFIG_I2C_ALGOPCF=m
+CONFIG_I2C_ALGOPCA=m
+
+#
+# I2C Hardware Bus support
+#
+# CONFIG_I2C_ALI1535 is not set
+# CONFIG_I2C_ALI1563 is not set
+# CONFIG_I2C_ALI15X3 is not set
+# CONFIG_I2C_AMD756 is not set
+# CONFIG_I2C_AMD8111 is not set
+# CONFIG_I2C_I801 is not set
+# CONFIG_I2C_I810 is not set
+# CONFIG_I2C_PIIX4 is not set
+CONFIG_I2C_NFORCE2=m
+# CONFIG_I2C_OCORES is not set
+CONFIG_I2C_PARPORT_LIGHT=m
+CONFIG_I2C_PROSAVAGE=m
+CONFIG_I2C_SAVAGE4=m
+CONFIG_I2C_SIMTEC=m
+# CONFIG_SCx200_ACB is not set
+# CONFIG_I2C_SIS5595 is not set
+# CONFIG_I2C_SIS630 is not set
+# CONFIG_I2C_SIS96X is not set
+CONFIG_I2C_STUB=m
+# CONFIG_I2C_TINY_USB is not set
+# CONFIG_I2C_VIA is not set
+# CONFIG_I2C_VIAPRO is not set
+CONFIG_I2C_VOODOO3=m
+CONFIG_I2C_PCA_ISA=m
+
+#
+# Miscellaneous I2C Chip support
+#
+CONFIG_SENSORS_DS1337=m
+CONFIG_SENSORS_DS1374=m
+CONFIG_SENSORS_EEPROM=m
+CONFIG_SENSORS_PCF8574=m
+CONFIG_SENSORS_PCA9539=m
+CONFIG_SENSORS_PCF8591=m
+CONFIG_SENSORS_MAX6875=m
+# CONFIG_I2C_DEBUG_CORE is not set
+# CONFIG_I2C_DEBUG_ALGO is not set
+# CONFIG_I2C_DEBUG_BUS is not set
+# CONFIG_I2C_DEBUG_CHIP is not set
+
+#
+# SPI support
+#
+# CONFIG_SPI is not set
+# CONFIG_SPI_MASTER is not set
+
+#
+# Dallas's 1-wire bus
+#
+# CONFIG_W1 is not set
+# CONFIG_HWMON is not set
+
+#
+# Multifunction device drivers
+#
+CONFIG_MFD_SM501=m
+
+#
+# Multimedia devices
+#
+# CONFIG_VIDEO_DEV is not set
+# CONFIG_DVB_CORE is not set
+# CONFIG_DAB is not set
+
+#
+# Graphics support
+#
+CONFIG_BACKLIGHT_LCD_SUPPORT=y
+CONFIG_BACKLIGHT_CLASS_DEVICE=y
+CONFIG_LCD_CLASS_DEVICE=m
+CONFIG_BACKLIGHT_PROGEAR=m
+
+#
+# Display device support
+#
+CONFIG_DISPLAY_SUPPORT=m
+
+#
+# Display hardware drivers
+#
+# CONFIG_VGASTATE is not set
+# CONFIG_FB is not set
+
+#
+# Console display driver support
+#
+CONFIG_VGA_CONSOLE=y
+CONFIG_VGACON_SOFT_SCROLLBACK=y
+CONFIG_VGACON_SOFT_SCROLLBACK_SIZE=64
+CONFIG_VIDEO_SELECT=y
+# CONFIG_MDA_CONSOLE is not set
+CONFIG_DUMMY_CONSOLE=y
+
+#
+# Sound
+#
+# CONFIG_SOUND is not set
+
+#
+# HID Devices
+#
+CONFIG_HID=y
+# CONFIG_HID_DEBUG is not set
+
+#
+# USB Input Devices
+#
+CONFIG_USB_HID=y
+# CONFIG_USB_HIDINPUT_POWERBOOK is not set
+CONFIG_HID_FF=y
+CONFIG_HID_PID=y
+CONFIG_LOGITECH_FF=y
+CONFIG_PANTHERLORD_FF=y
+CONFIG_THRUSTMASTER_FF=y
+CONFIG_ZEROPLUS_FF=y
+CONFIG_USB_HIDDEV=y
+
+#
+# USB support
+#
+CONFIG_USB_ARCH_HAS_HCD=y
+CONFIG_USB_ARCH_HAS_OHCI=y
+CONFIG_USB_ARCH_HAS_EHCI=y
+CONFIG_USB=y
+# CONFIG_USB_DEBUG is not set
+
+#
+# Miscellaneous USB options
+#
+CONFIG_USB_DEVICEFS=y
+CONFIG_USB_DEVICE_CLASS=y
+# CONFIG_USB_DYNAMIC_MINORS is not set
+CONFIG_USB_SUSPEND=y
+# CONFIG_USB_OTG is not set
+
+#
+# USB Host Controller Drivers
+#
+CONFIG_USB_EHCI_HCD=m
+CONFIG_USB_EHCI_SPLIT_ISO=y
+CONFIG_USB_EHCI_ROOT_HUB_TT=y
+CONFIG_USB_EHCI_TT_NEWSCHED=y
+# CONFIG_USB_EHCI_BIG_ENDIAN_MMIO is not set
+CONFIG_USB_ISP116X_HCD=m
+CONFIG_USB_OHCI_HCD=m
+# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set
+# CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set
+CONFIG_USB_OHCI_LITTLE_ENDIAN=y
+CONFIG_USB_UHCI_HCD=m
+CONFIG_USB_SL811_HCD=m
+CONFIG_USB_SL811_CS=m
+
+#
+# USB Device Class drivers
+#
+CONFIG_USB_ACM=m
+# CONFIG_USB_PRINTER is not set
+
+#
+# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
+#
+
+#
+# may also be needed; see USB_STORAGE Help for more information
+#
+CONFIG_USB_STORAGE=m
+# CONFIG_USB_STORAGE_DEBUG is not set
+CONFIG_USB_STORAGE_DATAFAB=y
+CONFIG_USB_STORAGE_FREECOM=y
+CONFIG_USB_STORAGE_DPCM=y
+CONFIG_USB_STORAGE_USBAT=y
+CONFIG_USB_STORAGE_SDDR09=y
+CONFIG_USB_STORAGE_SDDR55=y
+CONFIG_USB_STORAGE_JUMPSHOT=y
+CONFIG_USB_STORAGE_ALAUDA=y
+CONFIG_USB_STORAGE_KARMA=y
+# CONFIG_USB_LIBUSUAL is not set
+
+#
+# USB Imaging devices
+#
+# CONFIG_USB_MDC800 is not set
+# CONFIG_USB_MICROTEK is not set
+# CONFIG_USB_MON is not set
+
+#
+# USB port drivers
+#
+
+#
+# USB Serial Converter support
+#
+# CONFIG_USB_SERIAL is not set
+
+#
+# USB Miscellaneous drivers
+#
+# CONFIG_USB_EMI62 is not set
+# CONFIG_USB_EMI26 is not set
+# CONFIG_USB_ADUTUX is not set
+# CONFIG_USB_AUERSWALD is not set
+# CONFIG_USB_RIO500 is not set
+# CONFIG_USB_LEGOTOWER is not set
+# CONFIG_USB_LCD is not set
+# CONFIG_USB_BERRY_CHARGE is not set
+# CONFIG_USB_LED is not set
+# CONFIG_USB_CYPRESS_CY7C63 is not set
+# CONFIG_USB_CYTHERM is not set
+# CONFIG_USB_PHIDGET is not set
+# CONFIG_USB_IDMOUSE is not set
+# CONFIG_USB_FTDI_ELAN is not set
+# CONFIG_USB_APPLEDISPLAY is not set
+# CONFIG_USB_SISUSBVGA is not set
+# CONFIG_USB_LD is not set
+# CONFIG_USB_TRANCEVIBRATOR is not set
+# CONFIG_USB_IOWARRIOR is not set
+# CONFIG_USB_TEST is not set
+
+#
+# USB DSL modem support
+#
+
+#
+# USB Gadget Support
+#
+# CONFIG_USB_GADGET is not set
+# CONFIG_MMC is not set
+
+#
+# LED devices
+#
+CONFIG_NEW_LEDS=y
+CONFIG_LEDS_CLASS=y
+
+#
+# LED drivers
+#
+
+#
+# LED Triggers
+#
+CONFIG_LEDS_TRIGGERS=y
+CONFIG_LEDS_TRIGGER_TIMER=m
+CONFIG_LEDS_TRIGGER_HEARTBEAT=m
+
+#
+# InfiniBand support
+#
+# CONFIG_INFINIBAND is not set
+
+#
+# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
+#
+CONFIG_EDAC=y
+
+#
+# Reporting subsystems
+#
+# CONFIG_EDAC_DEBUG is not set
+CONFIG_EDAC_MM_EDAC=m
+CONFIG_EDAC_AMD76X=m
+CONFIG_EDAC_E7XXX=m
+CONFIG_EDAC_E752X=m
+CONFIG_EDAC_I82875P=m
+CONFIG_EDAC_I82860=m
+CONFIG_EDAC_R82600=m
+CONFIG_EDAC_POLL=y
+
+#
+# Real Time Clock
+#
+CONFIG_RTC_LIB=m
+CONFIG_RTC_CLASS=m
+
+#
+# RTC interfaces
+#
+CONFIG_RTC_INTF_SYSFS=y
+CONFIG_RTC_INTF_PROC=y
+CONFIG_RTC_INTF_DEV=y
+# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
+# CONFIG_RTC_DRV_TEST is not set
+
+#
+# I2C RTC drivers
+#
+CONFIG_RTC_DRV_DS1307=m
+CONFIG_RTC_DRV_DS1672=m
+CONFIG_RTC_DRV_MAX6900=m
+CONFIG_RTC_DRV_RS5C372=m
+CONFIG_RTC_DRV_ISL1208=m
+CONFIG_RTC_DRV_X1205=m
+CONFIG_RTC_DRV_PCF8563=m
+CONFIG_RTC_DRV_PCF8583=m
+
+#
+# SPI RTC drivers
+#
+
+#
+# Platform RTC drivers
+#
+# CONFIG_RTC_DRV_CMOS is not set
+CONFIG_RTC_DRV_DS1553=m
+CONFIG_RTC_DRV_DS1742=m
+# CONFIG_RTC_DRV_M48T86 is not set
+CONFIG_RTC_DRV_V3020=m
+
+#
+# on-CPU RTC drivers
+#
+
+#
+# DMA Engine support
+#
+CONFIG_DMA_ENGINE=y
+
+#
+# DMA Clients
+#
+CONFIG_NET_DMA=y
+
+#
+# DMA Devices
+#
+CONFIG_INTEL_IOATDMA=m
+
+#
+# Virtualization
+#
+CONFIG_KVM=m
+CONFIG_KVM_INTEL=m
+CONFIG_KVM_AMD=m
+
+#
+# File systems
+#
+CONFIG_EXT2_FS=m
+CONFIG_EXT2_FS_XATTR=y
+CONFIG_EXT2_FS_POSIX_ACL=y
+CONFIG_EXT2_FS_SECURITY=y
+CONFIG_EXT2_FS_XIP=y
+CONFIG_FS_XIP=y
+CONFIG_EXT3_FS=m
+CONFIG_EXT3_FS_XATTR=y
+CONFIG_EXT3_FS_POSIX_ACL=y
+CONFIG_EXT3_FS_SECURITY=y
+# CONFIG_EXT4DEV_FS is not set
+CONFIG_JBD=m
+# CONFIG_JBD_DEBUG is not set
+CONFIG_FS_MBCACHE=m
+# CONFIG_REISERFS_FS is not set
+# CONFIG_JFS_FS is not set
+CONFIG_FS_POSIX_ACL=y
+# CONFIG_XFS_FS is not set
+# CONFIG_GFS2_FS is not set
+# CONFIG_OCFS2_FS is not set
+# CONFIG_MINIX_FS is not set
+# CONFIG_ROMFS_FS is not set
+CONFIG_INOTIFY=y
+CONFIG_INOTIFY_USER=y
+CONFIG_QUOTA=y
+# CONFIG_QFMT_V1 is not set
+CONFIG_QFMT_V2=y
+CONFIG_QUOTACTL=y
+CONFIG_DNOTIFY=y
+# CONFIG_AUTOFS_FS is not set
+# CONFIG_AUTOFS4_FS is not set
+# CONFIG_FUSE_FS is not set
+CONFIG_GENERIC_ACL=y
+
+#
+# CD-ROM/DVD Filesystems
+#
+CONFIG_ISO9660_FS=y
+CONFIG_JOLIET=y
+CONFIG_ZISOFS=y
+CONFIG_UDF_FS=m
+CONFIG_UDF_NLS=y
+
+#
+# DOS/FAT/NT Filesystems
+#
+CONFIG_FAT_FS=m
+CONFIG_MSDOS_FS=m
+CONFIG_VFAT_FS=m
+CONFIG_FAT_DEFAULT_CODEPAGE=437
+CONFIG_FAT_DEFAULT_IOCHARSET="ascii"
+# CONFIG_NTFS_FS is not set
+
+#
+# Pseudo filesystems
+#
+CONFIG_PROC_FS=y
+CONFIG_PROC_KCORE=y
+CONFIG_PROC_SYSCTL=y
+CONFIG_SYSFS=y
+CONFIG_TMPFS=y
+CONFIG_TMPFS_POSIX_ACL=y
+CONFIG_HUGETLBFS=y
+CONFIG_HUGETLB_PAGE=y
+CONFIG_RAMFS=y
+CONFIG_CONFIGFS_FS=m
+
+#
+# Miscellaneous filesystems
+#
+# CONFIG_ADFS_FS is not set
+# CONFIG_AFFS_FS is not set
+# CONFIG_HFS_FS is not set
+# CONFIG_HFSPLUS_FS is not set
+# CONFIG_BEFS_FS is not set
+# CONFIG_BFS_FS is not set
+# CONFIG_EFS_FS is not set
+CONFIG_CRAMFS=y
+# CONFIG_VXFS_FS is not set
+# CONFIG_HPFS_FS is not set
+# CONFIG_QNX4FS_FS is not set
+# CONFIG_SYSV_FS is not set
+# CONFIG_UFS_FS is not set
+
+#
+# Network File Systems
+#
+CONFIG_NFS_FS=m
+CONFIG_NFS_V3=y
+CONFIG_NFS_V3_ACL=y
+CONFIG_NFS_V4=y
+CONFIG_NFS_DIRECTIO=y
+CONFIG_NFSD=m
+CONFIG_NFSD_V2_ACL=y
+CONFIG_NFSD_V3=y
+CONFIG_NFSD_V3_ACL=y
+CONFIG_NFSD_V4=y
+CONFIG_NFSD_TCP=y
+CONFIG_LOCKD=m
+CONFIG_LOCKD_V4=y
+CONFIG_EXPORTFS=m
+CONFIG_NFS_ACL_SUPPORT=m
+CONFIG_NFS_COMMON=y
+CONFIG_SUNRPC=m
+CONFIG_SUNRPC_GSS=m
+CONFIG_SUNRPC_BIND34=y
+CONFIG_RPCSEC_GSS_KRB5=m
+CONFIG_RPCSEC_GSS_SPKM3=m
+# CONFIG_SMB_FS is not set
+# CONFIG_CIFS is not set
+# CONFIG_NCP_FS is not set
+# CONFIG_CODA_FS is not set
+# CONFIG_AFS_FS is not set
+# CONFIG_9P_FS is not set
+
+#
+# Partition Types
+#
+CONFIG_PARTITION_ADVANCED=y
+# CONFIG_ACORN_PARTITION is not set
+# CONFIG_OSF_PARTITION is not set
+# CONFIG_AMIGA_PARTITION is not set
+# CONFIG_ATARI_PARTITION is not set
+# CONFIG_MAC_PARTITION is not set
+CONFIG_MSDOS_PARTITION=y
+# CONFIG_BSD_DISKLABEL is not set
+# CONFIG_MINIX_SUBPARTITION is not set
+# CONFIG_SOLARIS_X86_PARTITION is not set
+# CONFIG_UNIXWARE_DISKLABEL is not set
+# CONFIG_LDM_PARTITION is not set
+# CONFIG_SGI_PARTITION is not set
+# CONFIG_ULTRIX_PARTITION is not set
+# CONFIG_SUN_PARTITION is not set
+# CONFIG_KARMA_PARTITION is not set
+CONFIG_EFI_PARTITION=y
+# CONFIG_SYSV68_PARTITION is not set
+
+#
+# Native Language Support
+#
+CONFIG_NLS=y
+CONFIG_NLS_DEFAULT="utf8"
+CONFIG_NLS_CODEPAGE_437=y
+# CONFIG_NLS_CODEPAGE_737 is not set
+# CONFIG_NLS_CODEPAGE_775 is not set
+# CONFIG_NLS_CODEPAGE_850 is not set
+# CONFIG_NLS_CODEPAGE_852 is not set
+# CONFIG_NLS_CODEPAGE_855 is not set
+# CONFIG_NLS_CODEPAGE_857 is not set
+# CONFIG_NLS_CODEPAGE_860 is not set
+# CONFIG_NLS_CODEPAGE_861 is not set
+# CONFIG_NLS_CODEPAGE_862 is not set
+# CONFIG_NLS_CODEPAGE_863 is not set
+# CONFIG_NLS_CODEPAGE_864 is not set
+# CONFIG_NLS_CODEPAGE_865 is not set
+# CONFIG_NLS_CODEPAGE_866 is not set
+# CONFIG_NLS_CODEPAGE_869 is not set
+# CONFIG_NLS_CODEPAGE_936 is not set
+# CONFIG_NLS_CODEPAGE_950 is not set
+# CONFIG_NLS_CODEPAGE_932 is not set
+# CONFIG_NLS_CODEPAGE_949 is not set
+# CONFIG_NLS_CODEPAGE_874 is not set
+# CONFIG_NLS_ISO8859_8 is not set
+# CONFIG_NLS_CODEPAGE_1250 is not set
+# CONFIG_NLS_CODEPAGE_1251 is not set
+CONFIG_NLS_ASCII=y
+CONFIG_NLS_ISO8859_1=y
+# CONFIG_NLS_ISO8859_2 is not set
+# CONFIG_NLS_ISO8859_3 is not set
+# CONFIG_NLS_ISO8859_4 is not set
+# CONFIG_NLS_ISO8859_5 is not set
+# CONFIG_NLS_ISO8859_6 is not set
+# CONFIG_NLS_ISO8859_7 is not set
+# CONFIG_NLS_ISO8859_9 is not set
+# CONFIG_NLS_ISO8859_13 is not set
+# CONFIG_NLS_ISO8859_14 is not set
+# CONFIG_NLS_ISO8859_15 is not set
+# CONFIG_NLS_KOI8_R is not set
+# CONFIG_NLS_KOI8_U is not set
+CONFIG_NLS_UTF8=y
+
+#
+# Distributed Lock Manager
+#
+# CONFIG_DLM is not set
+
+#
+# Instrumentation Support
+#
+CONFIG_PROFILING=y
+CONFIG_OPROFILE=m
+CONFIG_KPROBES=y
+
+#
+# Kernel hacking
+#
+CONFIG_TRACE_IRQFLAGS_SUPPORT=y
+# CONFIG_PRINTK_TIME is not set
+CONFIG_ENABLE_MUST_CHECK=y
+CONFIG_MAGIC_SYSRQ=y
+# CONFIG_UNUSED_SYMBOLS is not set
+CONFIG_DEBUG_FS=y
+CONFIG_HEADERS_CHECK=y
+CONFIG_DEBUG_KERNEL=y
+# CONFIG_DEBUG_SHIRQ is not set
+CONFIG_DETECT_SOFTLOCKUP=y
+CONFIG_SCHEDSTATS=y
+CONFIG_TIMER_STATS=y
+# CONFIG_DEBUG_SLAB is not set
+# CONFIG_DEBUG_RT_MUTEXES is not set
+# CONFIG_RT_MUTEX_TESTER is not set
+# CONFIG_DEBUG_SPINLOCK is not set
+# CONFIG_DEBUG_MUTEXES is not set
+# CONFIG_DEBUG_LOCK_ALLOC is not set
+# CONFIG_PROVE_LOCKING is not set
+CONFIG_DEBUG_SPINLOCK_SLEEP=y
+# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
+# CONFIG_DEBUG_KOBJECT is not set
+CONFIG_DEBUG_BUGVERBOSE=y
+CONFIG_DEBUG_INFO=y
+# CONFIG_DEBUG_VM is not set
+CONFIG_DEBUG_LIST=y
+# CONFIG_FRAME_POINTER is not set
+# CONFIG_FORCED_INLINING is not set
+# CONFIG_RCU_TORTURE_TEST is not set
+# CONFIG_LKDTM is not set
+# CONFIG_FAULT_INJECTION is not set
+CONFIG_EARLY_PRINTK=y
+CONFIG_DEBUG_STACKOVERFLOW=y
+CONFIG_DEBUG_STACK_USAGE=y
+
+#
+# Page alloc debug is incompatible with Software Suspend on i386
+#
+CONFIG_DEBUG_RODATA=y
+CONFIG_4KSTACKS=y
+CONFIG_X86_FIND_SMP_CONFIG=y
+CONFIG_X86_MPPARSE=y
+CONFIG_DOUBLEFAULT=y
+
+#
+# Linux VServer
+#
+CONFIG_VSERVER_FILESHARING=y
+CONFIG_VSERVER_AUTO_LBACK=y
+# CONFIG_VSERVER_AUTO_SINGLE is not set
+CONFIG_VSERVER_COWBL=y
+# CONFIG_VSERVER_VTIME is not set
+# CONFIG_VSERVER_DEVICE is not set
+# CONFIG_VSERVER_PROC_SECURE is not set
+CONFIG_VSERVER_HARDCPU=y
+CONFIG_VSERVER_IDLETIME=y
+# CONFIG_VSERVER_IDLELIMIT is not set
+# CONFIG_TAGGING_NONE is not set
+# CONFIG_TAGGING_UID16 is not set
+# CONFIG_TAGGING_GID16 is not set
+CONFIG_TAGGING_ID24=y
+# CONFIG_TAGGING_INTERN is not set
+# CONFIG_TAG_NFSD is not set
+# CONFIG_VSERVER_PRIVACY is not set
+CONFIG_VSERVER_CONTEXTS=256
+CONFIG_VSERVER_WARN=y
+# CONFIG_VSERVER_DEBUG is not set
+CONFIG_VSERVER=y
+CONFIG_VSERVER_SECURITY=y
+
+#
+# Security options
+#
+CONFIG_SECURITY=y
+CONFIG_SECURITY_NETWORK=y
+CONFIG_SECURITY_NETWORK_XFRM=y
+CONFIG_SECURITY_CAPABILITIES=y
+# CONFIG_SECURITY_ROOTPLUG is not set
+
+#
+# Cryptographic options
+#
+CONFIG_CRYPTO=y
+CONFIG_CRYPTO_ALGAPI=y
+CONFIG_CRYPTO_BLKCIPHER=m
+CONFIG_CRYPTO_HASH=y
+CONFIG_CRYPTO_MANAGER=y
+CONFIG_CRYPTO_HMAC=y
+CONFIG_CRYPTO_XCBC=m
+CONFIG_CRYPTO_NULL=m
+CONFIG_CRYPTO_MD4=m
+CONFIG_CRYPTO_MD5=y
+CONFIG_CRYPTO_SHA1=y
+CONFIG_CRYPTO_SHA256=m
+CONFIG_CRYPTO_SHA512=m
+CONFIG_CRYPTO_WP512=m
+CONFIG_CRYPTO_TGR192=m
+CONFIG_CRYPTO_GF128MUL=m
+CONFIG_CRYPTO_ECB=m
+CONFIG_CRYPTO_CBC=m
+CONFIG_CRYPTO_PCBC=m
+CONFIG_CRYPTO_LRW=m
+# CONFIG_CRYPTO_CRYPTD is not set
+CONFIG_CRYPTO_DES=m
+CONFIG_CRYPTO_FCRYPT=m
+CONFIG_CRYPTO_BLOWFISH=m
+CONFIG_CRYPTO_TWOFISH=m
+CONFIG_CRYPTO_TWOFISH_COMMON=m
+CONFIG_CRYPTO_TWOFISH_586=m
+CONFIG_CRYPTO_SERPENT=m
+CONFIG_CRYPTO_AES=m
+CONFIG_CRYPTO_AES_586=m
+CONFIG_CRYPTO_CAST5=m
+CONFIG_CRYPTO_CAST6=m
+CONFIG_CRYPTO_TEA=m
+CONFIG_CRYPTO_ARC4=m
+CONFIG_CRYPTO_KHAZAD=m
+CONFIG_CRYPTO_ANUBIS=m
+CONFIG_CRYPTO_DEFLATE=m
+CONFIG_CRYPTO_MICHAEL_MIC=m
+CONFIG_CRYPTO_CRC32C=m
+CONFIG_CRYPTO_CAMELLIA=m
+CONFIG_CRYPTO_TEST=m
+
+#
+# Hardware crypto devices
+#
+# CONFIG_CRYPTO_DEV_PADLOCK is not set
+CONFIG_CRYPTO_DEV_GEODE=m
+
+#
+# Library routines
+#
+CONFIG_BITREVERSE=y
+CONFIG_CRC_CCITT=m
+CONFIG_CRC16=m
+CONFIG_CRC_ITU_T=m
+CONFIG_CRC32=y
+CONFIG_LIBCRC32C=m
+CONFIG_ZLIB_INFLATE=y
+CONFIG_ZLIB_DEFLATE=m
+CONFIG_TEXTSEARCH=y
+CONFIG_TEXTSEARCH_KMP=m
+CONFIG_TEXTSEARCH_BM=m
+CONFIG_TEXTSEARCH_FSM=m
+CONFIG_PLIST=y
+CONFIG_HAS_IOMEM=y
+CONFIG_HAS_IOPORT=y
+CONFIG_HAS_DMA=y
+CONFIG_GENERIC_HARDIRQS=y
+CONFIG_GENERIC_IRQ_PROBE=y
+CONFIG_GENERIC_PENDING_IRQ=y
+CONFIG_X86_SMP=y
+CONFIG_X86_HT=y
+CONFIG_X86_BIOS_REBOOT=y
+CONFIG_X86_TRAMPOLINE=y
+CONFIG_KTIME_SCALAR=y
diff --git a/kernel-2.6.22-i686-planetlab.config b/kernel-2.6.22-i686-planetlab.config
new file mode 100644 (file)
index 0000000..a51deba
--- /dev/null
@@ -0,0 +1,2178 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.22-prep
+# Fri Nov 16 15:52:52 2007
+#
+CONFIG_X86_32=y
+CONFIG_GENERIC_TIME=y
+CONFIG_CLOCKSOURCE_WATCHDOG=y
+CONFIG_GENERIC_CLOCKEVENTS=y
+CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y
+CONFIG_LOCKDEP_SUPPORT=y
+CONFIG_STACKTRACE_SUPPORT=y
+CONFIG_SEMAPHORE_SLEEPERS=y
+CONFIG_X86=y
+CONFIG_MMU=y
+CONFIG_ZONE_DMA=y
+CONFIG_QUICKLIST=y
+CONFIG_GENERIC_ISA_DMA=y
+CONFIG_GENERIC_IOMAP=y
+CONFIG_GENERIC_BUG=y
+CONFIG_GENERIC_HWEIGHT=y
+CONFIG_ARCH_MAY_HAVE_PC_FDC=y
+CONFIG_DMI=y
+CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
+
+#
+# Code maturity level options
+#
+CONFIG_EXPERIMENTAL=y
+CONFIG_LOCK_KERNEL=y
+CONFIG_INIT_ENV_ARG_LIMIT=32
+
+#
+# General setup
+#
+CONFIG_LOCALVERSION=""
+# CONFIG_LOCALVERSION_AUTO is not set
+CONFIG_SWAP=y
+CONFIG_SYSVIPC=y
+CONFIG_IPC_NS=y
+CONFIG_SYSVIPC_SYSCTL=y
+CONFIG_POSIX_MQUEUE=y
+CONFIG_BSD_PROCESS_ACCT=y
+# CONFIG_BSD_PROCESS_ACCT_V3 is not set
+CONFIG_TASKSTATS=y
+CONFIG_TASK_DELAY_ACCT=y
+CONFIG_TASK_XACCT=y
+CONFIG_TASK_IO_ACCOUNTING=y
+CONFIG_UTS_NS=y
+# CONFIG_AUDIT is not set
+# CONFIG_IKCONFIG is not set
+CONFIG_LOG_BUF_SHIFT=17
+CONFIG_OOM_PANIC=y
+CONFIG_CPUSETS=y
+CONFIG_SYSFS_DEPRECATED=y
+CONFIG_RELAY=y
+CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS_SOURCE=""
+CONFIG_CC_OPTIMIZE_FOR_SIZE=y
+CONFIG_SYSCTL=y
+# CONFIG_EMBEDDED is not set
+CONFIG_UID16=y
+CONFIG_SYSCTL_SYSCALL=y
+CONFIG_KALLSYMS=y
+CONFIG_KALLSYMS_ALL=y
+CONFIG_KALLSYMS_EXTRA_PASS=y
+CONFIG_HOTPLUG=y
+CONFIG_PRINTK=y
+CONFIG_BUG=y
+CONFIG_ELF_CORE=y
+CONFIG_BASE_FULL=y
+CONFIG_FUTEX=y
+CONFIG_ANON_INODES=y
+CONFIG_EPOLL=y
+CONFIG_SIGNALFD=y
+CONFIG_EVENTFD=y
+CONFIG_SHMEM=y
+CONFIG_VM_EVENT_COUNTERS=y
+CONFIG_SLAB=y
+# CONFIG_SLUB is not set
+# CONFIG_SLOB is not set
+CONFIG_RT_MUTEXES=y
+# CONFIG_TINY_SHMEM is not set
+CONFIG_BASE_SMALL=0
+
+#
+# Loadable module support
+#
+CONFIG_MODULES=y
+CONFIG_MODULE_UNLOAD=y
+# CONFIG_MODULE_FORCE_UNLOAD is not set
+CONFIG_MODVERSIONS=y
+CONFIG_MODULE_SRCVERSION_ALL=y
+CONFIG_KMOD=y
+CONFIG_STOP_MACHINE=y
+
+#
+# Block layer
+#
+CONFIG_BLOCK=y
+CONFIG_LBD=y
+CONFIG_BLK_DEV_IO_TRACE=y
+CONFIG_LSF=y
+
+#
+# IO Schedulers
+#
+CONFIG_IOSCHED_NOOP=y
+CONFIG_IOSCHED_AS=y
+CONFIG_IOSCHED_DEADLINE=y
+CONFIG_IOSCHED_CFQ=y
+# CONFIG_DEFAULT_AS is not set
+# CONFIG_DEFAULT_DEADLINE is not set
+CONFIG_DEFAULT_CFQ=y
+# CONFIG_DEFAULT_NOOP is not set
+CONFIG_DEFAULT_IOSCHED="cfq"
+
+#
+# Processor type and features
+#
+CONFIG_TICK_ONESHOT=y
+# CONFIG_NO_HZ is not set
+CONFIG_HIGH_RES_TIMERS=y
+CONFIG_SMP=y
+# CONFIG_X86_PC is not set
+# CONFIG_X86_ELAN is not set
+# CONFIG_X86_VOYAGER is not set
+# CONFIG_X86_NUMAQ is not set
+# CONFIG_X86_SUMMIT is not set
+# CONFIG_X86_BIGSMP is not set
+# CONFIG_X86_VISWS is not set
+CONFIG_X86_GENERICARCH=y
+# CONFIG_X86_ES7000 is not set
+# CONFIG_PARAVIRT is not set
+CONFIG_X86_CYCLONE_TIMER=y
+# CONFIG_M386 is not set
+# CONFIG_M486 is not set
+# CONFIG_M586 is not set
+# CONFIG_M586TSC is not set
+# CONFIG_M586MMX is not set
+CONFIG_M686=y
+# CONFIG_MPENTIUMII is not set
+# CONFIG_MPENTIUMIII is not set
+# CONFIG_MPENTIUMM is not set
+# CONFIG_MCORE2 is not set
+# CONFIG_MPENTIUM4 is not set
+# CONFIG_MK6 is not set
+# CONFIG_MK7 is not set
+# CONFIG_MK8 is not set
+# CONFIG_MCRUSOE is not set
+# CONFIG_MEFFICEON is not set
+# CONFIG_MWINCHIPC6 is not set
+# CONFIG_MWINCHIP2 is not set
+# CONFIG_MWINCHIP3D is not set
+# CONFIG_MGEODEGX1 is not set
+# CONFIG_MGEODE_LX is not set
+# CONFIG_MCYRIXIII is not set
+# CONFIG_MVIAC3_2 is not set
+# CONFIG_MVIAC7 is not set
+CONFIG_X86_GENERIC=y
+CONFIG_X86_CMPXCHG=y
+CONFIG_X86_L1_CACHE_SHIFT=7
+CONFIG_X86_XADD=y
+CONFIG_RWSEM_XCHGADD_ALGORITHM=y
+# CONFIG_ARCH_HAS_ILOG2_U32 is not set
+# CONFIG_ARCH_HAS_ILOG2_U64 is not set
+CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_X86_PPRO_FENCE=y
+CONFIG_X86_WP_WORKS_OK=y
+CONFIG_X86_INVLPG=y
+CONFIG_X86_BSWAP=y
+CONFIG_X86_POPAD_OK=y
+CONFIG_X86_GOOD_APIC=y
+CONFIG_X86_INTEL_USERCOPY=y
+CONFIG_X86_USE_PPRO_CHECKSUM=y
+CONFIG_X86_TSC=y
+CONFIG_X86_CMOV=y
+CONFIG_X86_MINIMUM_CPU_MODEL=4
+CONFIG_HPET_TIMER=y
+CONFIG_HPET_EMULATE_RTC=y
+CONFIG_NR_CPUS=32
+CONFIG_SCHED_SMT=y
+CONFIG_SCHED_MC=y
+CONFIG_PREEMPT_NONE=y
+# CONFIG_PREEMPT_VOLUNTARY is not set
+# CONFIG_PREEMPT is not set
+# CONFIG_PREEMPT_BKL is not set
+CONFIG_X86_LOCAL_APIC=y
+CONFIG_X86_IO_APIC=y
+CONFIG_X86_MCE=y
+# CONFIG_X86_MCE_NONFATAL is not set
+CONFIG_X86_MCE_P4THERMAL=y
+CONFIG_VM86=y
+CONFIG_TOSHIBA=m
+CONFIG_I8K=m
+# CONFIG_X86_REBOOTFIXUPS is not set
+CONFIG_MICROCODE=m
+CONFIG_MICROCODE_OLD_INTERFACE=y
+CONFIG_X86_MSR=m
+CONFIG_X86_CPUID=m
+
+#
+# Firmware Drivers
+#
+CONFIG_EDD=m
+CONFIG_EFI_VARS=y
+CONFIG_DELL_RBU=m
+CONFIG_DCDBAS=m
+# CONFIG_NOHIGHMEM is not set
+CONFIG_HIGHMEM4G=y
+# CONFIG_HIGHMEM64G is not set
+CONFIG_PAGE_OFFSET=0xC0000000
+CONFIG_HIGHMEM=y
+CONFIG_ARCH_POPULATES_NODE_MAP=y
+CONFIG_SELECT_MEMORY_MODEL=y
+CONFIG_FLATMEM_MANUAL=y
+# CONFIG_DISCONTIGMEM_MANUAL is not set
+# CONFIG_SPARSEMEM_MANUAL is not set
+CONFIG_FLATMEM=y
+CONFIG_FLAT_NODE_MEM_MAP=y
+# CONFIG_SPARSEMEM_STATIC is not set
+CONFIG_SPLIT_PTLOCK_CPUS=4
+CONFIG_RESOURCES_64BIT=y
+CONFIG_ZONE_DMA_FLAG=1
+CONFIG_NR_QUICK=1
+CONFIG_HIGHPTE=y
+# CONFIG_MATH_EMULATION is not set
+CONFIG_MTRR=y
+CONFIG_EFI=y
+# CONFIG_IRQBALANCE is not set
+CONFIG_BOOT_IOREMAP=y
+# CONFIG_SECCOMP is not set
+# CONFIG_HZ_100 is not set
+# CONFIG_HZ_250 is not set
+# CONFIG_HZ_300 is not set
+CONFIG_HZ_1000=y
+CONFIG_HZ=1000
+CONFIG_KEXEC=y
+# CONFIG_CRASH_DUMP is not set
+CONFIG_PHYSICAL_START=0x100000
+CONFIG_RELOCATABLE=y
+CONFIG_PHYSICAL_ALIGN=0x400000
+CONFIG_HOTPLUG_CPU=y
+# CONFIG_COMPAT_VDSO is not set
+CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
+
+#
+# Power management options (ACPI, APM)
+#
+CONFIG_PM=y
+CONFIG_PM_LEGACY=y
+CONFIG_PM_DEBUG=y
+# CONFIG_DISABLE_CONSOLE_SUSPEND is not set
+CONFIG_PM_TRACE=y
+# CONFIG_PM_SYSFS_DEPRECATED is not set
+CONFIG_SOFTWARE_SUSPEND=y
+CONFIG_PM_STD_PARTITION=""
+CONFIG_SUSPEND_SMP=y
+
+#
+# ACPI (Advanced Configuration and Power Interface) Support
+#
+CONFIG_ACPI=y
+# CONFIG_ACPI_SLEEP is not set
+CONFIG_ACPI_PROCFS=y
+# CONFIG_ACPI_AC is not set
+# CONFIG_ACPI_BATTERY is not set
+# CONFIG_ACPI_BUTTON is not set
+# CONFIG_ACPI_VIDEO is not set
+# CONFIG_ACPI_FAN is not set
+# CONFIG_ACPI_DOCK is not set
+# CONFIG_ACPI_PROCESSOR is not set
+# CONFIG_ACPI_ASUS is not set
+CONFIG_ACPI_TOSHIBA=m
+CONFIG_ACPI_BLACKLIST_YEAR=1999
+# CONFIG_ACPI_DEBUG is not set
+CONFIG_ACPI_EC=y
+CONFIG_ACPI_POWER=y
+CONFIG_ACPI_SYSTEM=y
+CONFIG_X86_PM_TIMER=y
+CONFIG_ACPI_CONTAINER=y
+CONFIG_ACPI_SBS=m
+# CONFIG_APM is not set
+
+#
+# CPU Frequency scaling
+#
+# CONFIG_CPU_FREQ is not set
+
+#
+# Bus options (PCI, PCMCIA, EISA, MCA, ISA)
+#
+CONFIG_PCI=y
+# CONFIG_PCI_GOBIOS is not set
+# CONFIG_PCI_GOMMCONFIG is not set
+# CONFIG_PCI_GODIRECT is not set
+CONFIG_PCI_GOANY=y
+CONFIG_PCI_BIOS=y
+CONFIG_PCI_DIRECT=y
+CONFIG_PCI_MMCONFIG=y
+CONFIG_PCIEPORTBUS=y
+CONFIG_PCIEAER=y
+CONFIG_ARCH_SUPPORTS_MSI=y
+CONFIG_PCI_MSI=y
+# CONFIG_PCI_DEBUG is not set
+CONFIG_HT_IRQ=y
+CONFIG_ISA_DMA_API=y
+CONFIG_ISA=y
+# CONFIG_EISA is not set
+# CONFIG_MCA is not set
+# CONFIG_SCx200 is not set
+CONFIG_K8_NB=y
+
+#
+# PCCARD (PCMCIA/CardBus) support
+#
+CONFIG_PCCARD=y
+# CONFIG_PCMCIA_DEBUG is not set
+CONFIG_PCMCIA=y
+CONFIG_PCMCIA_LOAD_CIS=y
+CONFIG_PCMCIA_IOCTL=y
+CONFIG_CARDBUS=y
+
+#
+# PC-card bridges
+#
+CONFIG_YENTA=y
+CONFIG_YENTA_O2=y
+CONFIG_YENTA_RICOH=y
+CONFIG_YENTA_TI=y
+CONFIG_YENTA_ENE_TUNE=y
+CONFIG_YENTA_TOSHIBA=y
+CONFIG_PD6729=m
+CONFIG_I82092=m
+CONFIG_I82365=m
+# CONFIG_TCIC is not set
+CONFIG_PCMCIA_PROBE=y
+CONFIG_PCCARD_NONSTATIC=y
+# CONFIG_HOTPLUG_PCI is not set
+
+#
+# Executable file formats
+#
+CONFIG_BINFMT_ELF=y
+# CONFIG_BINFMT_AOUT is not set
+CONFIG_BINFMT_MISC=y
+
+#
+# Networking
+#
+CONFIG_NET=y
+
+#
+# Networking options
+#
+CONFIG_PACKET=y
+CONFIG_PACKET_MMAP=y
+CONFIG_UNIX=y
+CONFIG_XFRM=y
+CONFIG_XFRM_USER=y
+CONFIG_XFRM_SUB_POLICY=y
+CONFIG_XFRM_MIGRATE=y
+CONFIG_NET_KEY=m
+CONFIG_NET_KEY_MIGRATE=y
+CONFIG_INET=y
+CONFIG_IP_MULTICAST=y
+CONFIG_IP_ADVANCED_ROUTER=y
+CONFIG_ASK_IP_FIB_HASH=y
+# CONFIG_IP_FIB_TRIE is not set
+CONFIG_IP_FIB_HASH=y
+CONFIG_IP_MULTIPLE_TABLES=y
+CONFIG_IP_ROUTE_MULTIPATH=y
+# CONFIG_IP_ROUTE_MULTIPATH_CACHED is not set
+CONFIG_IP_ROUTE_VERBOSE=y
+# CONFIG_IP_PNP is not set
+CONFIG_NET_IPIP=m
+CONFIG_NET_IPGRE=m
+CONFIG_NET_IPGRE_BROADCAST=y
+CONFIG_IP_MROUTE=y
+CONFIG_IP_PIMSM_V1=y
+CONFIG_IP_PIMSM_V2=y
+# CONFIG_ARPD is not set
+CONFIG_SYN_COOKIES=y
+CONFIG_INET_AH=m
+CONFIG_INET_ESP=m
+CONFIG_INET_IPCOMP=m
+CONFIG_INET_XFRM_TUNNEL=m
+CONFIG_INET_TUNNEL=m
+CONFIG_INET_XFRM_MODE_TRANSPORT=m
+CONFIG_INET_XFRM_MODE_TUNNEL=m
+CONFIG_INET_XFRM_MODE_BEET=m
+CONFIG_INET_DIAG=m
+CONFIG_INET_TCP_DIAG=m
+CONFIG_TCP_CONG_ADVANCED=y
+CONFIG_TCP_CONG_BIC=m
+CONFIG_TCP_CONG_CUBIC=y
+CONFIG_TCP_CONG_WESTWOOD=m
+CONFIG_TCP_CONG_HTCP=m
+CONFIG_TCP_CONG_HSTCP=m
+CONFIG_TCP_CONG_HYBLA=m
+CONFIG_TCP_CONG_VEGAS=m
+CONFIG_TCP_CONG_SCALABLE=m
+CONFIG_TCP_CONG_LP=m
+CONFIG_TCP_CONG_VENO=m
+CONFIG_TCP_CONG_YEAH=m
+CONFIG_TCP_CONG_ILLINOIS=m
+# CONFIG_DEFAULT_BIC is not set
+CONFIG_DEFAULT_CUBIC=y
+# CONFIG_DEFAULT_HTCP is not set
+# CONFIG_DEFAULT_VEGAS is not set
+# CONFIG_DEFAULT_WESTWOOD is not set
+# CONFIG_DEFAULT_RENO is not set
+CONFIG_DEFAULT_TCP_CONG="cubic"
+CONFIG_TCP_MD5SIG=y
+# CONFIG_IP_VS is not set
+CONFIG_ICMP_IPOD=y
+CONFIG_IPV6=y
+CONFIG_IPV6_PRIVACY=y
+CONFIG_IPV6_ROUTER_PREF=y
+CONFIG_IPV6_ROUTE_INFO=y
+CONFIG_IPV6_OPTIMISTIC_DAD=y
+CONFIG_INET6_AH=m
+CONFIG_INET6_ESP=m
+CONFIG_INET6_IPCOMP=m
+CONFIG_IPV6_MIP6=y
+CONFIG_INET6_XFRM_TUNNEL=m
+CONFIG_INET6_TUNNEL=m
+CONFIG_INET6_XFRM_MODE_TRANSPORT=m
+CONFIG_INET6_XFRM_MODE_TUNNEL=m
+CONFIG_INET6_XFRM_MODE_BEET=m
+CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION=m
+CONFIG_IPV6_SIT=m
+CONFIG_IPV6_TUNNEL=m
+CONFIG_IPV6_MULTIPLE_TABLES=y
+CONFIG_IPV6_SUBTREES=y
+CONFIG_NETLABEL=y
+CONFIG_NETWORK_SECMARK=y
+CONFIG_NETFILTER=y
+# CONFIG_NETFILTER_DEBUG is not set
+CONFIG_BRIDGE_NETFILTER=y
+
+#
+# Core Netfilter Configuration
+#
+CONFIG_NETFILTER_NETLINK=m
+CONFIG_NETFILTER_NETLINK_QUEUE=m
+CONFIG_NETFILTER_NETLINK_LOG=m
+CONFIG_NF_CONNTRACK_ENABLED=m
+CONFIG_NF_CONNTRACK=m
+CONFIG_NF_CT_ACCT=y
+CONFIG_NF_CONNTRACK_MARK=y
+CONFIG_NF_CONNTRACK_SECMARK=y
+CONFIG_NF_CONNTRACK_EVENTS=y
+CONFIG_NF_CT_PROTO_GRE=m
+CONFIG_NF_CT_PROTO_SCTP=m
+CONFIG_NF_CONNTRACK_AMANDA=m
+CONFIG_NF_CONNTRACK_FTP=m
+CONFIG_NF_CONNTRACK_H323=m
+CONFIG_NF_CONNTRACK_IRC=m
+CONFIG_NF_CONNTRACK_NETBIOS_NS=m
+CONFIG_NF_CONNTRACK_PPTP=m
+CONFIG_NF_CONNTRACK_SANE=m
+CONFIG_NF_CONNTRACK_SIP=m
+CONFIG_NF_CONNTRACK_TFTP=m
+CONFIG_NF_CT_NETLINK=m
+CONFIG_NETFILTER_XTABLES=m
+CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m
+CONFIG_NETFILTER_XT_TARGET_CONNMARK=m
+CONFIG_NETFILTER_XT_TARGET_DSCP=m
+CONFIG_NETFILTER_XT_TARGET_MARK=m
+CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m
+CONFIG_NETFILTER_XT_TARGET_NFLOG=m
+CONFIG_NETFILTER_XT_TARGET_NOTRACK=m
+CONFIG_NETFILTER_XT_TARGET_SECMARK=m
+CONFIG_NETFILTER_XT_TARGET_CONNSECMARK=m
+CONFIG_NETFILTER_XT_TARGET_TCPMSS=m
+CONFIG_NETFILTER_XT_TARGET_SETXID=m
+CONFIG_NETFILTER_XT_MATCH_COMMENT=m
+CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m
+CONFIG_NETFILTER_XT_MATCH_CONNMARK=m
+CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m
+CONFIG_NETFILTER_XT_MATCH_DCCP=m
+CONFIG_NETFILTER_XT_MATCH_DSCP=m
+CONFIG_NETFILTER_XT_MATCH_ESP=m
+CONFIG_NETFILTER_XT_MATCH_HELPER=m
+CONFIG_NETFILTER_XT_MATCH_LENGTH=m
+CONFIG_NETFILTER_XT_MATCH_LIMIT=m
+CONFIG_NETFILTER_XT_MATCH_MAC=m
+CONFIG_NETFILTER_XT_MATCH_MARK=m
+CONFIG_NETFILTER_XT_MATCH_POLICY=m
+CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m
+CONFIG_NETFILTER_XT_MATCH_PHYSDEV=m
+CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m
+CONFIG_NETFILTER_XT_MATCH_QUOTA=m
+CONFIG_NETFILTER_XT_MATCH_REALM=m
+CONFIG_NETFILTER_XT_MATCH_SCTP=m
+CONFIG_NETFILTER_XT_MATCH_STATE=m
+CONFIG_NETFILTER_XT_MATCH_STATISTIC=m
+CONFIG_NETFILTER_XT_MATCH_STRING=m
+CONFIG_NETFILTER_XT_MATCH_TCPMSS=m
+CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m
+
+#
+# IP: Netfilter Configuration
+#
+CONFIG_NF_CONNTRACK_IPV4=m
+# CONFIG_NF_CONNTRACK_PROC_COMPAT is not set
+CONFIG_IP_NF_QUEUE=m
+CONFIG_IP_NF_IPTABLES=m
+CONFIG_IP_NF_MATCH_IPRANGE=m
+CONFIG_IP_NF_MATCH_TOS=m
+CONFIG_IP_NF_MATCH_RECENT=m
+CONFIG_IP_NF_MATCH_ECN=m
+CONFIG_IP_NF_MATCH_AH=m
+CONFIG_IP_NF_MATCH_TTL=m
+CONFIG_IP_NF_MATCH_OWNER=m
+CONFIG_IP_NF_MATCH_ADDRTYPE=m
+CONFIG_IP_NF_FILTER=m
+CONFIG_IP_NF_TARGET_REJECT=m
+CONFIG_IP_NF_TARGET_LOG=m
+CONFIG_IP_NF_TARGET_ULOG=m
+CONFIG_NF_NAT=m
+CONFIG_NF_NAT_NEEDED=y
+CONFIG_IP_NF_TARGET_MASQUERADE=m
+CONFIG_IP_NF_TARGET_REDIRECT=m
+CONFIG_IP_NF_TARGET_NETMAP=m
+CONFIG_IP_NF_TARGET_SAME=m
+CONFIG_NF_NAT_SNMP_BASIC=m
+CONFIG_NF_NAT_PROTO_GRE=m
+CONFIG_NF_NAT_FTP=m
+CONFIG_NF_NAT_IRC=m
+CONFIG_NF_NAT_TFTP=m
+CONFIG_NF_NAT_AMANDA=m
+CONFIG_NF_NAT_PPTP=m
+CONFIG_NF_NAT_H323=m
+CONFIG_NF_NAT_SIP=m
+CONFIG_IP_NF_MANGLE=m
+CONFIG_IP_NF_TARGET_TOS=m
+CONFIG_IP_NF_TARGET_ECN=m
+CONFIG_IP_NF_TARGET_TTL=m
+CONFIG_IP_NF_TARGET_CLUSTERIP=m
+CONFIG_IP_NF_RAW=m
+CONFIG_IP_NF_ARPTABLES=m
+CONFIG_IP_NF_ARPFILTER=m
+CONFIG_IP_NF_ARP_MANGLE=m
+CONFIG_IP_NF_SET=m
+CONFIG_IP_NF_SET_MAX=256
+CONFIG_IP_NF_SET_HASHSIZE=1024
+CONFIG_IP_NF_SET_IPMAP=m
+CONFIG_IP_NF_SET_MACIPMAP=m
+CONFIG_IP_NF_SET_PORTMAP=m
+CONFIG_IP_NF_SET_IPHASH=m
+CONFIG_IP_NF_SET_NETHASH=m
+CONFIG_IP_NF_SET_IPPORTHASH=m
+CONFIG_IP_NF_SET_IPTREE=m
+CONFIG_IP_NF_SET_IPTREEMAP=m
+CONFIG_IP_NF_MATCH_SET=m
+CONFIG_IP_NF_TARGET_SET=m
+
+#
+# IPv6: Netfilter Configuration (EXPERIMENTAL)
+#
+CONFIG_NF_CONNTRACK_IPV6=m
+CONFIG_IP6_NF_QUEUE=m
+CONFIG_IP6_NF_IPTABLES=m
+CONFIG_IP6_NF_MATCH_RT=m
+CONFIG_IP6_NF_MATCH_OPTS=m
+CONFIG_IP6_NF_MATCH_FRAG=m
+CONFIG_IP6_NF_MATCH_HL=m
+CONFIG_IP6_NF_MATCH_OWNER=m
+CONFIG_IP6_NF_MATCH_IPV6HEADER=m
+CONFIG_IP6_NF_MATCH_AH=m
+CONFIG_IP6_NF_MATCH_MH=m
+CONFIG_IP6_NF_MATCH_EUI64=m
+CONFIG_IP6_NF_FILTER=m
+CONFIG_IP6_NF_TARGET_LOG=m
+CONFIG_IP6_NF_TARGET_REJECT=m
+CONFIG_IP6_NF_MANGLE=m
+CONFIG_IP6_NF_TARGET_HL=m
+CONFIG_IP6_NF_RAW=m
+
+#
+# Bridge: Netfilter Configuration
+#
+CONFIG_BRIDGE_NF_EBTABLES=m
+CONFIG_BRIDGE_EBT_BROUTE=m
+CONFIG_BRIDGE_EBT_T_FILTER=m
+CONFIG_BRIDGE_EBT_T_NAT=m
+CONFIG_BRIDGE_EBT_802_3=m
+CONFIG_BRIDGE_EBT_AMONG=m
+CONFIG_BRIDGE_EBT_ARP=m
+CONFIG_BRIDGE_EBT_IP=m
+CONFIG_BRIDGE_EBT_LIMIT=m
+CONFIG_BRIDGE_EBT_MARK=m
+CONFIG_BRIDGE_EBT_PKTTYPE=m
+CONFIG_BRIDGE_EBT_STP=m
+CONFIG_BRIDGE_EBT_VLAN=m
+CONFIG_BRIDGE_EBT_ARPREPLY=m
+CONFIG_BRIDGE_EBT_DNAT=m
+CONFIG_BRIDGE_EBT_MARK_T=m
+CONFIG_BRIDGE_EBT_REDIRECT=m
+CONFIG_BRIDGE_EBT_SNAT=m
+CONFIG_BRIDGE_EBT_LOG=m
+CONFIG_BRIDGE_EBT_ULOG=m
+# CONFIG_IP_DCCP is not set
+# CONFIG_IP_SCTP is not set
+# CONFIG_TIPC is not set
+# CONFIG_ATM is not set
+CONFIG_BRIDGE=m
+CONFIG_VLAN_8021Q=m
+# CONFIG_DECNET is not set
+CONFIG_LLC=y
+# CONFIG_LLC2 is not set
+# CONFIG_IPX is not set
+# CONFIG_ATALK is not set
+# CONFIG_X25 is not set
+# CONFIG_LAPB is not set
+# CONFIG_ECONET is not set
+# CONFIG_WAN_ROUTER is not set
+
+#
+# QoS and/or fair queueing
+#
+CONFIG_NET_SCHED=y
+CONFIG_NET_SCH_FIFO=y
+
+#
+# Queueing/Scheduling
+#
+CONFIG_NET_SCH_CBQ=m
+CONFIG_NET_SCH_HTB=m
+CONFIG_NET_SCH_HFSC=m
+CONFIG_NET_SCH_PRIO=m
+CONFIG_NET_SCH_RED=m
+CONFIG_NET_SCH_SFQ=m
+CONFIG_NET_SCH_TEQL=m
+CONFIG_NET_SCH_TBF=m
+CONFIG_NET_SCH_GRED=m
+CONFIG_NET_SCH_DSMARK=m
+CONFIG_NET_SCH_NETEM=m
+CONFIG_NET_SCH_INGRESS=m
+
+#
+# Classification
+#
+CONFIG_NET_CLS=y
+CONFIG_NET_CLS_BASIC=m
+CONFIG_NET_CLS_TCINDEX=m
+CONFIG_NET_CLS_ROUTE4=m
+CONFIG_NET_CLS_ROUTE=y
+CONFIG_NET_CLS_FW=m
+CONFIG_NET_CLS_U32=m
+CONFIG_CLS_U32_PERF=y
+CONFIG_CLS_U32_MARK=y
+CONFIG_NET_CLS_RSVP=m
+CONFIG_NET_CLS_RSVP6=m
+CONFIG_NET_EMATCH=y
+CONFIG_NET_EMATCH_STACK=32
+CONFIG_NET_EMATCH_CMP=m
+CONFIG_NET_EMATCH_NBYTE=m
+CONFIG_NET_EMATCH_U32=m
+CONFIG_NET_EMATCH_META=m
+CONFIG_NET_EMATCH_TEXT=m
+CONFIG_NET_CLS_ACT=y
+CONFIG_NET_ACT_POLICE=m
+CONFIG_NET_ACT_GACT=m
+CONFIG_GACT_PROB=y
+CONFIG_NET_ACT_MIRRED=m
+CONFIG_NET_ACT_IPT=m
+CONFIG_NET_ACT_PEDIT=m
+CONFIG_NET_ACT_SIMP=m
+CONFIG_NET_CLS_IND=y
+CONFIG_NET_ESTIMATOR=y
+
+#
+# Network testing
+#
+CONFIG_NET_PKTGEN=m
+# CONFIG_NET_TCPPROBE is not set
+# CONFIG_HAMRADIO is not set
+# CONFIG_IRDA is not set
+# CONFIG_BT is not set
+# CONFIG_AF_RXRPC is not set
+CONFIG_FIB_RULES=y
+
+#
+# Wireless
+#
+CONFIG_CFG80211=m
+CONFIG_WIRELESS_EXT=y
+CONFIG_MAC80211=m
+CONFIG_MAC80211_LEDS=y
+# CONFIG_MAC80211_DEBUGFS is not set
+# CONFIG_MAC80211_DEBUG is not set
+CONFIG_IEEE80211=m
+CONFIG_IEEE80211_DEBUG=y
+CONFIG_IEEE80211_CRYPT_WEP=m
+CONFIG_IEEE80211_CRYPT_CCMP=m
+CONFIG_IEEE80211_CRYPT_TKIP=m
+CONFIG_IEEE80211_SOFTMAC=m
+CONFIG_IEEE80211_SOFTMAC_DEBUG=y
+CONFIG_RFKILL=m
+CONFIG_RFKILL_INPUT=m
+
+#
+# Device Drivers
+#
+
+#
+# Generic Driver Options
+#
+CONFIG_STANDALONE=y
+CONFIG_PREVENT_FIRMWARE_BUILD=y
+CONFIG_FW_LOADER=y
+# CONFIG_DEBUG_DRIVER is not set
+CONFIG_DEBUG_DEVRES=y
+# CONFIG_SYS_HYPERVISOR is not set
+
+#
+# Connector - unified userspace <-> kernelspace linker
+#
+CONFIG_CONNECTOR=y
+CONFIG_PROC_EVENTS=y
+# CONFIG_MTD is not set
+
+#
+# Parallel port support
+#
+# CONFIG_PARPORT is not set
+
+#
+# Plug and Play support
+#
+CONFIG_PNP=y
+# CONFIG_PNP_DEBUG is not set
+
+#
+# Protocols
+#
+CONFIG_ISAPNP=y
+# CONFIG_PNPBIOS is not set
+CONFIG_PNPACPI=y
+
+#
+# Block devices
+#
+CONFIG_BLK_DEV_FD=m
+# CONFIG_BLK_DEV_XD is not set
+CONFIG_BLK_CPQ_DA=m
+CONFIG_BLK_CPQ_CISS_DA=m
+CONFIG_CISS_SCSI_TAPE=y
+CONFIG_BLK_DEV_DAC960=m
+CONFIG_BLK_DEV_UMEM=m
+# CONFIG_BLK_DEV_COW_COMMON is not set
+CONFIG_BLK_DEV_LOOP=m
+CONFIG_BLK_DEV_CRYPTOLOOP=m
+# CONFIG_BLK_DEV_VROOT is not set
+CONFIG_BLK_DEV_NBD=m
+CONFIG_BLK_DEV_SX8=m
+# CONFIG_BLK_DEV_UB is not set
+CONFIG_BLK_DEV_RAM=y
+CONFIG_BLK_DEV_RAM_COUNT=16
+CONFIG_BLK_DEV_RAM_SIZE=16384
+CONFIG_BLK_DEV_RAM_BLOCKSIZE=4096
+CONFIG_CDROM_PKTCDVD=m
+CONFIG_CDROM_PKTCDVD_BUFFERS=8
+# CONFIG_CDROM_PKTCDVD_WCACHE is not set
+CONFIG_ATA_OVER_ETH=m
+
+#
+# Misc devices
+#
+# CONFIG_IBM_ASM is not set
+# CONFIG_PHANTOM is not set
+# CONFIG_SGI_IOC4 is not set
+CONFIG_TIFM_CORE=m
+CONFIG_TIFM_7XX1=m
+CONFIG_ASUS_LAPTOP=m
+CONFIG_MSI_LAPTOP=m
+CONFIG_SONY_LAPTOP=m
+CONFIG_SONYPI_COMPAT=y
+# CONFIG_THINKPAD_ACPI is not set
+# CONFIG_IDE is not set
+
+#
+# SCSI device support
+#
+CONFIG_RAID_ATTRS=m
+CONFIG_SCSI=m
+CONFIG_SCSI_TGT=m
+CONFIG_SCSI_NETLINK=y
+CONFIG_SCSI_PROC_FS=y
+
+#
+# SCSI support type (disk, tape, CD-ROM)
+#
+CONFIG_BLK_DEV_SD=m
+CONFIG_CHR_DEV_ST=m
+CONFIG_CHR_DEV_OSST=m
+CONFIG_BLK_DEV_SR=m
+CONFIG_BLK_DEV_SR_VENDOR=y
+CONFIG_CHR_DEV_SG=m
+CONFIG_CHR_DEV_SCH=m
+
+#
+# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
+#
+CONFIG_SCSI_MULTI_LUN=y
+CONFIG_SCSI_CONSTANTS=y
+CONFIG_SCSI_LOGGING=y
+CONFIG_SCSI_SCAN_ASYNC=y
+CONFIG_SCSI_WAIT_SCAN=m
+
+#
+# SCSI Transports
+#
+CONFIG_SCSI_SPI_ATTRS=m
+CONFIG_SCSI_FC_ATTRS=m
+CONFIG_SCSI_ISCSI_ATTRS=m
+CONFIG_SCSI_SAS_ATTRS=m
+CONFIG_SCSI_SAS_LIBSAS=m
+# CONFIG_SCSI_SAS_LIBSAS_DEBUG is not set
+
+#
+# SCSI low-level drivers
+#
+CONFIG_ISCSI_TCP=m
+CONFIG_BLK_DEV_3W_XXXX_RAID=m
+CONFIG_SCSI_3W_9XXX=m
+# CONFIG_SCSI_7000FASST is not set
+CONFIG_SCSI_ACARD=m
+CONFIG_SCSI_AHA152X=m
+CONFIG_SCSI_AHA1542=m
+CONFIG_SCSI_AACRAID=m
+CONFIG_SCSI_AIC7XXX=m
+CONFIG_AIC7XXX_CMDS_PER_DEVICE=4
+CONFIG_AIC7XXX_RESET_DELAY_MS=15000
+# CONFIG_AIC7XXX_DEBUG_ENABLE is not set
+CONFIG_AIC7XXX_DEBUG_MASK=0
+# CONFIG_AIC7XXX_REG_PRETTY_PRINT is not set
+CONFIG_SCSI_AIC7XXX_OLD=m
+CONFIG_SCSI_AIC79XX=m
+CONFIG_AIC79XX_CMDS_PER_DEVICE=4
+CONFIG_AIC79XX_RESET_DELAY_MS=15000
+# CONFIG_AIC79XX_DEBUG_ENABLE is not set
+CONFIG_AIC79XX_DEBUG_MASK=0
+# CONFIG_AIC79XX_REG_PRETTY_PRINT is not set
+CONFIG_SCSI_AIC94XX=m
+# CONFIG_AIC94XX_DEBUG is not set
+# CONFIG_SCSI_DPT_I2O is not set
+# CONFIG_SCSI_ADVANSYS is not set
+# CONFIG_SCSI_IN2000 is not set
+CONFIG_SCSI_ARCMSR=m
+CONFIG_MEGARAID_NEWGEN=y
+CONFIG_MEGARAID_MM=m
+CONFIG_MEGARAID_MAILBOX=m
+CONFIG_MEGARAID_LEGACY=m
+CONFIG_MEGARAID_SAS=m
+CONFIG_SCSI_HPTIOP=m
+CONFIG_SCSI_BUSLOGIC=m
+# CONFIG_SCSI_OMIT_FLASHPOINT is not set
+# CONFIG_SCSI_DMX3191D is not set
+# CONFIG_SCSI_DTC3280 is not set
+# CONFIG_SCSI_EATA is not set
+# CONFIG_SCSI_FUTURE_DOMAIN is not set
+CONFIG_SCSI_GDTH=m
+# CONFIG_SCSI_GENERIC_NCR5380 is not set
+# CONFIG_SCSI_GENERIC_NCR5380_MMIO is not set
+CONFIG_SCSI_IPS=m
+CONFIG_SCSI_INITIO=m
+CONFIG_SCSI_INIA100=m
+# CONFIG_SCSI_NCR53C406A is not set
+CONFIG_SCSI_STEX=m
+CONFIG_SCSI_SYM53C8XX_2=m
+CONFIG_SCSI_SYM53C8XX_DMA_ADDRESSING_MODE=1
+CONFIG_SCSI_SYM53C8XX_DEFAULT_TAGS=16
+CONFIG_SCSI_SYM53C8XX_MAX_TAGS=64
+CONFIG_SCSI_SYM53C8XX_MMIO=y
+# CONFIG_SCSI_IPR is not set
+# CONFIG_SCSI_PAS16 is not set
+# CONFIG_SCSI_PSI240I is not set
+# CONFIG_SCSI_QLOGIC_FAS is not set
+CONFIG_SCSI_QLOGIC_1280=m
+CONFIG_SCSI_QLA_FC=m
+CONFIG_SCSI_QLA_ISCSI=m
+CONFIG_SCSI_LPFC=m
+# CONFIG_SCSI_SEAGATE is not set
+# CONFIG_SCSI_SYM53C416 is not set
+CONFIG_SCSI_DC395x=m
+CONFIG_SCSI_DC390T=m
+# CONFIG_SCSI_T128 is not set
+# CONFIG_SCSI_U14_34F is not set
+# CONFIG_SCSI_ULTRASTOR is not set
+# CONFIG_SCSI_NSP32 is not set
+# CONFIG_SCSI_DEBUG is not set
+CONFIG_SCSI_SRP=m
+
+#
+# PCMCIA SCSI adapter support
+#
+CONFIG_PCMCIA_AHA152X=m
+# CONFIG_PCMCIA_FDOMAIN is not set
+CONFIG_PCMCIA_NINJA_SCSI=m
+CONFIG_PCMCIA_QLOGIC=m
+CONFIG_PCMCIA_SYM53C500=m
+CONFIG_ATA=m
+# CONFIG_ATA_NONSTANDARD is not set
+CONFIG_ATA_ACPI=y
+CONFIG_SATA_AHCI=m
+CONFIG_SATA_SVW=m
+CONFIG_ATA_PIIX=m
+CONFIG_SATA_MV=m
+CONFIG_SATA_NV=m
+CONFIG_PDC_ADMA=m
+CONFIG_SATA_QSTOR=m
+CONFIG_SATA_PROMISE=m
+CONFIG_SATA_SX4=m
+CONFIG_SATA_SIL=m
+CONFIG_SATA_SIL24=m
+CONFIG_SATA_SIS=m
+CONFIG_SATA_ULI=m
+CONFIG_SATA_VIA=m
+CONFIG_SATA_VITESSE=m
+CONFIG_SATA_INIC162X=m
+CONFIG_PATA_ALI=m
+CONFIG_PATA_AMD=m
+CONFIG_PATA_ARTOP=m
+CONFIG_PATA_ATIIXP=m
+CONFIG_PATA_CMD640_PCI=m
+CONFIG_PATA_CMD64X=m
+CONFIG_PATA_CS5520=m
+CONFIG_PATA_CS5530=m
+CONFIG_PATA_CS5535=m
+CONFIG_PATA_CYPRESS=m
+CONFIG_PATA_EFAR=m
+CONFIG_ATA_GENERIC=m
+CONFIG_PATA_HPT366=m
+CONFIG_PATA_HPT37X=m
+CONFIG_PATA_HPT3X2N=m
+CONFIG_PATA_HPT3X3=m
+CONFIG_PATA_ISAPNP=m
+CONFIG_PATA_IT821X=m
+CONFIG_PATA_IT8213=m
+CONFIG_PATA_JMICRON=m
+# CONFIG_PATA_LEGACY is not set
+CONFIG_PATA_TRIFLEX=m
+CONFIG_PATA_MARVELL=m
+CONFIG_PATA_MPIIX=m
+CONFIG_PATA_OLDPIIX=m
+CONFIG_PATA_NETCELL=m
+CONFIG_PATA_NS87410=m
+CONFIG_PATA_OPTI=m
+CONFIG_PATA_OPTIDMA=m
+CONFIG_PATA_PCMCIA=m
+CONFIG_PATA_PDC_OLD=m
+CONFIG_PATA_QDI=m
+# CONFIG_PATA_RADISYS is not set
+# CONFIG_PATA_RZ1000 is not set
+# CONFIG_PATA_SC1200 is not set
+CONFIG_PATA_SERVERWORKS=m
+CONFIG_PATA_PDC2027X=m
+CONFIG_PATA_SIL680=m
+CONFIG_PATA_SIS=m
+CONFIG_PATA_VIA=m
+CONFIG_PATA_WINBOND=m
+# CONFIG_PATA_WINBOND_VLB is not set
+
+#
+# Old CD-ROM drivers (not SCSI, not IDE)
+#
+# CONFIG_CD_NO_IDESCSI is not set
+
+#
+# Multi-device support (RAID and LVM)
+#
+CONFIG_MD=y
+CONFIG_BLK_DEV_MD=y
+CONFIG_MD_LINEAR=m
+CONFIG_MD_RAID0=m
+CONFIG_MD_RAID1=m
+CONFIG_MD_RAID10=m
+CONFIG_MD_RAID456=m
+CONFIG_MD_RAID5_RESHAPE=y
+CONFIG_MD_MULTIPATH=m
+CONFIG_MD_FAULTY=m
+CONFIG_BLK_DEV_DM=m
+CONFIG_DM_DEBUG=y
+CONFIG_DM_CRYPT=m
+CONFIG_DM_SNAPSHOT=m
+CONFIG_DM_MIRROR=m
+CONFIG_DM_ZERO=m
+CONFIG_DM_MULTIPATH=m
+CONFIG_DM_MULTIPATH_EMC=m
+# CONFIG_DM_DELAY is not set
+
+#
+# Fusion MPT device support
+#
+CONFIG_FUSION=y
+CONFIG_FUSION_SPI=m
+CONFIG_FUSION_FC=m
+CONFIG_FUSION_SAS=m
+CONFIG_FUSION_MAX_SGE=40
+CONFIG_FUSION_CTL=m
+CONFIG_FUSION_LAN=m
+
+#
+# IEEE 1394 (FireWire) support
+#
+CONFIG_FIREWIRE=m
+CONFIG_FIREWIRE_OHCI=m
+CONFIG_FIREWIRE_SBP2=m
+# CONFIG_IEEE1394 is not set
+
+#
+# I2O device support
+#
+# CONFIG_I2O is not set
+CONFIG_MACINTOSH_DRIVERS=y
+CONFIG_MAC_EMUMOUSEBTN=y
+
+#
+# Network device support
+#
+CONFIG_NETDEVICES=y
+CONFIG_IFB=m
+CONFIG_DUMMY=m
+CONFIG_BONDING=m
+CONFIG_EQUALIZER=m
+CONFIG_TUN=m
+CONFIG_NET_SB1000=m
+# CONFIG_ARCNET is not set
+CONFIG_PHYLIB=m
+
+#
+# MII PHY device drivers
+#
+CONFIG_MARVELL_PHY=m
+CONFIG_DAVICOM_PHY=m
+CONFIG_QSEMI_PHY=m
+CONFIG_LXT_PHY=m
+CONFIG_CICADA_PHY=m
+CONFIG_VITESSE_PHY=m
+CONFIG_SMSC_PHY=m
+CONFIG_BROADCOM_PHY=m
+CONFIG_FIXED_PHY=m
+CONFIG_FIXED_MII_10_FDX=y
+CONFIG_FIXED_MII_100_FDX=y
+
+#
+# Ethernet (10 or 100Mbit)
+#
+CONFIG_NET_ETHERNET=y
+CONFIG_MII=m
+CONFIG_HAPPYMEAL=m
+CONFIG_SUNGEM=m
+CONFIG_CASSINI=m
+CONFIG_NET_VENDOR_3COM=y
+# CONFIG_EL1 is not set
+# CONFIG_EL2 is not set
+# CONFIG_ELPLUS is not set
+# CONFIG_EL16 is not set
+CONFIG_EL3=m
+# CONFIG_3C515 is not set
+CONFIG_VORTEX=m
+CONFIG_TYPHOON=m
+# CONFIG_LANCE is not set
+CONFIG_NET_VENDOR_SMC=y
+# CONFIG_WD80x3 is not set
+CONFIG_ULTRA=m
+# CONFIG_SMC9194 is not set
+# CONFIG_NET_VENDOR_RACAL is not set
+
+#
+# Tulip family network device support
+#
+CONFIG_NET_TULIP=y
+CONFIG_DE2104X=m
+CONFIG_TULIP=m
+# CONFIG_TULIP_MWI is not set
+CONFIG_TULIP_MMIO=y
+# CONFIG_TULIP_NAPI is not set
+CONFIG_DE4X5=m
+CONFIG_WINBOND_840=m
+CONFIG_DM9102=m
+CONFIG_ULI526X=m
+CONFIG_PCMCIA_XIRCOM=m
+# CONFIG_AT1700 is not set
+# CONFIG_DEPCA is not set
+# CONFIG_HP100 is not set
+CONFIG_NET_ISA=y
+# CONFIG_E2100 is not set
+CONFIG_EWRK3=m
+# CONFIG_EEXPRESS is not set
+# CONFIG_EEXPRESS_PRO is not set
+# CONFIG_HPLAN_PLUS is not set
+# CONFIG_HPLAN is not set
+# CONFIG_LP486E is not set
+# CONFIG_ETH16I is not set
+CONFIG_NE2000=m
+# CONFIG_ZNET is not set
+# CONFIG_SEEQ8005 is not set
+CONFIG_NET_PCI=y
+CONFIG_PCNET32=m
+CONFIG_PCNET32_NAPI=y
+CONFIG_AMD8111_ETH=m
+CONFIG_AMD8111E_NAPI=y
+CONFIG_ADAPTEC_STARFIRE=m
+CONFIG_ADAPTEC_STARFIRE_NAPI=y
+# CONFIG_AC3200 is not set
+# CONFIG_APRICOT is not set
+CONFIG_B44=m
+CONFIG_FORCEDETH=m
+CONFIG_FORCEDETH_NAPI=y
+# CONFIG_CS89x0 is not set
+# CONFIG_DGRS is not set
+# CONFIG_EEPRO100 is not set
+CONFIG_E100=m
+CONFIG_FEALNX=m
+CONFIG_NATSEMI=m
+CONFIG_NE2K_PCI=m
+CONFIG_8139CP=m
+CONFIG_8139TOO=m
+# CONFIG_8139TOO_PIO is not set
+# CONFIG_8139TOO_TUNE_TWISTER is not set
+CONFIG_8139TOO_8129=y
+# CONFIG_8139_OLD_RX_RESET is not set
+CONFIG_SIS900=m
+CONFIG_EPIC100=m
+CONFIG_SUNDANCE=m
+# CONFIG_SUNDANCE_MMIO is not set
+CONFIG_TLAN=m
+CONFIG_VIA_RHINE=m
+CONFIG_VIA_RHINE_MMIO=y
+CONFIG_VIA_RHINE_NAPI=y
+CONFIG_SC92031=m
+CONFIG_NETDEV_1000=y
+CONFIG_ACENIC=m
+# CONFIG_ACENIC_OMIT_TIGON_I is not set
+CONFIG_DL2K=m
+CONFIG_E1000=m
+CONFIG_E1000_NAPI=y
+# CONFIG_E1000_DISABLE_PACKET_SPLIT is not set
+CONFIG_NS83820=m
+CONFIG_HAMACHI=m
+CONFIG_YELLOWFIN=m
+CONFIG_R8169=m
+CONFIG_R8169_NAPI=y
+CONFIG_R8169_VLAN=y
+CONFIG_SIS190=m
+CONFIG_SKGE=m
+CONFIG_SKY2=m
+# CONFIG_SK98LIN is not set
+CONFIG_VIA_VELOCITY=m
+CONFIG_TIGON3=m
+CONFIG_BNX2=m
+CONFIG_QLA3XXX=m
+CONFIG_ATL1=m
+CONFIG_NETDEV_10000=y
+CONFIG_CHELSIO_T1=m
+CONFIG_CHELSIO_T1_1G=y
+CONFIG_CHELSIO_T1_NAPI=y
+CONFIG_CHELSIO_T3=m
+CONFIG_IXGB=m
+CONFIG_IXGB_NAPI=y
+CONFIG_S2IO=m
+CONFIG_S2IO_NAPI=y
+CONFIG_MYRI10GE=m
+CONFIG_NETXEN_NIC=m
+# CONFIG_MLX4_CORE is not set
+CONFIG_TR=y
+# CONFIG_IBMTR is not set
+CONFIG_IBMOL=m
+CONFIG_IBMLS=m
+CONFIG_3C359=m
+# CONFIG_TMS380TR is not set
+# CONFIG_SMCTR is not set
+
+#
+# Wireless LAN
+#
+CONFIG_WLAN_PRE80211=y
+# CONFIG_STRIP is not set
+# CONFIG_ARLAN is not set
+# CONFIG_WAVELAN is not set
+CONFIG_PCMCIA_WAVELAN=m
+CONFIG_PCMCIA_NETWAVE=m
+CONFIG_WLAN_80211=y
+# CONFIG_PCMCIA_RAYCS is not set
+# CONFIG_IPW2100 is not set
+# CONFIG_IPW2200 is not set
+CONFIG_LIBERTAS=m
+CONFIG_LIBERTAS_USB=m
+# CONFIG_LIBERTAS_DEBUG is not set
+CONFIG_AIRO=m
+CONFIG_HERMES=m
+CONFIG_PLX_HERMES=m
+CONFIG_TMD_HERMES=m
+CONFIG_NORTEL_HERMES=m
+CONFIG_PCI_HERMES=m
+CONFIG_ATMEL=m
+CONFIG_PCI_ATMEL=m
+CONFIG_PCMCIA_HERMES=m
+CONFIG_PCMCIA_SPECTRUM=m
+CONFIG_AIRO_CS=m
+CONFIG_PCMCIA_ATMEL=m
+CONFIG_PCMCIA_WL3501=m
+CONFIG_PRISM54=m
+CONFIG_USB_ZD1201=m
+CONFIG_HOSTAP=m
+CONFIG_HOSTAP_FIRMWARE=y
+CONFIG_HOSTAP_FIRMWARE_NVRAM=y
+CONFIG_HOSTAP_PLX=m
+CONFIG_HOSTAP_PCI=m
+CONFIG_HOSTAP_CS=m
+CONFIG_BCM43XX=m
+CONFIG_BCM43XX_DEBUG=y
+CONFIG_BCM43XX_DMA=y
+CONFIG_BCM43XX_PIO=y
+CONFIG_BCM43XX_DMA_AND_PIO_MODE=y
+# CONFIG_BCM43XX_DMA_MODE is not set
+# CONFIG_BCM43XX_PIO_MODE is not set
+CONFIG_ZD1211RW=m
+# CONFIG_ZD1211RW_DEBUG is not set
+
+#
+# USB Network Adapters
+#
+CONFIG_USB_CATC=m
+CONFIG_USB_KAWETH=m
+CONFIG_USB_PEGASUS=m
+CONFIG_USB_RTL8150=m
+CONFIG_USB_USBNET_MII=m
+CONFIG_USB_USBNET=m
+CONFIG_USB_NET_AX8817X=m
+CONFIG_USB_NET_CDCETHER=m
+CONFIG_USB_NET_DM9601=m
+CONFIG_USB_NET_GL620A=m
+CONFIG_USB_NET_NET1080=m
+CONFIG_USB_NET_PLUSB=m
+CONFIG_USB_NET_MCS7830=m
+CONFIG_USB_NET_RNDIS_HOST=m
+CONFIG_USB_NET_CDC_SUBSET=m
+CONFIG_USB_ALI_M5632=y
+CONFIG_USB_AN2720=y
+CONFIG_USB_BELKIN=y
+CONFIG_USB_ARMLINUX=y
+CONFIG_USB_EPSON2888=y
+CONFIG_USB_KC2190=y
+CONFIG_USB_NET_ZAURUS=m
+CONFIG_NET_PCMCIA=y
+CONFIG_PCMCIA_3C589=m
+CONFIG_PCMCIA_3C574=m
+CONFIG_PCMCIA_FMVJ18X=m
+CONFIG_PCMCIA_PCNET=m
+CONFIG_PCMCIA_NMCLAN=m
+CONFIG_PCMCIA_SMC91C92=m
+CONFIG_PCMCIA_XIRC2PS=m
+CONFIG_PCMCIA_AXNET=m
+CONFIG_PCMCIA_IBMTR=m
+# CONFIG_WAN is not set
+CONFIG_FDDI=y
+# CONFIG_DEFXX is not set
+CONFIG_SKFP=m
+# CONFIG_HIPPI is not set
+# CONFIG_PPP is not set
+# CONFIG_SLIP is not set
+CONFIG_NET_FC=y
+# CONFIG_SHAPER is not set
+CONFIG_NETCONSOLE=m
+CONFIG_NETPOLL=y
+CONFIG_NETPOLL_TRAP=y
+CONFIG_NET_POLL_CONTROLLER=y
+
+#
+# ISDN subsystem
+#
+# CONFIG_ISDN is not set
+
+#
+# Telephony Support
+#
+# CONFIG_PHONE is not set
+
+#
+# Input device support
+#
+CONFIG_INPUT=y
+CONFIG_INPUT_FF_MEMLESS=y
+CONFIG_INPUT_POLLDEV=m
+
+#
+# Userland interfaces
+#
+CONFIG_INPUT_MOUSEDEV=y
+# CONFIG_INPUT_MOUSEDEV_PSAUX is not set
+CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
+CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
+# CONFIG_INPUT_JOYDEV is not set
+# CONFIG_INPUT_TSDEV is not set
+CONFIG_INPUT_EVDEV=y
+# CONFIG_INPUT_EVBUG is not set
+
+#
+# Input Device Drivers
+#
+CONFIG_INPUT_KEYBOARD=y
+CONFIG_KEYBOARD_ATKBD=y
+# CONFIG_KEYBOARD_SUNKBD is not set
+# CONFIG_KEYBOARD_LKKBD is not set
+# CONFIG_KEYBOARD_XTKBD is not set
+# CONFIG_KEYBOARD_NEWTON is not set
+# CONFIG_KEYBOARD_STOWAWAY is not set
+CONFIG_INPUT_MOUSE=y
+CONFIG_MOUSE_PS2=y
+CONFIG_MOUSE_PS2_ALPS=y
+CONFIG_MOUSE_PS2_LOGIPS2PP=y
+CONFIG_MOUSE_PS2_SYNAPTICS=y
+CONFIG_MOUSE_PS2_LIFEBOOK=y
+CONFIG_MOUSE_PS2_TRACKPOINT=y
+# CONFIG_MOUSE_PS2_TOUCHKIT is not set
+CONFIG_MOUSE_SERIAL=m
+CONFIG_MOUSE_APPLETOUCH=m
+# CONFIG_MOUSE_INPORT is not set
+# CONFIG_MOUSE_LOGIBM is not set
+# CONFIG_MOUSE_PC110PAD is not set
+CONFIG_MOUSE_VSXXXAA=m
+# CONFIG_INPUT_JOYSTICK is not set
+# CONFIG_INPUT_TABLET is not set
+# CONFIG_INPUT_TOUCHSCREEN is not set
+# CONFIG_INPUT_MISC is not set
+
+#
+# Hardware I/O ports
+#
+CONFIG_SERIO=y
+CONFIG_SERIO_I8042=y
+CONFIG_SERIO_SERPORT=y
+# CONFIG_SERIO_CT82C710 is not set
+# CONFIG_SERIO_PCIPS2 is not set
+CONFIG_SERIO_LIBPS2=y
+CONFIG_SERIO_RAW=m
+CONFIG_GAMEPORT=m
+CONFIG_GAMEPORT_NS558=m
+CONFIG_GAMEPORT_L4=m
+CONFIG_GAMEPORT_EMU10K1=m
+CONFIG_GAMEPORT_FM801=m
+
+#
+# Character devices
+#
+CONFIG_VT=y
+CONFIG_VT_CONSOLE=y
+CONFIG_HW_CONSOLE=y
+CONFIG_VT_HW_CONSOLE_BINDING=y
+CONFIG_SERIAL_NONSTANDARD=y
+# CONFIG_COMPUTONE is not set
+CONFIG_ROCKETPORT=m
+CONFIG_CYCLADES=m
+# CONFIG_CYZ_INTR is not set
+# CONFIG_DIGIEPCA is not set
+# CONFIG_ESPSERIAL is not set
+# CONFIG_MOXA_INTELLIO is not set
+# CONFIG_MOXA_SMARTIO is not set
+# CONFIG_MOXA_SMARTIO_NEW is not set
+# CONFIG_ISI is not set
+CONFIG_SYNCLINK=m
+CONFIG_SYNCLINKMP=m
+CONFIG_SYNCLINK_GT=m
+CONFIG_N_HDLC=m
+# CONFIG_SPECIALIX is not set
+# CONFIG_SX is not set
+# CONFIG_RIO is not set
+# CONFIG_STALDRV is not set
+
+#
+# Serial drivers
+#
+CONFIG_SERIAL_8250=y
+CONFIG_SERIAL_8250_CONSOLE=y
+CONFIG_SERIAL_8250_PCI=y
+CONFIG_SERIAL_8250_PNP=y
+CONFIG_SERIAL_8250_CS=m
+CONFIG_SERIAL_8250_NR_UARTS=32
+CONFIG_SERIAL_8250_RUNTIME_UARTS=4
+CONFIG_SERIAL_8250_EXTENDED=y
+CONFIG_SERIAL_8250_MANY_PORTS=y
+# CONFIG_SERIAL_8250_FOURPORT is not set
+# CONFIG_SERIAL_8250_ACCENT is not set
+# CONFIG_SERIAL_8250_BOCA is not set
+# CONFIG_SERIAL_8250_EXAR_ST16C554 is not set
+# CONFIG_SERIAL_8250_HUB6 is not set
+CONFIG_SERIAL_8250_SHARE_IRQ=y
+CONFIG_SERIAL_8250_DETECT_IRQ=y
+CONFIG_SERIAL_8250_RSA=y
+
+#
+# Non-8250 serial port support
+#
+CONFIG_SERIAL_CORE=y
+CONFIG_SERIAL_CORE_CONSOLE=y
+CONFIG_SERIAL_JSM=m
+CONFIG_UNIX98_PTYS=y
+# CONFIG_LEGACY_PTYS is not set
+
+#
+# IPMI
+#
+CONFIG_IPMI_HANDLER=m
+# CONFIG_IPMI_PANIC_EVENT is not set
+CONFIG_IPMI_DEVICE_INTERFACE=m
+CONFIG_IPMI_SI=m
+CONFIG_IPMI_WATCHDOG=m
+CONFIG_IPMI_POWEROFF=m
+# CONFIG_WATCHDOG is not set
+CONFIG_HW_RANDOM=y
+CONFIG_HW_RANDOM_INTEL=m
+CONFIG_HW_RANDOM_AMD=m
+CONFIG_HW_RANDOM_GEODE=m
+CONFIG_HW_RANDOM_VIA=m
+# CONFIG_NVRAM is not set
+CONFIG_RTC=y
+CONFIG_DTLK=m
+CONFIG_R3964=m
+# CONFIG_APPLICOM is not set
+# CONFIG_SONYPI is not set
+CONFIG_AGP=y
+CONFIG_AGP_ALI=y
+CONFIG_AGP_ATI=y
+CONFIG_AGP_AMD=y
+CONFIG_AGP_AMD64=y
+CONFIG_AGP_INTEL=y
+CONFIG_AGP_NVIDIA=y
+CONFIG_AGP_SIS=y
+CONFIG_AGP_SWORKS=y
+CONFIG_AGP_VIA=y
+CONFIG_AGP_EFFICEON=y
+CONFIG_DRM=m
+CONFIG_DRM_TDFX=m
+CONFIG_DRM_R128=m
+CONFIG_DRM_RADEON=m
+CONFIG_DRM_I810=m
+CONFIG_DRM_I830=m
+CONFIG_DRM_I915=m
+CONFIG_DRM_MGA=m
+CONFIG_DRM_SIS=m
+CONFIG_DRM_VIA=m
+CONFIG_DRM_SAVAGE=m
+
+#
+# PCMCIA character devices
+#
+# CONFIG_SYNCLINK_CS is not set
+CONFIG_CARDMAN_4000=m
+CONFIG_CARDMAN_4040=m
+CONFIG_MWAVE=m
+CONFIG_PC8736x_GPIO=m
+CONFIG_NSC_GPIO=m
+CONFIG_CS5535_GPIO=m
+# CONFIG_RAW_DRIVER is not set
+# CONFIG_HPET is not set
+CONFIG_HANGCHECK_TIMER=m
+
+#
+# TPM devices
+#
+CONFIG_TCG_TPM=m
+CONFIG_TCG_TIS=m
+CONFIG_TCG_NSC=m
+CONFIG_TCG_ATMEL=m
+# CONFIG_TCG_INFINEON is not set
+# CONFIG_TELCLOCK is not set
+CONFIG_DEVPORT=y
+CONFIG_I2C=m
+CONFIG_I2C_BOARDINFO=y
+CONFIG_I2C_CHARDEV=m
+
+#
+# I2C Algorithms
+#
+CONFIG_I2C_ALGOBIT=m
+CONFIG_I2C_ALGOPCF=m
+CONFIG_I2C_ALGOPCA=m
+
+#
+# I2C Hardware Bus support
+#
+# CONFIG_I2C_ALI1535 is not set
+# CONFIG_I2C_ALI1563 is not set
+# CONFIG_I2C_ALI15X3 is not set
+# CONFIG_I2C_AMD756 is not set
+# CONFIG_I2C_AMD8111 is not set
+# CONFIG_I2C_I801 is not set
+# CONFIG_I2C_I810 is not set
+# CONFIG_I2C_PIIX4 is not set
+CONFIG_I2C_NFORCE2=m
+# CONFIG_I2C_OCORES is not set
+CONFIG_I2C_PARPORT_LIGHT=m
+CONFIG_I2C_PROSAVAGE=m
+CONFIG_I2C_SAVAGE4=m
+CONFIG_I2C_SIMTEC=m
+# CONFIG_SCx200_ACB is not set
+# CONFIG_I2C_SIS5595 is not set
+# CONFIG_I2C_SIS630 is not set
+# CONFIG_I2C_SIS96X is not set
+CONFIG_I2C_STUB=m
+# CONFIG_I2C_TINY_USB is not set
+# CONFIG_I2C_VIA is not set
+# CONFIG_I2C_VIAPRO is not set
+CONFIG_I2C_VOODOO3=m
+CONFIG_I2C_PCA_ISA=m
+
+#
+# Miscellaneous I2C Chip support
+#
+CONFIG_SENSORS_DS1337=m
+CONFIG_SENSORS_DS1374=m
+CONFIG_SENSORS_EEPROM=m
+CONFIG_SENSORS_PCF8574=m
+CONFIG_SENSORS_PCA9539=m
+CONFIG_SENSORS_PCF8591=m
+CONFIG_SENSORS_MAX6875=m
+# CONFIG_I2C_DEBUG_CORE is not set
+# CONFIG_I2C_DEBUG_ALGO is not set
+# CONFIG_I2C_DEBUG_BUS is not set
+# CONFIG_I2C_DEBUG_CHIP is not set
+
+#
+# SPI support
+#
+# CONFIG_SPI is not set
+# CONFIG_SPI_MASTER is not set
+
+#
+# Dallas's 1-wire bus
+#
+# CONFIG_W1 is not set
+# CONFIG_HWMON is not set
+
+#
+# Multifunction device drivers
+#
+CONFIG_MFD_SM501=m
+
+#
+# Multimedia devices
+#
+# CONFIG_VIDEO_DEV is not set
+# CONFIG_DVB_CORE is not set
+# CONFIG_DAB is not set
+
+#
+# Graphics support
+#
+CONFIG_BACKLIGHT_LCD_SUPPORT=y
+CONFIG_BACKLIGHT_CLASS_DEVICE=y
+CONFIG_LCD_CLASS_DEVICE=m
+CONFIG_BACKLIGHT_PROGEAR=m
+
+#
+# Display device support
+#
+CONFIG_DISPLAY_SUPPORT=m
+
+#
+# Display hardware drivers
+#
+# CONFIG_VGASTATE is not set
+# CONFIG_FB is not set
+
+#
+# Console display driver support
+#
+CONFIG_VGA_CONSOLE=y
+CONFIG_VGACON_SOFT_SCROLLBACK=y
+CONFIG_VGACON_SOFT_SCROLLBACK_SIZE=64
+CONFIG_VIDEO_SELECT=y
+# CONFIG_MDA_CONSOLE is not set
+CONFIG_DUMMY_CONSOLE=y
+
+#
+# Sound
+#
+# CONFIG_SOUND is not set
+
+#
+# HID Devices
+#
+CONFIG_HID=y
+# CONFIG_HID_DEBUG is not set
+
+#
+# USB Input Devices
+#
+CONFIG_USB_HID=y
+# CONFIG_USB_HIDINPUT_POWERBOOK is not set
+CONFIG_HID_FF=y
+CONFIG_HID_PID=y
+CONFIG_LOGITECH_FF=y
+CONFIG_PANTHERLORD_FF=y
+CONFIG_THRUSTMASTER_FF=y
+CONFIG_ZEROPLUS_FF=y
+CONFIG_USB_HIDDEV=y
+
+#
+# USB support
+#
+CONFIG_USB_ARCH_HAS_HCD=y
+CONFIG_USB_ARCH_HAS_OHCI=y
+CONFIG_USB_ARCH_HAS_EHCI=y
+CONFIG_USB=y
+# CONFIG_USB_DEBUG is not set
+
+#
+# Miscellaneous USB options
+#
+CONFIG_USB_DEVICEFS=y
+CONFIG_USB_DEVICE_CLASS=y
+# CONFIG_USB_DYNAMIC_MINORS is not set
+CONFIG_USB_SUSPEND=y
+# CONFIG_USB_OTG is not set
+
+#
+# USB Host Controller Drivers
+#
+CONFIG_USB_EHCI_HCD=m
+CONFIG_USB_EHCI_SPLIT_ISO=y
+CONFIG_USB_EHCI_ROOT_HUB_TT=y
+CONFIG_USB_EHCI_TT_NEWSCHED=y
+# CONFIG_USB_EHCI_BIG_ENDIAN_MMIO is not set
+CONFIG_USB_ISP116X_HCD=m
+CONFIG_USB_OHCI_HCD=m
+# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set
+# CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set
+CONFIG_USB_OHCI_LITTLE_ENDIAN=y
+CONFIG_USB_UHCI_HCD=m
+CONFIG_USB_SL811_HCD=m
+CONFIG_USB_SL811_CS=m
+
+#
+# USB Device Class drivers
+#
+CONFIG_USB_ACM=m
+# CONFIG_USB_PRINTER is not set
+
+#
+# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
+#
+
+#
+# may also be needed; see USB_STORAGE Help for more information
+#
+CONFIG_USB_STORAGE=m
+# CONFIG_USB_STORAGE_DEBUG is not set
+CONFIG_USB_STORAGE_DATAFAB=y
+CONFIG_USB_STORAGE_FREECOM=y
+CONFIG_USB_STORAGE_DPCM=y
+CONFIG_USB_STORAGE_USBAT=y
+CONFIG_USB_STORAGE_SDDR09=y
+CONFIG_USB_STORAGE_SDDR55=y
+CONFIG_USB_STORAGE_JUMPSHOT=y
+CONFIG_USB_STORAGE_ALAUDA=y
+CONFIG_USB_STORAGE_KARMA=y
+# CONFIG_USB_LIBUSUAL is not set
+
+#
+# USB Imaging devices
+#
+# CONFIG_USB_MDC800 is not set
+# CONFIG_USB_MICROTEK is not set
+# CONFIG_USB_MON is not set
+
+#
+# USB port drivers
+#
+
+#
+# USB Serial Converter support
+#
+# CONFIG_USB_SERIAL is not set
+
+#
+# USB Miscellaneous drivers
+#
+# CONFIG_USB_EMI62 is not set
+# CONFIG_USB_EMI26 is not set
+# CONFIG_USB_ADUTUX is not set
+# CONFIG_USB_AUERSWALD is not set
+# CONFIG_USB_RIO500 is not set
+# CONFIG_USB_LEGOTOWER is not set
+# CONFIG_USB_LCD is not set
+# CONFIG_USB_BERRY_CHARGE is not set
+# CONFIG_USB_LED is not set
+# CONFIG_USB_CYPRESS_CY7C63 is not set
+# CONFIG_USB_CYTHERM is not set
+# CONFIG_USB_PHIDGET is not set
+# CONFIG_USB_IDMOUSE is not set
+# CONFIG_USB_FTDI_ELAN is not set
+# CONFIG_USB_APPLEDISPLAY is not set
+# CONFIG_USB_SISUSBVGA is not set
+# CONFIG_USB_LD is not set
+# CONFIG_USB_TRANCEVIBRATOR is not set
+# CONFIG_USB_IOWARRIOR is not set
+# CONFIG_USB_TEST is not set
+
+#
+# USB DSL modem support
+#
+
+#
+# USB Gadget Support
+#
+# CONFIG_USB_GADGET is not set
+# CONFIG_MMC is not set
+
+#
+# LED devices
+#
+CONFIG_NEW_LEDS=y
+CONFIG_LEDS_CLASS=y
+
+#
+# LED drivers
+#
+
+#
+# LED Triggers
+#
+CONFIG_LEDS_TRIGGERS=y
+CONFIG_LEDS_TRIGGER_TIMER=m
+CONFIG_LEDS_TRIGGER_HEARTBEAT=m
+
+#
+# InfiniBand support
+#
+# CONFIG_INFINIBAND is not set
+
+#
+# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
+#
+CONFIG_EDAC=y
+
+#
+# Reporting subsystems
+#
+# CONFIG_EDAC_DEBUG is not set
+CONFIG_EDAC_MM_EDAC=m
+CONFIG_EDAC_AMD76X=m
+CONFIG_EDAC_E7XXX=m
+CONFIG_EDAC_E752X=m
+CONFIG_EDAC_I82875P=m
+CONFIG_EDAC_I82860=m
+CONFIG_EDAC_R82600=m
+CONFIG_EDAC_POLL=y
+
+#
+# Real Time Clock
+#
+CONFIG_RTC_LIB=m
+CONFIG_RTC_CLASS=m
+
+#
+# RTC interfaces
+#
+CONFIG_RTC_INTF_SYSFS=y
+CONFIG_RTC_INTF_PROC=y
+CONFIG_RTC_INTF_DEV=y
+# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
+# CONFIG_RTC_DRV_TEST is not set
+
+#
+# I2C RTC drivers
+#
+CONFIG_RTC_DRV_DS1307=m
+CONFIG_RTC_DRV_DS1672=m
+CONFIG_RTC_DRV_MAX6900=m
+CONFIG_RTC_DRV_RS5C372=m
+CONFIG_RTC_DRV_ISL1208=m
+CONFIG_RTC_DRV_X1205=m
+CONFIG_RTC_DRV_PCF8563=m
+CONFIG_RTC_DRV_PCF8583=m
+
+#
+# SPI RTC drivers
+#
+
+#
+# Platform RTC drivers
+#
+# CONFIG_RTC_DRV_CMOS is not set
+CONFIG_RTC_DRV_DS1553=m
+CONFIG_RTC_DRV_DS1742=m
+# CONFIG_RTC_DRV_M48T86 is not set
+CONFIG_RTC_DRV_V3020=m
+
+#
+# on-CPU RTC drivers
+#
+
+#
+# DMA Engine support
+#
+CONFIG_DMA_ENGINE=y
+
+#
+# DMA Clients
+#
+CONFIG_NET_DMA=y
+
+#
+# DMA Devices
+#
+CONFIG_INTEL_IOATDMA=m
+
+#
+# Virtualization
+#
+CONFIG_KVM=m
+CONFIG_KVM_INTEL=m
+CONFIG_KVM_AMD=m
+
+#
+# File systems
+#
+CONFIG_EXT2_FS=m
+CONFIG_EXT2_FS_XATTR=y
+CONFIG_EXT2_FS_POSIX_ACL=y
+CONFIG_EXT2_FS_SECURITY=y
+CONFIG_EXT2_FS_XIP=y
+CONFIG_FS_XIP=y
+CONFIG_EXT3_FS=m
+CONFIG_EXT3_FS_XATTR=y
+CONFIG_EXT3_FS_POSIX_ACL=y
+CONFIG_EXT3_FS_SECURITY=y
+# CONFIG_EXT4DEV_FS is not set
+CONFIG_JBD=m
+# CONFIG_JBD_DEBUG is not set
+CONFIG_FS_MBCACHE=m
+# CONFIG_REISERFS_FS is not set
+# CONFIG_JFS_FS is not set
+CONFIG_FS_POSIX_ACL=y
+# CONFIG_XFS_FS is not set
+# CONFIG_GFS2_FS is not set
+# CONFIG_OCFS2_FS is not set
+# CONFIG_MINIX_FS is not set
+# CONFIG_ROMFS_FS is not set
+CONFIG_INOTIFY=y
+CONFIG_INOTIFY_USER=y
+CONFIG_QUOTA=y
+# CONFIG_QFMT_V1 is not set
+CONFIG_QFMT_V2=y
+CONFIG_QUOTACTL=y
+CONFIG_DNOTIFY=y
+# CONFIG_AUTOFS_FS is not set
+# CONFIG_AUTOFS4_FS is not set
+# CONFIG_FUSE_FS is not set
+CONFIG_GENERIC_ACL=y
+
+#
+# CD-ROM/DVD Filesystems
+#
+CONFIG_ISO9660_FS=y
+CONFIG_JOLIET=y
+CONFIG_ZISOFS=y
+CONFIG_UDF_FS=m
+CONFIG_UDF_NLS=y
+
+#
+# DOS/FAT/NT Filesystems
+#
+CONFIG_FAT_FS=m
+CONFIG_MSDOS_FS=m
+CONFIG_VFAT_FS=m
+CONFIG_FAT_DEFAULT_CODEPAGE=437
+CONFIG_FAT_DEFAULT_IOCHARSET="ascii"
+# CONFIG_NTFS_FS is not set
+
+#
+# Pseudo filesystems
+#
+CONFIG_PROC_FS=y
+CONFIG_PROC_KCORE=y
+CONFIG_PROC_SYSCTL=y
+CONFIG_SYSFS=y
+CONFIG_TMPFS=y
+CONFIG_TMPFS_POSIX_ACL=y
+CONFIG_HUGETLBFS=y
+CONFIG_HUGETLB_PAGE=y
+CONFIG_RAMFS=y
+CONFIG_CONFIGFS_FS=m
+
+#
+# Miscellaneous filesystems
+#
+# CONFIG_ADFS_FS is not set
+# CONFIG_AFFS_FS is not set
+# CONFIG_HFS_FS is not set
+# CONFIG_HFSPLUS_FS is not set
+# CONFIG_BEFS_FS is not set
+# CONFIG_BFS_FS is not set
+# CONFIG_EFS_FS is not set
+CONFIG_CRAMFS=y
+# CONFIG_VXFS_FS is not set
+# CONFIG_HPFS_FS is not set
+# CONFIG_QNX4FS_FS is not set
+# CONFIG_SYSV_FS is not set
+# CONFIG_UFS_FS is not set
+
+#
+# Network File Systems
+#
+CONFIG_NFS_FS=m
+CONFIG_NFS_V3=y
+CONFIG_NFS_V3_ACL=y
+CONFIG_NFS_V4=y
+CONFIG_NFS_DIRECTIO=y
+CONFIG_NFSD=m
+CONFIG_NFSD_V2_ACL=y
+CONFIG_NFSD_V3=y
+CONFIG_NFSD_V3_ACL=y
+CONFIG_NFSD_V4=y
+CONFIG_NFSD_TCP=y
+CONFIG_LOCKD=m
+CONFIG_LOCKD_V4=y
+CONFIG_EXPORTFS=m
+CONFIG_NFS_ACL_SUPPORT=m
+CONFIG_NFS_COMMON=y
+CONFIG_SUNRPC=m
+CONFIG_SUNRPC_GSS=m
+CONFIG_SUNRPC_BIND34=y
+CONFIG_RPCSEC_GSS_KRB5=m
+CONFIG_RPCSEC_GSS_SPKM3=m
+# CONFIG_SMB_FS is not set
+# CONFIG_CIFS is not set
+# CONFIG_NCP_FS is not set
+# CONFIG_CODA_FS is not set
+# CONFIG_AFS_FS is not set
+# CONFIG_9P_FS is not set
+
+#
+# Partition Types
+#
+CONFIG_PARTITION_ADVANCED=y
+# CONFIG_ACORN_PARTITION is not set
+# CONFIG_OSF_PARTITION is not set
+# CONFIG_AMIGA_PARTITION is not set
+# CONFIG_ATARI_PARTITION is not set
+# CONFIG_MAC_PARTITION is not set
+CONFIG_MSDOS_PARTITION=y
+# CONFIG_BSD_DISKLABEL is not set
+# CONFIG_MINIX_SUBPARTITION is not set
+# CONFIG_SOLARIS_X86_PARTITION is not set
+# CONFIG_UNIXWARE_DISKLABEL is not set
+# CONFIG_LDM_PARTITION is not set
+# CONFIG_SGI_PARTITION is not set
+# CONFIG_ULTRIX_PARTITION is not set
+# CONFIG_SUN_PARTITION is not set
+# CONFIG_KARMA_PARTITION is not set
+CONFIG_EFI_PARTITION=y
+# CONFIG_SYSV68_PARTITION is not set
+
+#
+# Native Language Support
+#
+CONFIG_NLS=y
+CONFIG_NLS_DEFAULT="utf8"
+CONFIG_NLS_CODEPAGE_437=y
+# CONFIG_NLS_CODEPAGE_737 is not set
+# CONFIG_NLS_CODEPAGE_775 is not set
+# CONFIG_NLS_CODEPAGE_850 is not set
+# CONFIG_NLS_CODEPAGE_852 is not set
+# CONFIG_NLS_CODEPAGE_855 is not set
+# CONFIG_NLS_CODEPAGE_857 is not set
+# CONFIG_NLS_CODEPAGE_860 is not set
+# CONFIG_NLS_CODEPAGE_861 is not set
+# CONFIG_NLS_CODEPAGE_862 is not set
+# CONFIG_NLS_CODEPAGE_863 is not set
+# CONFIG_NLS_CODEPAGE_864 is not set
+# CONFIG_NLS_CODEPAGE_865 is not set
+# CONFIG_NLS_CODEPAGE_866 is not set
+# CONFIG_NLS_CODEPAGE_869 is not set
+# CONFIG_NLS_CODEPAGE_936 is not set
+# CONFIG_NLS_CODEPAGE_950 is not set
+# CONFIG_NLS_CODEPAGE_932 is not set
+# CONFIG_NLS_CODEPAGE_949 is not set
+# CONFIG_NLS_CODEPAGE_874 is not set
+# CONFIG_NLS_ISO8859_8 is not set
+# CONFIG_NLS_CODEPAGE_1250 is not set
+# CONFIG_NLS_CODEPAGE_1251 is not set
+CONFIG_NLS_ASCII=y
+CONFIG_NLS_ISO8859_1=y
+# CONFIG_NLS_ISO8859_2 is not set
+# CONFIG_NLS_ISO8859_3 is not set
+# CONFIG_NLS_ISO8859_4 is not set
+# CONFIG_NLS_ISO8859_5 is not set
+# CONFIG_NLS_ISO8859_6 is not set
+# CONFIG_NLS_ISO8859_7 is not set
+# CONFIG_NLS_ISO8859_9 is not set
+# CONFIG_NLS_ISO8859_13 is not set
+# CONFIG_NLS_ISO8859_14 is not set
+# CONFIG_NLS_ISO8859_15 is not set
+# CONFIG_NLS_KOI8_R is not set
+# CONFIG_NLS_KOI8_U is not set
+CONFIG_NLS_UTF8=y
+
+#
+# Distributed Lock Manager
+#
+# CONFIG_DLM is not set
+
+#
+# Instrumentation Support
+#
+CONFIG_PROFILING=y
+CONFIG_OPROFILE=m
+CONFIG_KPROBES=y
+
+#
+# Kernel hacking
+#
+CONFIG_TRACE_IRQFLAGS_SUPPORT=y
+# CONFIG_PRINTK_TIME is not set
+CONFIG_ENABLE_MUST_CHECK=y
+CONFIG_MAGIC_SYSRQ=y
+# CONFIG_UNUSED_SYMBOLS is not set
+CONFIG_DEBUG_FS=y
+CONFIG_HEADERS_CHECK=y
+CONFIG_DEBUG_KERNEL=y
+# CONFIG_DEBUG_SHIRQ is not set
+CONFIG_DETECT_SOFTLOCKUP=y
+CONFIG_SCHEDSTATS=y
+CONFIG_TIMER_STATS=y
+# CONFIG_DEBUG_SLAB is not set
+# CONFIG_DEBUG_RT_MUTEXES is not set
+# CONFIG_RT_MUTEX_TESTER is not set
+# CONFIG_DEBUG_SPINLOCK is not set
+# CONFIG_DEBUG_MUTEXES is not set
+# CONFIG_DEBUG_LOCK_ALLOC is not set
+# CONFIG_PROVE_LOCKING is not set
+CONFIG_DEBUG_SPINLOCK_SLEEP=y
+# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
+# CONFIG_DEBUG_KOBJECT is not set
+# CONFIG_DEBUG_HIGHMEM is not set
+CONFIG_DEBUG_BUGVERBOSE=y
+CONFIG_DEBUG_INFO=y
+# CONFIG_DEBUG_VM is not set
+CONFIG_DEBUG_LIST=y
+# CONFIG_FRAME_POINTER is not set
+# CONFIG_FORCED_INLINING is not set
+# CONFIG_RCU_TORTURE_TEST is not set
+# CONFIG_LKDTM is not set
+# CONFIG_FAULT_INJECTION is not set
+CONFIG_EARLY_PRINTK=y
+CONFIG_DEBUG_STACKOVERFLOW=y
+CONFIG_DEBUG_STACK_USAGE=y
+
+#
+# Page alloc debug is incompatible with Software Suspend on i386
+#
+CONFIG_DEBUG_RODATA=y
+CONFIG_4KSTACKS=y
+CONFIG_X86_FIND_SMP_CONFIG=y
+CONFIG_X86_MPPARSE=y
+CONFIG_DOUBLEFAULT=y
+
+#
+# Linux VServer
+#
+CONFIG_VSERVER_FILESHARING=y
+CONFIG_VSERVER_AUTO_LBACK=y
+# CONFIG_VSERVER_AUTO_SINGLE is not set
+CONFIG_VSERVER_COWBL=y
+# CONFIG_VSERVER_VTIME is not set
+# CONFIG_VSERVER_DEVICE is not set
+# CONFIG_VSERVER_PROC_SECURE is not set
+CONFIG_VSERVER_HARDCPU=y
+CONFIG_VSERVER_IDLETIME=y
+# CONFIG_VSERVER_IDLELIMIT is not set
+# CONFIG_TAGGING_NONE is not set
+# CONFIG_TAGGING_UID16 is not set
+# CONFIG_TAGGING_GID16 is not set
+CONFIG_TAGGING_ID24=y
+# CONFIG_TAGGING_INTERN is not set
+# CONFIG_TAG_NFSD is not set
+# CONFIG_VSERVER_PRIVACY is not set
+CONFIG_VSERVER_CONTEXTS=256
+CONFIG_VSERVER_WARN=y
+# CONFIG_VSERVER_DEBUG is not set
+CONFIG_VSERVER=y
+CONFIG_VSERVER_SECURITY=y
+
+#
+# Security options
+#
+CONFIG_SECURITY=y
+CONFIG_SECURITY_NETWORK=y
+CONFIG_SECURITY_NETWORK_XFRM=y
+CONFIG_SECURITY_CAPABILITIES=y
+# CONFIG_SECURITY_ROOTPLUG is not set
+
+#
+# Cryptographic options
+#
+CONFIG_CRYPTO=y
+CONFIG_CRYPTO_ALGAPI=y
+CONFIG_CRYPTO_BLKCIPHER=m
+CONFIG_CRYPTO_HASH=y
+CONFIG_CRYPTO_MANAGER=y
+CONFIG_CRYPTO_HMAC=y
+CONFIG_CRYPTO_XCBC=m
+CONFIG_CRYPTO_NULL=m
+CONFIG_CRYPTO_MD4=m
+CONFIG_CRYPTO_MD5=y
+CONFIG_CRYPTO_SHA1=y
+CONFIG_CRYPTO_SHA256=m
+CONFIG_CRYPTO_SHA512=m
+CONFIG_CRYPTO_WP512=m
+CONFIG_CRYPTO_TGR192=m
+CONFIG_CRYPTO_GF128MUL=m
+CONFIG_CRYPTO_ECB=m
+CONFIG_CRYPTO_CBC=m
+CONFIG_CRYPTO_PCBC=m
+CONFIG_CRYPTO_LRW=m
+# CONFIG_CRYPTO_CRYPTD is not set
+CONFIG_CRYPTO_DES=m
+CONFIG_CRYPTO_FCRYPT=m
+CONFIG_CRYPTO_BLOWFISH=m
+CONFIG_CRYPTO_TWOFISH=m
+CONFIG_CRYPTO_TWOFISH_COMMON=m
+CONFIG_CRYPTO_TWOFISH_586=m
+CONFIG_CRYPTO_SERPENT=m
+CONFIG_CRYPTO_AES=m
+CONFIG_CRYPTO_AES_586=m
+CONFIG_CRYPTO_CAST5=m
+CONFIG_CRYPTO_CAST6=m
+CONFIG_CRYPTO_TEA=m
+CONFIG_CRYPTO_ARC4=m
+CONFIG_CRYPTO_KHAZAD=m
+CONFIG_CRYPTO_ANUBIS=m
+CONFIG_CRYPTO_DEFLATE=m
+CONFIG_CRYPTO_MICHAEL_MIC=m
+CONFIG_CRYPTO_CRC32C=m
+CONFIG_CRYPTO_CAMELLIA=m
+CONFIG_CRYPTO_TEST=m
+
+#
+# Hardware crypto devices
+#
+# CONFIG_CRYPTO_DEV_PADLOCK is not set
+CONFIG_CRYPTO_DEV_GEODE=m
+
+#
+# Library routines
+#
+CONFIG_BITREVERSE=y
+CONFIG_CRC_CCITT=m
+CONFIG_CRC16=m
+CONFIG_CRC_ITU_T=m
+CONFIG_CRC32=y
+CONFIG_LIBCRC32C=m
+CONFIG_ZLIB_INFLATE=y
+CONFIG_ZLIB_DEFLATE=m
+CONFIG_TEXTSEARCH=y
+CONFIG_TEXTSEARCH_KMP=m
+CONFIG_TEXTSEARCH_BM=m
+CONFIG_TEXTSEARCH_FSM=m
+CONFIG_PLIST=y
+CONFIG_HAS_IOMEM=y
+CONFIG_HAS_IOPORT=y
+CONFIG_HAS_DMA=y
+CONFIG_GENERIC_HARDIRQS=y
+CONFIG_GENERIC_IRQ_PROBE=y
+CONFIG_GENERIC_PENDING_IRQ=y
+CONFIG_X86_SMP=y
+CONFIG_X86_HT=y
+CONFIG_X86_BIOS_REBOOT=y
+CONFIG_X86_TRAMPOLINE=y
+CONFIG_KTIME_SCALAR=y
diff --git a/kernel-2.6.22-x86_64-planetlab.config b/kernel-2.6.22-x86_64-planetlab.config
new file mode 100644 (file)
index 0000000..3601629
--- /dev/null
@@ -0,0 +1,2002 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.22-prep
+# Fri Nov 16 16:02:45 2007
+#
+CONFIG_X86_64=y
+CONFIG_64BIT=y
+CONFIG_X86=y
+CONFIG_GENERIC_TIME=y
+CONFIG_GENERIC_TIME_VSYSCALL=y
+CONFIG_ZONE_DMA32=y
+CONFIG_LOCKDEP_SUPPORT=y
+CONFIG_STACKTRACE_SUPPORT=y
+CONFIG_SEMAPHORE_SLEEPERS=y
+CONFIG_MMU=y
+CONFIG_ZONE_DMA=y
+CONFIG_RWSEM_GENERIC_SPINLOCK=y
+CONFIG_GENERIC_HWEIGHT=y
+CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_X86_CMPXCHG=y
+CONFIG_EARLY_PRINTK=y
+CONFIG_GENERIC_ISA_DMA=y
+CONFIG_GENERIC_IOMAP=y
+CONFIG_ARCH_MAY_HAVE_PC_FDC=y
+CONFIG_ARCH_POPULATES_NODE_MAP=y
+CONFIG_DMI=y
+CONFIG_AUDIT_ARCH=y
+CONFIG_GENERIC_BUG=y
+# CONFIG_ARCH_HAS_ILOG2_U32 is not set
+# CONFIG_ARCH_HAS_ILOG2_U64 is not set
+CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
+
+#
+# Code maturity level options
+#
+CONFIG_EXPERIMENTAL=y
+CONFIG_LOCK_KERNEL=y
+CONFIG_INIT_ENV_ARG_LIMIT=32
+
+#
+# General setup
+#
+CONFIG_LOCALVERSION=""
+# CONFIG_LOCALVERSION_AUTO is not set
+CONFIG_SWAP=y
+CONFIG_SYSVIPC=y
+CONFIG_IPC_NS=y
+CONFIG_SYSVIPC_SYSCTL=y
+CONFIG_POSIX_MQUEUE=y
+CONFIG_BSD_PROCESS_ACCT=y
+# CONFIG_BSD_PROCESS_ACCT_V3 is not set
+CONFIG_TASKSTATS=y
+CONFIG_TASK_DELAY_ACCT=y
+CONFIG_TASK_XACCT=y
+CONFIG_TASK_IO_ACCOUNTING=y
+CONFIG_UTS_NS=y
+# CONFIG_AUDIT is not set
+# CONFIG_IKCONFIG is not set
+CONFIG_LOG_BUF_SHIFT=17
+CONFIG_OOM_PANIC=y
+CONFIG_CPUSETS=y
+CONFIG_SYSFS_DEPRECATED=y
+CONFIG_RELAY=y
+CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS_SOURCE=""
+CONFIG_CC_OPTIMIZE_FOR_SIZE=y
+CONFIG_SYSCTL=y
+# CONFIG_EMBEDDED is not set
+CONFIG_UID16=y
+CONFIG_SYSCTL_SYSCALL=y
+CONFIG_KALLSYMS=y
+CONFIG_KALLSYMS_ALL=y
+CONFIG_KALLSYMS_EXTRA_PASS=y
+CONFIG_HOTPLUG=y
+CONFIG_PRINTK=y
+CONFIG_BUG=y
+CONFIG_ELF_CORE=y
+CONFIG_BASE_FULL=y
+CONFIG_FUTEX=y
+CONFIG_ANON_INODES=y
+CONFIG_EPOLL=y
+CONFIG_SIGNALFD=y
+CONFIG_EVENTFD=y
+CONFIG_SHMEM=y
+CONFIG_VM_EVENT_COUNTERS=y
+CONFIG_SLAB=y
+# CONFIG_SLUB is not set
+# CONFIG_SLOB is not set
+CONFIG_RT_MUTEXES=y
+# CONFIG_TINY_SHMEM is not set
+CONFIG_BASE_SMALL=0
+
+#
+# Loadable module support
+#
+CONFIG_MODULES=y
+CONFIG_MODULE_UNLOAD=y
+# CONFIG_MODULE_FORCE_UNLOAD is not set
+CONFIG_MODVERSIONS=y
+CONFIG_MODULE_SRCVERSION_ALL=y
+CONFIG_KMOD=y
+CONFIG_STOP_MACHINE=y
+
+#
+# Block layer
+#
+CONFIG_BLOCK=y
+CONFIG_BLK_DEV_IO_TRACE=y
+
+#
+# IO Schedulers
+#
+CONFIG_IOSCHED_NOOP=y
+CONFIG_IOSCHED_AS=y
+CONFIG_IOSCHED_DEADLINE=y
+CONFIG_IOSCHED_CFQ=y
+# CONFIG_DEFAULT_AS is not set
+# CONFIG_DEFAULT_DEADLINE is not set
+CONFIG_DEFAULT_CFQ=y
+# CONFIG_DEFAULT_NOOP is not set
+CONFIG_DEFAULT_IOSCHED="cfq"
+
+#
+# Processor type and features
+#
+CONFIG_X86_PC=y
+# CONFIG_X86_VSMP is not set
+# CONFIG_MK8 is not set
+# CONFIG_MPSC is not set
+# CONFIG_MCORE2 is not set
+CONFIG_GENERIC_CPU=y
+CONFIG_X86_L1_CACHE_BYTES=128
+CONFIG_X86_L1_CACHE_SHIFT=7
+CONFIG_X86_INTERNODE_CACHE_BYTES=128
+CONFIG_X86_TSC=y
+CONFIG_X86_GOOD_APIC=y
+CONFIG_MICROCODE=m
+CONFIG_MICROCODE_OLD_INTERFACE=y
+CONFIG_X86_MSR=m
+CONFIG_X86_CPUID=m
+CONFIG_X86_HT=y
+CONFIG_X86_IO_APIC=y
+CONFIG_X86_LOCAL_APIC=y
+CONFIG_MTRR=y
+CONFIG_SMP=y
+CONFIG_SCHED_SMT=y
+CONFIG_SCHED_MC=y
+CONFIG_PREEMPT_NONE=y
+# CONFIG_PREEMPT_VOLUNTARY is not set
+# CONFIG_PREEMPT is not set
+# CONFIG_PREEMPT_BKL is not set
+# CONFIG_NUMA is not set
+CONFIG_ARCH_SPARSEMEM_ENABLE=y
+CONFIG_ARCH_FLATMEM_ENABLE=y
+CONFIG_SELECT_MEMORY_MODEL=y
+CONFIG_FLATMEM_MANUAL=y
+# CONFIG_DISCONTIGMEM_MANUAL is not set
+# CONFIG_SPARSEMEM_MANUAL is not set
+CONFIG_FLATMEM=y
+CONFIG_FLAT_NODE_MEM_MAP=y
+# CONFIG_SPARSEMEM_STATIC is not set
+CONFIG_SPLIT_PTLOCK_CPUS=4
+CONFIG_RESOURCES_64BIT=y
+CONFIG_ZONE_DMA_FLAG=1
+CONFIG_NR_CPUS=32
+CONFIG_HOTPLUG_CPU=y
+CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
+CONFIG_HPET_TIMER=y
+CONFIG_HPET_EMULATE_RTC=y
+CONFIG_IOMMU=y
+# CONFIG_CALGARY_IOMMU is not set
+CONFIG_SWIOTLB=y
+CONFIG_X86_MCE=y
+CONFIG_X86_MCE_INTEL=y
+CONFIG_X86_MCE_AMD=y
+CONFIG_KEXEC=y
+# CONFIG_CRASH_DUMP is not set
+CONFIG_RELOCATABLE=y
+CONFIG_PHYSICAL_START=0x200000
+# CONFIG_SECCOMP is not set
+# CONFIG_CC_STACKPROTECTOR is not set
+# CONFIG_HZ_100 is not set
+# CONFIG_HZ_250 is not set
+# CONFIG_HZ_300 is not set
+CONFIG_HZ_1000=y
+CONFIG_HZ=1000
+CONFIG_K8_NB=y
+CONFIG_GENERIC_HARDIRQS=y
+CONFIG_GENERIC_IRQ_PROBE=y
+CONFIG_ISA_DMA_API=y
+CONFIG_GENERIC_PENDING_IRQ=y
+
+#
+# Power management options
+#
+CONFIG_PM=y
+CONFIG_PM_LEGACY=y
+CONFIG_PM_DEBUG=y
+# CONFIG_DISABLE_CONSOLE_SUSPEND is not set
+# CONFIG_PM_SYSFS_DEPRECATED is not set
+CONFIG_SOFTWARE_SUSPEND=y
+CONFIG_PM_STD_PARTITION=""
+CONFIG_SUSPEND_SMP=y
+
+#
+# ACPI (Advanced Configuration and Power Interface) Support
+#
+CONFIG_ACPI=y
+# CONFIG_ACPI_SLEEP is not set
+CONFIG_ACPI_PROCFS=y
+# CONFIG_ACPI_AC is not set
+# CONFIG_ACPI_BATTERY is not set
+# CONFIG_ACPI_BUTTON is not set
+# CONFIG_ACPI_VIDEO is not set
+# CONFIG_ACPI_FAN is not set
+# CONFIG_ACPI_DOCK is not set
+# CONFIG_ACPI_PROCESSOR is not set
+# CONFIG_ACPI_ASUS is not set
+CONFIG_ACPI_TOSHIBA=m
+CONFIG_ACPI_BLACKLIST_YEAR=0
+# CONFIG_ACPI_DEBUG is not set
+CONFIG_ACPI_EC=y
+CONFIG_ACPI_POWER=y
+CONFIG_ACPI_SYSTEM=y
+CONFIG_X86_PM_TIMER=y
+CONFIG_ACPI_CONTAINER=y
+CONFIG_ACPI_SBS=m
+
+#
+# CPU Frequency scaling
+#
+# CONFIG_CPU_FREQ is not set
+
+#
+# Bus options (PCI etc.)
+#
+CONFIG_PCI=y
+CONFIG_PCI_DIRECT=y
+CONFIG_PCI_MMCONFIG=y
+CONFIG_PCIEPORTBUS=y
+CONFIG_PCIEAER=y
+CONFIG_ARCH_SUPPORTS_MSI=y
+CONFIG_PCI_MSI=y
+# CONFIG_PCI_DEBUG is not set
+CONFIG_HT_IRQ=y
+
+#
+# PCCARD (PCMCIA/CardBus) support
+#
+CONFIG_PCCARD=y
+# CONFIG_PCMCIA_DEBUG is not set
+CONFIG_PCMCIA=y
+CONFIG_PCMCIA_LOAD_CIS=y
+CONFIG_PCMCIA_IOCTL=y
+CONFIG_CARDBUS=y
+
+#
+# PC-card bridges
+#
+CONFIG_YENTA=y
+CONFIG_YENTA_O2=y
+CONFIG_YENTA_RICOH=y
+CONFIG_YENTA_TI=y
+CONFIG_YENTA_ENE_TUNE=y
+CONFIG_YENTA_TOSHIBA=y
+CONFIG_PD6729=m
+CONFIG_I82092=m
+CONFIG_PCCARD_NONSTATIC=y
+# CONFIG_HOTPLUG_PCI is not set
+
+#
+# Executable file formats / Emulations
+#
+CONFIG_BINFMT_ELF=y
+CONFIG_BINFMT_MISC=y
+CONFIG_IA32_EMULATION=y
+CONFIG_IA32_AOUT=m
+CONFIG_COMPAT=y
+CONFIG_SYSVIPC_COMPAT=y
+
+#
+# Networking
+#
+CONFIG_NET=y
+
+#
+# Networking options
+#
+CONFIG_PACKET=y
+CONFIG_PACKET_MMAP=y
+CONFIG_UNIX=y
+CONFIG_XFRM=y
+CONFIG_XFRM_USER=y
+CONFIG_XFRM_SUB_POLICY=y
+CONFIG_XFRM_MIGRATE=y
+CONFIG_NET_KEY=m
+CONFIG_NET_KEY_MIGRATE=y
+CONFIG_INET=y
+CONFIG_IP_MULTICAST=y
+CONFIG_IP_ADVANCED_ROUTER=y
+CONFIG_ASK_IP_FIB_HASH=y
+# CONFIG_IP_FIB_TRIE is not set
+CONFIG_IP_FIB_HASH=y
+CONFIG_IP_MULTIPLE_TABLES=y
+CONFIG_IP_ROUTE_MULTIPATH=y
+# CONFIG_IP_ROUTE_MULTIPATH_CACHED is not set
+CONFIG_IP_ROUTE_VERBOSE=y
+# CONFIG_IP_PNP is not set
+CONFIG_NET_IPIP=m
+CONFIG_NET_IPGRE=m
+CONFIG_NET_IPGRE_BROADCAST=y
+CONFIG_IP_MROUTE=y
+CONFIG_IP_PIMSM_V1=y
+CONFIG_IP_PIMSM_V2=y
+# CONFIG_ARPD is not set
+CONFIG_SYN_COOKIES=y
+CONFIG_INET_AH=m
+CONFIG_INET_ESP=m
+CONFIG_INET_IPCOMP=m
+CONFIG_INET_XFRM_TUNNEL=m
+CONFIG_INET_TUNNEL=m
+CONFIG_INET_XFRM_MODE_TRANSPORT=m
+CONFIG_INET_XFRM_MODE_TUNNEL=m
+CONFIG_INET_XFRM_MODE_BEET=m
+CONFIG_INET_DIAG=m
+CONFIG_INET_TCP_DIAG=m
+CONFIG_TCP_CONG_ADVANCED=y
+CONFIG_TCP_CONG_BIC=m
+CONFIG_TCP_CONG_CUBIC=y
+CONFIG_TCP_CONG_WESTWOOD=m
+CONFIG_TCP_CONG_HTCP=m
+CONFIG_TCP_CONG_HSTCP=m
+CONFIG_TCP_CONG_HYBLA=m
+CONFIG_TCP_CONG_VEGAS=m
+CONFIG_TCP_CONG_SCALABLE=m
+CONFIG_TCP_CONG_LP=m
+CONFIG_TCP_CONG_VENO=m
+CONFIG_TCP_CONG_YEAH=m
+CONFIG_TCP_CONG_ILLINOIS=m
+# CONFIG_DEFAULT_BIC is not set
+CONFIG_DEFAULT_CUBIC=y
+# CONFIG_DEFAULT_HTCP is not set
+# CONFIG_DEFAULT_VEGAS is not set
+# CONFIG_DEFAULT_WESTWOOD is not set
+# CONFIG_DEFAULT_RENO is not set
+CONFIG_DEFAULT_TCP_CONG="cubic"
+CONFIG_TCP_MD5SIG=y
+# CONFIG_IP_VS is not set
+CONFIG_ICMP_IPOD=y
+CONFIG_IPV6=y
+CONFIG_IPV6_PRIVACY=y
+CONFIG_IPV6_ROUTER_PREF=y
+CONFIG_IPV6_ROUTE_INFO=y
+CONFIG_IPV6_OPTIMISTIC_DAD=y
+CONFIG_INET6_AH=m
+CONFIG_INET6_ESP=m
+CONFIG_INET6_IPCOMP=m
+CONFIG_IPV6_MIP6=y
+CONFIG_INET6_XFRM_TUNNEL=m
+CONFIG_INET6_TUNNEL=m
+CONFIG_INET6_XFRM_MODE_TRANSPORT=m
+CONFIG_INET6_XFRM_MODE_TUNNEL=m
+CONFIG_INET6_XFRM_MODE_BEET=m
+CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION=m
+CONFIG_IPV6_SIT=m
+CONFIG_IPV6_TUNNEL=m
+CONFIG_IPV6_MULTIPLE_TABLES=y
+CONFIG_IPV6_SUBTREES=y
+CONFIG_NETLABEL=y
+CONFIG_NETWORK_SECMARK=y
+CONFIG_NETFILTER=y
+# CONFIG_NETFILTER_DEBUG is not set
+CONFIG_BRIDGE_NETFILTER=y
+
+#
+# Core Netfilter Configuration
+#
+CONFIG_NETFILTER_NETLINK=m
+CONFIG_NETFILTER_NETLINK_QUEUE=m
+CONFIG_NETFILTER_NETLINK_LOG=m
+CONFIG_NF_CONNTRACK_ENABLED=m
+CONFIG_NF_CONNTRACK=m
+CONFIG_NF_CT_ACCT=y
+CONFIG_NF_CONNTRACK_MARK=y
+CONFIG_NF_CONNTRACK_SECMARK=y
+CONFIG_NF_CONNTRACK_EVENTS=y
+CONFIG_NF_CT_PROTO_GRE=m
+CONFIG_NF_CT_PROTO_SCTP=m
+CONFIG_NF_CONNTRACK_AMANDA=m
+CONFIG_NF_CONNTRACK_FTP=m
+CONFIG_NF_CONNTRACK_H323=m
+CONFIG_NF_CONNTRACK_IRC=m
+CONFIG_NF_CONNTRACK_NETBIOS_NS=m
+CONFIG_NF_CONNTRACK_PPTP=m
+CONFIG_NF_CONNTRACK_SANE=m
+CONFIG_NF_CONNTRACK_SIP=m
+CONFIG_NF_CONNTRACK_TFTP=m
+CONFIG_NF_CT_NETLINK=m
+CONFIG_NETFILTER_XTABLES=m
+CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m
+CONFIG_NETFILTER_XT_TARGET_CONNMARK=m
+CONFIG_NETFILTER_XT_TARGET_DSCP=m
+CONFIG_NETFILTER_XT_TARGET_MARK=m
+CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m
+CONFIG_NETFILTER_XT_TARGET_NFLOG=m
+CONFIG_NETFILTER_XT_TARGET_NOTRACK=m
+CONFIG_NETFILTER_XT_TARGET_SECMARK=m
+CONFIG_NETFILTER_XT_TARGET_CONNSECMARK=m
+CONFIG_NETFILTER_XT_TARGET_TCPMSS=m
+CONFIG_NETFILTER_XT_TARGET_SETXID=m
+CONFIG_NETFILTER_XT_MATCH_COMMENT=m
+CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m
+CONFIG_NETFILTER_XT_MATCH_CONNMARK=m
+CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m
+CONFIG_NETFILTER_XT_MATCH_DCCP=m
+CONFIG_NETFILTER_XT_MATCH_DSCP=m
+CONFIG_NETFILTER_XT_MATCH_ESP=m
+CONFIG_NETFILTER_XT_MATCH_HELPER=m
+CONFIG_NETFILTER_XT_MATCH_LENGTH=m
+CONFIG_NETFILTER_XT_MATCH_LIMIT=m
+CONFIG_NETFILTER_XT_MATCH_MAC=m
+CONFIG_NETFILTER_XT_MATCH_MARK=m
+CONFIG_NETFILTER_XT_MATCH_POLICY=m
+CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m
+CONFIG_NETFILTER_XT_MATCH_PHYSDEV=m
+CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m
+CONFIG_NETFILTER_XT_MATCH_QUOTA=m
+CONFIG_NETFILTER_XT_MATCH_REALM=m
+CONFIG_NETFILTER_XT_MATCH_SCTP=m
+CONFIG_NETFILTER_XT_MATCH_STATE=m
+CONFIG_NETFILTER_XT_MATCH_STATISTIC=m
+CONFIG_NETFILTER_XT_MATCH_STRING=m
+CONFIG_NETFILTER_XT_MATCH_TCPMSS=m
+CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m
+
+#
+# IP: Netfilter Configuration
+#
+CONFIG_NF_CONNTRACK_IPV4=m
+# CONFIG_NF_CONNTRACK_PROC_COMPAT is not set
+CONFIG_IP_NF_QUEUE=m
+CONFIG_IP_NF_IPTABLES=m
+CONFIG_IP_NF_MATCH_IPRANGE=m
+CONFIG_IP_NF_MATCH_TOS=m
+CONFIG_IP_NF_MATCH_RECENT=m
+CONFIG_IP_NF_MATCH_ECN=m
+CONFIG_IP_NF_MATCH_AH=m
+CONFIG_IP_NF_MATCH_TTL=m
+CONFIG_IP_NF_MATCH_OWNER=m
+CONFIG_IP_NF_MATCH_ADDRTYPE=m
+CONFIG_IP_NF_FILTER=m
+CONFIG_IP_NF_TARGET_REJECT=m
+CONFIG_IP_NF_TARGET_LOG=m
+CONFIG_IP_NF_TARGET_ULOG=m
+CONFIG_NF_NAT=m
+CONFIG_NF_NAT_NEEDED=y
+CONFIG_IP_NF_TARGET_MASQUERADE=m
+CONFIG_IP_NF_TARGET_REDIRECT=m
+CONFIG_IP_NF_TARGET_NETMAP=m
+CONFIG_IP_NF_TARGET_SAME=m
+CONFIG_NF_NAT_SNMP_BASIC=m
+CONFIG_NF_NAT_PROTO_GRE=m
+CONFIG_NF_NAT_FTP=m
+CONFIG_NF_NAT_IRC=m
+CONFIG_NF_NAT_TFTP=m
+CONFIG_NF_NAT_AMANDA=m
+CONFIG_NF_NAT_PPTP=m
+CONFIG_NF_NAT_H323=m
+CONFIG_NF_NAT_SIP=m
+CONFIG_IP_NF_MANGLE=m
+CONFIG_IP_NF_TARGET_TOS=m
+CONFIG_IP_NF_TARGET_ECN=m
+CONFIG_IP_NF_TARGET_TTL=m
+CONFIG_IP_NF_TARGET_CLUSTERIP=m
+CONFIG_IP_NF_RAW=m
+CONFIG_IP_NF_ARPTABLES=m
+CONFIG_IP_NF_ARPFILTER=m
+CONFIG_IP_NF_ARP_MANGLE=m
+CONFIG_IP_NF_SET=m
+CONFIG_IP_NF_SET_MAX=256
+CONFIG_IP_NF_SET_HASHSIZE=1024
+CONFIG_IP_NF_SET_IPMAP=m
+CONFIG_IP_NF_SET_MACIPMAP=m
+CONFIG_IP_NF_SET_PORTMAP=m
+CONFIG_IP_NF_SET_IPHASH=m
+CONFIG_IP_NF_SET_NETHASH=m
+CONFIG_IP_NF_SET_IPPORTHASH=m
+CONFIG_IP_NF_SET_IPTREE=m
+CONFIG_IP_NF_SET_IPTREEMAP=m
+CONFIG_IP_NF_MATCH_SET=m
+CONFIG_IP_NF_TARGET_SET=m
+
+#
+# IPv6: Netfilter Configuration (EXPERIMENTAL)
+#
+CONFIG_NF_CONNTRACK_IPV6=m
+CONFIG_IP6_NF_QUEUE=m
+CONFIG_IP6_NF_IPTABLES=m
+CONFIG_IP6_NF_MATCH_RT=m
+CONFIG_IP6_NF_MATCH_OPTS=m
+CONFIG_IP6_NF_MATCH_FRAG=m
+CONFIG_IP6_NF_MATCH_HL=m
+CONFIG_IP6_NF_MATCH_OWNER=m
+CONFIG_IP6_NF_MATCH_IPV6HEADER=m
+CONFIG_IP6_NF_MATCH_AH=m
+CONFIG_IP6_NF_MATCH_MH=m
+CONFIG_IP6_NF_MATCH_EUI64=m
+CONFIG_IP6_NF_FILTER=m
+CONFIG_IP6_NF_TARGET_LOG=m
+CONFIG_IP6_NF_TARGET_REJECT=m
+CONFIG_IP6_NF_MANGLE=m
+CONFIG_IP6_NF_TARGET_HL=m
+CONFIG_IP6_NF_RAW=m
+
+#
+# Bridge: Netfilter Configuration
+#
+CONFIG_BRIDGE_NF_EBTABLES=m
+CONFIG_BRIDGE_EBT_BROUTE=m
+CONFIG_BRIDGE_EBT_T_FILTER=m
+CONFIG_BRIDGE_EBT_T_NAT=m
+CONFIG_BRIDGE_EBT_802_3=m
+CONFIG_BRIDGE_EBT_AMONG=m
+CONFIG_BRIDGE_EBT_ARP=m
+CONFIG_BRIDGE_EBT_IP=m
+CONFIG_BRIDGE_EBT_LIMIT=m
+CONFIG_BRIDGE_EBT_MARK=m
+CONFIG_BRIDGE_EBT_PKTTYPE=m
+CONFIG_BRIDGE_EBT_STP=m
+CONFIG_BRIDGE_EBT_VLAN=m
+CONFIG_BRIDGE_EBT_ARPREPLY=m
+CONFIG_BRIDGE_EBT_DNAT=m
+CONFIG_BRIDGE_EBT_MARK_T=m
+CONFIG_BRIDGE_EBT_REDIRECT=m
+CONFIG_BRIDGE_EBT_SNAT=m
+CONFIG_BRIDGE_EBT_LOG=m
+CONFIG_BRIDGE_EBT_ULOG=m
+# CONFIG_IP_DCCP is not set
+# CONFIG_IP_SCTP is not set
+# CONFIG_TIPC is not set
+# CONFIG_ATM is not set
+CONFIG_BRIDGE=m
+CONFIG_VLAN_8021Q=m
+# CONFIG_DECNET is not set
+CONFIG_LLC=y
+# CONFIG_LLC2 is not set
+# CONFIG_IPX is not set
+# CONFIG_ATALK is not set
+# CONFIG_X25 is not set
+# CONFIG_LAPB is not set
+# CONFIG_ECONET is not set
+# CONFIG_WAN_ROUTER is not set
+
+#
+# QoS and/or fair queueing
+#
+CONFIG_NET_SCHED=y
+CONFIG_NET_SCH_FIFO=y
+
+#
+# Queueing/Scheduling
+#
+CONFIG_NET_SCH_CBQ=m
+CONFIG_NET_SCH_HTB=m
+CONFIG_NET_SCH_HFSC=m
+CONFIG_NET_SCH_PRIO=m
+CONFIG_NET_SCH_RED=m
+CONFIG_NET_SCH_SFQ=m
+CONFIG_NET_SCH_TEQL=m
+CONFIG_NET_SCH_TBF=m
+CONFIG_NET_SCH_GRED=m
+CONFIG_NET_SCH_DSMARK=m
+CONFIG_NET_SCH_NETEM=m
+CONFIG_NET_SCH_INGRESS=m
+
+#
+# Classification
+#
+CONFIG_NET_CLS=y
+CONFIG_NET_CLS_BASIC=m
+CONFIG_NET_CLS_TCINDEX=m
+CONFIG_NET_CLS_ROUTE4=m
+CONFIG_NET_CLS_ROUTE=y
+CONFIG_NET_CLS_FW=m
+CONFIG_NET_CLS_U32=m
+CONFIG_CLS_U32_PERF=y
+CONFIG_CLS_U32_MARK=y
+CONFIG_NET_CLS_RSVP=m
+CONFIG_NET_CLS_RSVP6=m
+CONFIG_NET_EMATCH=y
+CONFIG_NET_EMATCH_STACK=32
+CONFIG_NET_EMATCH_CMP=m
+CONFIG_NET_EMATCH_NBYTE=m
+CONFIG_NET_EMATCH_U32=m
+CONFIG_NET_EMATCH_META=m
+CONFIG_NET_EMATCH_TEXT=m
+CONFIG_NET_CLS_ACT=y
+CONFIG_NET_ACT_POLICE=m
+CONFIG_NET_ACT_GACT=m
+CONFIG_GACT_PROB=y
+CONFIG_NET_ACT_MIRRED=m
+CONFIG_NET_ACT_IPT=m
+CONFIG_NET_ACT_PEDIT=m
+CONFIG_NET_ACT_SIMP=m
+CONFIG_NET_CLS_IND=y
+CONFIG_NET_ESTIMATOR=y
+
+#
+# Network testing
+#
+CONFIG_NET_PKTGEN=m
+# CONFIG_NET_TCPPROBE is not set
+# CONFIG_HAMRADIO is not set
+# CONFIG_IRDA is not set
+# CONFIG_BT is not set
+# CONFIG_AF_RXRPC is not set
+CONFIG_FIB_RULES=y
+
+#
+# Wireless
+#
+CONFIG_CFG80211=m
+CONFIG_WIRELESS_EXT=y
+CONFIG_MAC80211=m
+CONFIG_MAC80211_LEDS=y
+# CONFIG_MAC80211_DEBUGFS is not set
+# CONFIG_MAC80211_DEBUG is not set
+CONFIG_IEEE80211=m
+CONFIG_IEEE80211_DEBUG=y
+CONFIG_IEEE80211_CRYPT_WEP=m
+CONFIG_IEEE80211_CRYPT_CCMP=m
+CONFIG_IEEE80211_CRYPT_TKIP=m
+CONFIG_IEEE80211_SOFTMAC=m
+CONFIG_IEEE80211_SOFTMAC_DEBUG=y
+CONFIG_RFKILL=m
+CONFIG_RFKILL_INPUT=m
+
+#
+# Device Drivers
+#
+
+#
+# Generic Driver Options
+#
+CONFIG_STANDALONE=y
+CONFIG_PREVENT_FIRMWARE_BUILD=y
+CONFIG_FW_LOADER=y
+# CONFIG_DEBUG_DRIVER is not set
+CONFIG_DEBUG_DEVRES=y
+# CONFIG_SYS_HYPERVISOR is not set
+
+#
+# Connector - unified userspace <-> kernelspace linker
+#
+CONFIG_CONNECTOR=y
+CONFIG_PROC_EVENTS=y
+# CONFIG_MTD is not set
+
+#
+# Parallel port support
+#
+# CONFIG_PARPORT is not set
+
+#
+# Plug and Play support
+#
+CONFIG_PNP=y
+# CONFIG_PNP_DEBUG is not set
+
+#
+# Protocols
+#
+CONFIG_PNPACPI=y
+
+#
+# Block devices
+#
+CONFIG_BLK_DEV_FD=m
+CONFIG_BLK_CPQ_DA=m
+CONFIG_BLK_CPQ_CISS_DA=m
+CONFIG_CISS_SCSI_TAPE=y
+CONFIG_BLK_DEV_DAC960=m
+CONFIG_BLK_DEV_UMEM=m
+# CONFIG_BLK_DEV_COW_COMMON is not set
+CONFIG_BLK_DEV_LOOP=m
+CONFIG_BLK_DEV_CRYPTOLOOP=m
+# CONFIG_BLK_DEV_VROOT is not set
+CONFIG_BLK_DEV_NBD=m
+CONFIG_BLK_DEV_SX8=m
+# CONFIG_BLK_DEV_UB is not set
+CONFIG_BLK_DEV_RAM=y
+CONFIG_BLK_DEV_RAM_COUNT=16
+CONFIG_BLK_DEV_RAM_SIZE=16384
+CONFIG_BLK_DEV_RAM_BLOCKSIZE=4096
+CONFIG_CDROM_PKTCDVD=m
+CONFIG_CDROM_PKTCDVD_BUFFERS=8
+# CONFIG_CDROM_PKTCDVD_WCACHE is not set
+CONFIG_ATA_OVER_ETH=m
+
+#
+# Misc devices
+#
+# CONFIG_IBM_ASM is not set
+# CONFIG_PHANTOM is not set
+# CONFIG_SGI_IOC4 is not set
+CONFIG_TIFM_CORE=m
+CONFIG_TIFM_7XX1=m
+CONFIG_ASUS_LAPTOP=m
+CONFIG_MSI_LAPTOP=m
+CONFIG_SONY_LAPTOP=m
+CONFIG_SONYPI_COMPAT=y
+# CONFIG_THINKPAD_ACPI is not set
+# CONFIG_IDE is not set
+
+#
+# SCSI device support
+#
+CONFIG_RAID_ATTRS=m
+CONFIG_SCSI=m
+CONFIG_SCSI_TGT=m
+CONFIG_SCSI_NETLINK=y
+CONFIG_SCSI_PROC_FS=y
+
+#
+# SCSI support type (disk, tape, CD-ROM)
+#
+CONFIG_BLK_DEV_SD=m
+CONFIG_CHR_DEV_ST=m
+CONFIG_CHR_DEV_OSST=m
+CONFIG_BLK_DEV_SR=m
+CONFIG_BLK_DEV_SR_VENDOR=y
+CONFIG_CHR_DEV_SG=m
+CONFIG_CHR_DEV_SCH=m
+
+#
+# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
+#
+CONFIG_SCSI_MULTI_LUN=y
+CONFIG_SCSI_CONSTANTS=y
+CONFIG_SCSI_LOGGING=y
+CONFIG_SCSI_SCAN_ASYNC=y
+CONFIG_SCSI_WAIT_SCAN=m
+
+#
+# SCSI Transports
+#
+CONFIG_SCSI_SPI_ATTRS=m
+CONFIG_SCSI_FC_ATTRS=m
+CONFIG_SCSI_ISCSI_ATTRS=m
+CONFIG_SCSI_SAS_ATTRS=m
+CONFIG_SCSI_SAS_LIBSAS=m
+# CONFIG_SCSI_SAS_LIBSAS_DEBUG is not set
+
+#
+# SCSI low-level drivers
+#
+CONFIG_ISCSI_TCP=m
+CONFIG_BLK_DEV_3W_XXXX_RAID=m
+CONFIG_SCSI_3W_9XXX=m
+CONFIG_SCSI_ACARD=m
+CONFIG_SCSI_AACRAID=m
+CONFIG_SCSI_AIC7XXX=m
+CONFIG_AIC7XXX_CMDS_PER_DEVICE=4
+CONFIG_AIC7XXX_RESET_DELAY_MS=15000
+# CONFIG_AIC7XXX_DEBUG_ENABLE is not set
+CONFIG_AIC7XXX_DEBUG_MASK=0
+# CONFIG_AIC7XXX_REG_PRETTY_PRINT is not set
+CONFIG_SCSI_AIC7XXX_OLD=m
+CONFIG_SCSI_AIC79XX=m
+CONFIG_AIC79XX_CMDS_PER_DEVICE=4
+CONFIG_AIC79XX_RESET_DELAY_MS=15000
+# CONFIG_AIC79XX_DEBUG_ENABLE is not set
+CONFIG_AIC79XX_DEBUG_MASK=0
+# CONFIG_AIC79XX_REG_PRETTY_PRINT is not set
+CONFIG_SCSI_AIC94XX=m
+# CONFIG_AIC94XX_DEBUG is not set
+CONFIG_SCSI_ARCMSR=m
+CONFIG_MEGARAID_NEWGEN=y
+CONFIG_MEGARAID_MM=m
+CONFIG_MEGARAID_MAILBOX=m
+CONFIG_MEGARAID_LEGACY=m
+CONFIG_MEGARAID_SAS=m
+CONFIG_SCSI_HPTIOP=m
+CONFIG_SCSI_BUSLOGIC=m
+# CONFIG_SCSI_OMIT_FLASHPOINT is not set
+# CONFIG_SCSI_DMX3191D is not set
+# CONFIG_SCSI_EATA is not set
+# CONFIG_SCSI_FUTURE_DOMAIN is not set
+CONFIG_SCSI_GDTH=m
+CONFIG_SCSI_IPS=m
+CONFIG_SCSI_INITIO=m
+CONFIG_SCSI_INIA100=m
+CONFIG_SCSI_STEX=m
+CONFIG_SCSI_SYM53C8XX_2=m
+CONFIG_SCSI_SYM53C8XX_DMA_ADDRESSING_MODE=1
+CONFIG_SCSI_SYM53C8XX_DEFAULT_TAGS=16
+CONFIG_SCSI_SYM53C8XX_MAX_TAGS=64
+CONFIG_SCSI_SYM53C8XX_MMIO=y
+# CONFIG_SCSI_IPR is not set
+CONFIG_SCSI_QLOGIC_1280=m
+CONFIG_SCSI_QLA_FC=m
+CONFIG_SCSI_QLA_ISCSI=m
+CONFIG_SCSI_LPFC=m
+CONFIG_SCSI_DC395x=m
+CONFIG_SCSI_DC390T=m
+# CONFIG_SCSI_DEBUG is not set
+CONFIG_SCSI_SRP=m
+
+#
+# PCMCIA SCSI adapter support
+#
+# CONFIG_PCMCIA_FDOMAIN is not set
+CONFIG_PCMCIA_QLOGIC=m
+CONFIG_PCMCIA_SYM53C500=m
+CONFIG_ATA=m
+# CONFIG_ATA_NONSTANDARD is not set
+CONFIG_ATA_ACPI=y
+CONFIG_SATA_AHCI=m
+CONFIG_SATA_SVW=m
+CONFIG_ATA_PIIX=m
+CONFIG_SATA_MV=m
+CONFIG_SATA_NV=m
+CONFIG_PDC_ADMA=m
+CONFIG_SATA_QSTOR=m
+CONFIG_SATA_PROMISE=m
+CONFIG_SATA_SX4=m
+CONFIG_SATA_SIL=m
+CONFIG_SATA_SIL24=m
+CONFIG_SATA_SIS=m
+CONFIG_SATA_ULI=m
+CONFIG_SATA_VIA=m
+CONFIG_SATA_VITESSE=m
+CONFIG_SATA_INIC162X=m
+CONFIG_PATA_ALI=m
+CONFIG_PATA_AMD=m
+CONFIG_PATA_ARTOP=m
+CONFIG_PATA_ATIIXP=m
+CONFIG_PATA_CMD640_PCI=m
+CONFIG_PATA_CMD64X=m
+CONFIG_PATA_CS5520=m
+CONFIG_PATA_CS5530=m
+CONFIG_PATA_CYPRESS=m
+CONFIG_PATA_EFAR=m
+CONFIG_ATA_GENERIC=m
+CONFIG_PATA_HPT366=m
+CONFIG_PATA_HPT37X=m
+CONFIG_PATA_HPT3X2N=m
+CONFIG_PATA_HPT3X3=m
+CONFIG_PATA_IT821X=m
+CONFIG_PATA_IT8213=m
+CONFIG_PATA_JMICRON=m
+CONFIG_PATA_TRIFLEX=m
+CONFIG_PATA_MARVELL=m
+CONFIG_PATA_MPIIX=m
+CONFIG_PATA_OLDPIIX=m
+CONFIG_PATA_NETCELL=m
+CONFIG_PATA_NS87410=m
+CONFIG_PATA_OPTI=m
+CONFIG_PATA_OPTIDMA=m
+CONFIG_PATA_PCMCIA=m
+CONFIG_PATA_PDC_OLD=m
+# CONFIG_PATA_RADISYS is not set
+# CONFIG_PATA_RZ1000 is not set
+# CONFIG_PATA_SC1200 is not set
+CONFIG_PATA_SERVERWORKS=m
+CONFIG_PATA_PDC2027X=m
+CONFIG_PATA_SIL680=m
+CONFIG_PATA_SIS=m
+CONFIG_PATA_VIA=m
+CONFIG_PATA_WINBOND=m
+
+#
+# Multi-device support (RAID and LVM)
+#
+CONFIG_MD=y
+CONFIG_BLK_DEV_MD=y
+CONFIG_MD_LINEAR=m
+CONFIG_MD_RAID0=m
+CONFIG_MD_RAID1=m
+CONFIG_MD_RAID10=m
+CONFIG_MD_RAID456=m
+CONFIG_MD_RAID5_RESHAPE=y
+CONFIG_MD_MULTIPATH=m
+CONFIG_MD_FAULTY=m
+CONFIG_BLK_DEV_DM=m
+CONFIG_DM_DEBUG=y
+CONFIG_DM_CRYPT=m
+CONFIG_DM_SNAPSHOT=m
+CONFIG_DM_MIRROR=m
+CONFIG_DM_ZERO=m
+CONFIG_DM_MULTIPATH=m
+CONFIG_DM_MULTIPATH_EMC=m
+# CONFIG_DM_DELAY is not set
+
+#
+# Fusion MPT device support
+#
+CONFIG_FUSION=y
+CONFIG_FUSION_SPI=m
+CONFIG_FUSION_FC=m
+CONFIG_FUSION_SAS=m
+CONFIG_FUSION_MAX_SGE=40
+CONFIG_FUSION_CTL=m
+CONFIG_FUSION_LAN=m
+
+#
+# IEEE 1394 (FireWire) support
+#
+CONFIG_FIREWIRE=m
+CONFIG_FIREWIRE_OHCI=m
+CONFIG_FIREWIRE_SBP2=m
+# CONFIG_IEEE1394 is not set
+
+#
+# I2O device support
+#
+# CONFIG_I2O is not set
+CONFIG_MACINTOSH_DRIVERS=y
+CONFIG_MAC_EMUMOUSEBTN=y
+
+#
+# Network device support
+#
+CONFIG_NETDEVICES=y
+CONFIG_IFB=m
+CONFIG_DUMMY=m
+CONFIG_BONDING=m
+CONFIG_EQUALIZER=m
+CONFIG_TUN=m
+CONFIG_NET_SB1000=m
+# CONFIG_ARCNET is not set
+CONFIG_PHYLIB=m
+
+#
+# MII PHY device drivers
+#
+CONFIG_MARVELL_PHY=m
+CONFIG_DAVICOM_PHY=m
+CONFIG_QSEMI_PHY=m
+CONFIG_LXT_PHY=m
+CONFIG_CICADA_PHY=m
+CONFIG_VITESSE_PHY=m
+CONFIG_SMSC_PHY=m
+CONFIG_BROADCOM_PHY=m
+CONFIG_FIXED_PHY=m
+CONFIG_FIXED_MII_10_FDX=y
+CONFIG_FIXED_MII_100_FDX=y
+
+#
+# Ethernet (10 or 100Mbit)
+#
+CONFIG_NET_ETHERNET=y
+CONFIG_MII=m
+CONFIG_HAPPYMEAL=m
+CONFIG_SUNGEM=m
+CONFIG_CASSINI=m
+CONFIG_NET_VENDOR_3COM=y
+CONFIG_VORTEX=m
+CONFIG_TYPHOON=m
+
+#
+# Tulip family network device support
+#
+CONFIG_NET_TULIP=y
+CONFIG_DE2104X=m
+CONFIG_TULIP=m
+# CONFIG_TULIP_MWI is not set
+CONFIG_TULIP_MMIO=y
+# CONFIG_TULIP_NAPI is not set
+CONFIG_DE4X5=m
+CONFIG_WINBOND_840=m
+CONFIG_DM9102=m
+CONFIG_ULI526X=m
+CONFIG_PCMCIA_XIRCOM=m
+# CONFIG_HP100 is not set
+CONFIG_NET_PCI=y
+CONFIG_PCNET32=m
+CONFIG_PCNET32_NAPI=y
+CONFIG_AMD8111_ETH=m
+CONFIG_AMD8111E_NAPI=y
+CONFIG_ADAPTEC_STARFIRE=m
+CONFIG_ADAPTEC_STARFIRE_NAPI=y
+CONFIG_B44=m
+CONFIG_FORCEDETH=m
+CONFIG_FORCEDETH_NAPI=y
+# CONFIG_DGRS is not set
+# CONFIG_EEPRO100 is not set
+CONFIG_E100=m
+CONFIG_FEALNX=m
+CONFIG_NATSEMI=m
+CONFIG_NE2K_PCI=m
+CONFIG_8139CP=m
+CONFIG_8139TOO=m
+# CONFIG_8139TOO_PIO is not set
+# CONFIG_8139TOO_TUNE_TWISTER is not set
+CONFIG_8139TOO_8129=y
+# CONFIG_8139_OLD_RX_RESET is not set
+CONFIG_SIS900=m
+CONFIG_EPIC100=m
+CONFIG_SUNDANCE=m
+# CONFIG_SUNDANCE_MMIO is not set
+CONFIG_VIA_RHINE=m
+CONFIG_VIA_RHINE_MMIO=y
+CONFIG_VIA_RHINE_NAPI=y
+CONFIG_SC92031=m
+CONFIG_NETDEV_1000=y
+CONFIG_ACENIC=m
+# CONFIG_ACENIC_OMIT_TIGON_I is not set
+CONFIG_DL2K=m
+CONFIG_E1000=m
+CONFIG_E1000_NAPI=y
+# CONFIG_E1000_DISABLE_PACKET_SPLIT is not set
+CONFIG_NS83820=m
+CONFIG_HAMACHI=m
+CONFIG_YELLOWFIN=m
+CONFIG_R8169=m
+CONFIG_R8169_NAPI=y
+CONFIG_R8169_VLAN=y
+CONFIG_SIS190=m
+CONFIG_SKGE=m
+CONFIG_SKY2=m
+# CONFIG_SK98LIN is not set
+CONFIG_VIA_VELOCITY=m
+CONFIG_TIGON3=m
+CONFIG_BNX2=m
+CONFIG_QLA3XXX=m
+CONFIG_ATL1=m
+CONFIG_NETDEV_10000=y
+CONFIG_CHELSIO_T1=m
+CONFIG_CHELSIO_T1_1G=y
+CONFIG_CHELSIO_T1_NAPI=y
+CONFIG_CHELSIO_T3=m
+CONFIG_IXGB=m
+CONFIG_IXGB_NAPI=y
+CONFIG_S2IO=m
+CONFIG_S2IO_NAPI=y
+CONFIG_MYRI10GE=m
+CONFIG_NETXEN_NIC=m
+# CONFIG_MLX4_CORE is not set
+CONFIG_TR=y
+CONFIG_IBMOL=m
+CONFIG_3C359=m
+# CONFIG_TMS380TR is not set
+
+#
+# Wireless LAN
+#
+CONFIG_WLAN_PRE80211=y
+# CONFIG_STRIP is not set
+CONFIG_PCMCIA_WAVELAN=m
+CONFIG_PCMCIA_NETWAVE=m
+CONFIG_WLAN_80211=y
+# CONFIG_PCMCIA_RAYCS is not set
+# CONFIG_IPW2100 is not set
+# CONFIG_IPW2200 is not set
+CONFIG_LIBERTAS=m
+CONFIG_LIBERTAS_USB=m
+# CONFIG_LIBERTAS_DEBUG is not set
+CONFIG_AIRO=m
+CONFIG_HERMES=m
+CONFIG_PLX_HERMES=m
+CONFIG_TMD_HERMES=m
+CONFIG_NORTEL_HERMES=m
+CONFIG_PCI_HERMES=m
+CONFIG_ATMEL=m
+CONFIG_PCI_ATMEL=m
+CONFIG_PCMCIA_HERMES=m
+CONFIG_PCMCIA_SPECTRUM=m
+CONFIG_AIRO_CS=m
+CONFIG_PCMCIA_ATMEL=m
+CONFIG_PCMCIA_WL3501=m
+CONFIG_PRISM54=m
+CONFIG_USB_ZD1201=m
+CONFIG_HOSTAP=m
+CONFIG_HOSTAP_FIRMWARE=y
+CONFIG_HOSTAP_FIRMWARE_NVRAM=y
+CONFIG_HOSTAP_PLX=m
+CONFIG_HOSTAP_PCI=m
+CONFIG_HOSTAP_CS=m
+CONFIG_BCM43XX=m
+CONFIG_BCM43XX_DEBUG=y
+CONFIG_BCM43XX_DMA=y
+CONFIG_BCM43XX_PIO=y
+CONFIG_BCM43XX_DMA_AND_PIO_MODE=y
+# CONFIG_BCM43XX_DMA_MODE is not set
+# CONFIG_BCM43XX_PIO_MODE is not set
+CONFIG_ZD1211RW=m
+# CONFIG_ZD1211RW_DEBUG is not set
+
+#
+# USB Network Adapters
+#
+CONFIG_USB_CATC=m
+CONFIG_USB_KAWETH=m
+CONFIG_USB_PEGASUS=m
+CONFIG_USB_RTL8150=m
+CONFIG_USB_USBNET_MII=m
+CONFIG_USB_USBNET=m
+CONFIG_USB_NET_AX8817X=m
+CONFIG_USB_NET_CDCETHER=m
+CONFIG_USB_NET_DM9601=m
+CONFIG_USB_NET_GL620A=m
+CONFIG_USB_NET_NET1080=m
+CONFIG_USB_NET_PLUSB=m
+CONFIG_USB_NET_MCS7830=m
+CONFIG_USB_NET_RNDIS_HOST=m
+CONFIG_USB_NET_CDC_SUBSET=m
+CONFIG_USB_ALI_M5632=y
+CONFIG_USB_AN2720=y
+CONFIG_USB_BELKIN=y
+CONFIG_USB_ARMLINUX=y
+CONFIG_USB_EPSON2888=y
+CONFIG_USB_KC2190=y
+CONFIG_USB_NET_ZAURUS=m
+CONFIG_NET_PCMCIA=y
+CONFIG_PCMCIA_3C589=m
+CONFIG_PCMCIA_3C574=m
+CONFIG_PCMCIA_FMVJ18X=m
+CONFIG_PCMCIA_PCNET=m
+CONFIG_PCMCIA_NMCLAN=m
+CONFIG_PCMCIA_SMC91C92=m
+CONFIG_PCMCIA_XIRC2PS=m
+CONFIG_PCMCIA_AXNET=m
+# CONFIG_WAN is not set
+CONFIG_FDDI=y
+# CONFIG_DEFXX is not set
+CONFIG_SKFP=m
+# CONFIG_HIPPI is not set
+# CONFIG_PPP is not set
+# CONFIG_SLIP is not set
+CONFIG_NET_FC=y
+# CONFIG_SHAPER is not set
+CONFIG_NETCONSOLE=m
+CONFIG_NETPOLL=y
+CONFIG_NETPOLL_TRAP=y
+CONFIG_NET_POLL_CONTROLLER=y
+
+#
+# ISDN subsystem
+#
+# CONFIG_ISDN is not set
+
+#
+# Telephony Support
+#
+# CONFIG_PHONE is not set
+
+#
+# Input device support
+#
+CONFIG_INPUT=y
+CONFIG_INPUT_FF_MEMLESS=y
+CONFIG_INPUT_POLLDEV=m
+
+#
+# Userland interfaces
+#
+CONFIG_INPUT_MOUSEDEV=y
+# CONFIG_INPUT_MOUSEDEV_PSAUX is not set
+CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
+CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
+# CONFIG_INPUT_JOYDEV is not set
+# CONFIG_INPUT_TSDEV is not set
+CONFIG_INPUT_EVDEV=y
+# CONFIG_INPUT_EVBUG is not set
+
+#
+# Input Device Drivers
+#
+CONFIG_INPUT_KEYBOARD=y
+CONFIG_KEYBOARD_ATKBD=y
+# CONFIG_KEYBOARD_SUNKBD is not set
+# CONFIG_KEYBOARD_LKKBD is not set
+# CONFIG_KEYBOARD_XTKBD is not set
+# CONFIG_KEYBOARD_NEWTON is not set
+# CONFIG_KEYBOARD_STOWAWAY is not set
+CONFIG_INPUT_MOUSE=y
+CONFIG_MOUSE_PS2=y
+CONFIG_MOUSE_PS2_ALPS=y
+CONFIG_MOUSE_PS2_LOGIPS2PP=y
+CONFIG_MOUSE_PS2_SYNAPTICS=y
+CONFIG_MOUSE_PS2_LIFEBOOK=y
+CONFIG_MOUSE_PS2_TRACKPOINT=y
+# CONFIG_MOUSE_PS2_TOUCHKIT is not set
+CONFIG_MOUSE_SERIAL=m
+CONFIG_MOUSE_APPLETOUCH=m
+CONFIG_MOUSE_VSXXXAA=m
+# CONFIG_INPUT_JOYSTICK is not set
+# CONFIG_INPUT_TABLET is not set
+# CONFIG_INPUT_TOUCHSCREEN is not set
+# CONFIG_INPUT_MISC is not set
+
+#
+# Hardware I/O ports
+#
+CONFIG_SERIO=y
+CONFIG_SERIO_I8042=y
+CONFIG_SERIO_SERPORT=y
+# CONFIG_SERIO_CT82C710 is not set
+# CONFIG_SERIO_PCIPS2 is not set
+CONFIG_SERIO_LIBPS2=y
+CONFIG_SERIO_RAW=m
+CONFIG_GAMEPORT=m
+CONFIG_GAMEPORT_NS558=m
+CONFIG_GAMEPORT_L4=m
+CONFIG_GAMEPORT_EMU10K1=m
+CONFIG_GAMEPORT_FM801=m
+
+#
+# Character devices
+#
+CONFIG_VT=y
+CONFIG_VT_CONSOLE=y
+CONFIG_HW_CONSOLE=y
+CONFIG_VT_HW_CONSOLE_BINDING=y
+CONFIG_SERIAL_NONSTANDARD=y
+# CONFIG_COMPUTONE is not set
+CONFIG_ROCKETPORT=m
+CONFIG_CYCLADES=m
+# CONFIG_CYZ_INTR is not set
+# CONFIG_DIGIEPCA is not set
+# CONFIG_MOXA_INTELLIO is not set
+# CONFIG_MOXA_SMARTIO is not set
+# CONFIG_MOXA_SMARTIO_NEW is not set
+# CONFIG_ISI is not set
+CONFIG_SYNCLINK=m
+CONFIG_SYNCLINKMP=m
+CONFIG_SYNCLINK_GT=m
+CONFIG_N_HDLC=m
+# CONFIG_SPECIALIX is not set
+# CONFIG_SX is not set
+# CONFIG_RIO is not set
+# CONFIG_STALDRV is not set
+
+#
+# Serial drivers
+#
+CONFIG_SERIAL_8250=y
+CONFIG_SERIAL_8250_CONSOLE=y
+CONFIG_SERIAL_8250_PCI=y
+CONFIG_SERIAL_8250_PNP=y
+CONFIG_SERIAL_8250_CS=m
+CONFIG_SERIAL_8250_NR_UARTS=32
+CONFIG_SERIAL_8250_RUNTIME_UARTS=4
+CONFIG_SERIAL_8250_EXTENDED=y
+CONFIG_SERIAL_8250_MANY_PORTS=y
+CONFIG_SERIAL_8250_SHARE_IRQ=y
+CONFIG_SERIAL_8250_DETECT_IRQ=y
+CONFIG_SERIAL_8250_RSA=y
+
+#
+# Non-8250 serial port support
+#
+CONFIG_SERIAL_CORE=y
+CONFIG_SERIAL_CORE_CONSOLE=y
+CONFIG_SERIAL_JSM=m
+CONFIG_UNIX98_PTYS=y
+# CONFIG_LEGACY_PTYS is not set
+
+#
+# IPMI
+#
+CONFIG_IPMI_HANDLER=m
+# CONFIG_IPMI_PANIC_EVENT is not set
+CONFIG_IPMI_DEVICE_INTERFACE=m
+CONFIG_IPMI_SI=m
+CONFIG_IPMI_WATCHDOG=m
+CONFIG_IPMI_POWEROFF=m
+# CONFIG_WATCHDOG is not set
+CONFIG_HW_RANDOM=y
+CONFIG_HW_RANDOM_INTEL=m
+CONFIG_HW_RANDOM_AMD=m
+CONFIG_HW_RANDOM_GEODE=m
+# CONFIG_NVRAM is not set
+CONFIG_RTC=y
+CONFIG_R3964=m
+# CONFIG_APPLICOM is not set
+CONFIG_AGP=y
+CONFIG_AGP_AMD64=y
+CONFIG_AGP_INTEL=y
+CONFIG_AGP_SIS=y
+CONFIG_AGP_VIA=y
+CONFIG_DRM=m
+CONFIG_DRM_TDFX=m
+CONFIG_DRM_R128=m
+CONFIG_DRM_RADEON=m
+CONFIG_DRM_I810=m
+CONFIG_DRM_I830=m
+CONFIG_DRM_I915=m
+CONFIG_DRM_MGA=m
+CONFIG_DRM_SIS=m
+CONFIG_DRM_VIA=m
+CONFIG_DRM_SAVAGE=m
+
+#
+# PCMCIA character devices
+#
+# CONFIG_SYNCLINK_CS is not set
+CONFIG_CARDMAN_4000=m
+CONFIG_CARDMAN_4040=m
+CONFIG_MWAVE=m
+CONFIG_PC8736x_GPIO=m
+CONFIG_NSC_GPIO=m
+# CONFIG_RAW_DRIVER is not set
+# CONFIG_HPET is not set
+CONFIG_HANGCHECK_TIMER=m
+
+#
+# TPM devices
+#
+CONFIG_TCG_TPM=m
+CONFIG_TCG_TIS=m
+CONFIG_TCG_NSC=m
+CONFIG_TCG_ATMEL=m
+# CONFIG_TCG_INFINEON is not set
+# CONFIG_TELCLOCK is not set
+CONFIG_DEVPORT=y
+CONFIG_I2C=m
+CONFIG_I2C_BOARDINFO=y
+CONFIG_I2C_CHARDEV=m
+
+#
+# I2C Algorithms
+#
+CONFIG_I2C_ALGOBIT=m
+CONFIG_I2C_ALGOPCF=m
+CONFIG_I2C_ALGOPCA=m
+
+#
+# I2C Hardware Bus support
+#
+# CONFIG_I2C_ALI1535 is not set
+# CONFIG_I2C_ALI1563 is not set
+# CONFIG_I2C_ALI15X3 is not set
+# CONFIG_I2C_AMD756 is not set
+# CONFIG_I2C_AMD8111 is not set
+# CONFIG_I2C_I801 is not set
+# CONFIG_I2C_I810 is not set
+# CONFIG_I2C_PIIX4 is not set
+CONFIG_I2C_NFORCE2=m
+# CONFIG_I2C_OCORES is not set
+CONFIG_I2C_PARPORT_LIGHT=m
+CONFIG_I2C_PROSAVAGE=m
+CONFIG_I2C_SAVAGE4=m
+CONFIG_I2C_SIMTEC=m
+# CONFIG_I2C_SIS5595 is not set
+# CONFIG_I2C_SIS630 is not set
+# CONFIG_I2C_SIS96X is not set
+CONFIG_I2C_STUB=m
+# CONFIG_I2C_TINY_USB is not set
+# CONFIG_I2C_VIA is not set
+# CONFIG_I2C_VIAPRO is not set
+CONFIG_I2C_VOODOO3=m
+
+#
+# Miscellaneous I2C Chip support
+#
+CONFIG_SENSORS_DS1337=m
+CONFIG_SENSORS_DS1374=m
+CONFIG_SENSORS_EEPROM=m
+CONFIG_SENSORS_PCF8574=m
+CONFIG_SENSORS_PCA9539=m
+CONFIG_SENSORS_PCF8591=m
+CONFIG_SENSORS_MAX6875=m
+# CONFIG_I2C_DEBUG_CORE is not set
+# CONFIG_I2C_DEBUG_ALGO is not set
+# CONFIG_I2C_DEBUG_BUS is not set
+# CONFIG_I2C_DEBUG_CHIP is not set
+
+#
+# SPI support
+#
+# CONFIG_SPI is not set
+# CONFIG_SPI_MASTER is not set
+
+#
+# Dallas's 1-wire bus
+#
+# CONFIG_W1 is not set
+# CONFIG_HWMON is not set
+
+#
+# Multifunction device drivers
+#
+CONFIG_MFD_SM501=m
+
+#
+# Multimedia devices
+#
+# CONFIG_VIDEO_DEV is not set
+# CONFIG_DVB_CORE is not set
+# CONFIG_DAB is not set
+
+#
+# Graphics support
+#
+CONFIG_BACKLIGHT_LCD_SUPPORT=y
+CONFIG_BACKLIGHT_CLASS_DEVICE=y
+CONFIG_LCD_CLASS_DEVICE=m
+CONFIG_BACKLIGHT_PROGEAR=m
+
+#
+# Display device support
+#
+CONFIG_DISPLAY_SUPPORT=m
+
+#
+# Display hardware drivers
+#
+# CONFIG_VGASTATE is not set
+# CONFIG_FB is not set
+
+#
+# Console display driver support
+#
+CONFIG_VGA_CONSOLE=y
+CONFIG_VGACON_SOFT_SCROLLBACK=y
+CONFIG_VGACON_SOFT_SCROLLBACK_SIZE=64
+CONFIG_VIDEO_SELECT=y
+CONFIG_DUMMY_CONSOLE=y
+
+#
+# Sound
+#
+# CONFIG_SOUND is not set
+
+#
+# HID Devices
+#
+CONFIG_HID=y
+# CONFIG_HID_DEBUG is not set
+
+#
+# USB Input Devices
+#
+CONFIG_USB_HID=y
+# CONFIG_USB_HIDINPUT_POWERBOOK is not set
+CONFIG_HID_FF=y
+CONFIG_HID_PID=y
+CONFIG_LOGITECH_FF=y
+CONFIG_PANTHERLORD_FF=y
+CONFIG_THRUSTMASTER_FF=y
+CONFIG_ZEROPLUS_FF=y
+CONFIG_USB_HIDDEV=y
+
+#
+# USB support
+#
+CONFIG_USB_ARCH_HAS_HCD=y
+CONFIG_USB_ARCH_HAS_OHCI=y
+CONFIG_USB_ARCH_HAS_EHCI=y
+CONFIG_USB=y
+# CONFIG_USB_DEBUG is not set
+
+#
+# Miscellaneous USB options
+#
+CONFIG_USB_DEVICEFS=y
+CONFIG_USB_DEVICE_CLASS=y
+# CONFIG_USB_DYNAMIC_MINORS is not set
+CONFIG_USB_SUSPEND=y
+# CONFIG_USB_OTG is not set
+
+#
+# USB Host Controller Drivers
+#
+CONFIG_USB_EHCI_HCD=m
+CONFIG_USB_EHCI_SPLIT_ISO=y
+CONFIG_USB_EHCI_ROOT_HUB_TT=y
+CONFIG_USB_EHCI_TT_NEWSCHED=y
+# CONFIG_USB_EHCI_BIG_ENDIAN_MMIO is not set
+CONFIG_USB_ISP116X_HCD=m
+CONFIG_USB_OHCI_HCD=m
+# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set
+# CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set
+CONFIG_USB_OHCI_LITTLE_ENDIAN=y
+CONFIG_USB_UHCI_HCD=m
+CONFIG_USB_SL811_HCD=m
+CONFIG_USB_SL811_CS=m
+
+#
+# USB Device Class drivers
+#
+CONFIG_USB_ACM=m
+# CONFIG_USB_PRINTER is not set
+
+#
+# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
+#
+
+#
+# may also be needed; see USB_STORAGE Help for more information
+#
+CONFIG_USB_STORAGE=m
+# CONFIG_USB_STORAGE_DEBUG is not set
+CONFIG_USB_STORAGE_DATAFAB=y
+CONFIG_USB_STORAGE_FREECOM=y
+CONFIG_USB_STORAGE_DPCM=y
+CONFIG_USB_STORAGE_USBAT=y
+CONFIG_USB_STORAGE_SDDR09=y
+CONFIG_USB_STORAGE_SDDR55=y
+CONFIG_USB_STORAGE_JUMPSHOT=y
+CONFIG_USB_STORAGE_ALAUDA=y
+CONFIG_USB_STORAGE_KARMA=y
+# CONFIG_USB_LIBUSUAL is not set
+
+#
+# USB Imaging devices
+#
+# CONFIG_USB_MDC800 is not set
+# CONFIG_USB_MICROTEK is not set
+# CONFIG_USB_MON is not set
+
+#
+# USB port drivers
+#
+
+#
+# USB Serial Converter support
+#
+# CONFIG_USB_SERIAL is not set
+
+#
+# USB Miscellaneous drivers
+#
+# CONFIG_USB_EMI62 is not set
+# CONFIG_USB_EMI26 is not set
+# CONFIG_USB_ADUTUX is not set
+# CONFIG_USB_AUERSWALD is not set
+# CONFIG_USB_RIO500 is not set
+# CONFIG_USB_LEGOTOWER is not set
+# CONFIG_USB_LCD is not set
+# CONFIG_USB_BERRY_CHARGE is not set
+# CONFIG_USB_LED is not set
+# CONFIG_USB_CYPRESS_CY7C63 is not set
+# CONFIG_USB_CYTHERM is not set
+# CONFIG_USB_PHIDGET is not set
+# CONFIG_USB_IDMOUSE is not set
+# CONFIG_USB_FTDI_ELAN is not set
+# CONFIG_USB_APPLEDISPLAY is not set
+# CONFIG_USB_SISUSBVGA is not set
+# CONFIG_USB_LD is not set
+# CONFIG_USB_TRANCEVIBRATOR is not set
+# CONFIG_USB_IOWARRIOR is not set
+# CONFIG_USB_TEST is not set
+
+#
+# USB DSL modem support
+#
+
+#
+# USB Gadget Support
+#
+# CONFIG_USB_GADGET is not set
+# CONFIG_MMC is not set
+
+#
+# LED devices
+#
+CONFIG_NEW_LEDS=y
+CONFIG_LEDS_CLASS=y
+
+#
+# LED drivers
+#
+
+#
+# LED Triggers
+#
+CONFIG_LEDS_TRIGGERS=y
+CONFIG_LEDS_TRIGGER_TIMER=m
+CONFIG_LEDS_TRIGGER_HEARTBEAT=m
+
+#
+# InfiniBand support
+#
+# CONFIG_INFINIBAND is not set
+
+#
+# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
+#
+CONFIG_EDAC=y
+
+#
+# Reporting subsystems
+#
+# CONFIG_EDAC_DEBUG is not set
+CONFIG_EDAC_MM_EDAC=m
+CONFIG_EDAC_E752X=m
+CONFIG_EDAC_POLL=y
+
+#
+# Real Time Clock
+#
+CONFIG_RTC_LIB=m
+CONFIG_RTC_CLASS=m
+
+#
+# RTC interfaces
+#
+CONFIG_RTC_INTF_SYSFS=y
+CONFIG_RTC_INTF_PROC=y
+CONFIG_RTC_INTF_DEV=y
+# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
+# CONFIG_RTC_DRV_TEST is not set
+
+#
+# I2C RTC drivers
+#
+CONFIG_RTC_DRV_DS1307=m
+CONFIG_RTC_DRV_DS1672=m
+CONFIG_RTC_DRV_MAX6900=m
+CONFIG_RTC_DRV_RS5C372=m
+CONFIG_RTC_DRV_ISL1208=m
+CONFIG_RTC_DRV_X1205=m
+CONFIG_RTC_DRV_PCF8563=m
+CONFIG_RTC_DRV_PCF8583=m
+
+#
+# SPI RTC drivers
+#
+
+#
+# Platform RTC drivers
+#
+# CONFIG_RTC_DRV_CMOS is not set
+CONFIG_RTC_DRV_DS1553=m
+CONFIG_RTC_DRV_DS1742=m
+# CONFIG_RTC_DRV_M48T86 is not set
+CONFIG_RTC_DRV_V3020=m
+
+#
+# on-CPU RTC drivers
+#
+
+#
+# DMA Engine support
+#
+CONFIG_DMA_ENGINE=y
+
+#
+# DMA Clients
+#
+CONFIG_NET_DMA=y
+
+#
+# DMA Devices
+#
+CONFIG_INTEL_IOATDMA=m
+
+#
+# Virtualization
+#
+CONFIG_KVM=m
+CONFIG_KVM_INTEL=m
+CONFIG_KVM_AMD=m
+
+#
+# Firmware Drivers
+#
+CONFIG_EDD=m
+CONFIG_DELL_RBU=m
+CONFIG_DCDBAS=m
+
+#
+# File systems
+#
+CONFIG_EXT2_FS=m
+CONFIG_EXT2_FS_XATTR=y
+CONFIG_EXT2_FS_POSIX_ACL=y
+CONFIG_EXT2_FS_SECURITY=y
+CONFIG_EXT2_FS_XIP=y
+CONFIG_FS_XIP=y
+CONFIG_EXT3_FS=m
+CONFIG_EXT3_FS_XATTR=y
+CONFIG_EXT3_FS_POSIX_ACL=y
+CONFIG_EXT3_FS_SECURITY=y
+# CONFIG_EXT4DEV_FS is not set
+CONFIG_JBD=m
+# CONFIG_JBD_DEBUG is not set
+CONFIG_FS_MBCACHE=m
+# CONFIG_REISERFS_FS is not set
+# CONFIG_JFS_FS is not set
+CONFIG_FS_POSIX_ACL=y
+# CONFIG_XFS_FS is not set
+# CONFIG_GFS2_FS is not set
+# CONFIG_OCFS2_FS is not set
+# CONFIG_MINIX_FS is not set
+# CONFIG_ROMFS_FS is not set
+CONFIG_INOTIFY=y
+CONFIG_INOTIFY_USER=y
+CONFIG_QUOTA=y
+# CONFIG_QFMT_V1 is not set
+CONFIG_QFMT_V2=y
+CONFIG_QUOTACTL=y
+CONFIG_DNOTIFY=y
+# CONFIG_AUTOFS_FS is not set
+# CONFIG_AUTOFS4_FS is not set
+# CONFIG_FUSE_FS is not set
+CONFIG_GENERIC_ACL=y
+
+#
+# CD-ROM/DVD Filesystems
+#
+CONFIG_ISO9660_FS=y
+CONFIG_JOLIET=y
+CONFIG_ZISOFS=y
+CONFIG_UDF_FS=m
+CONFIG_UDF_NLS=y
+
+#
+# DOS/FAT/NT Filesystems
+#
+CONFIG_FAT_FS=m
+CONFIG_MSDOS_FS=m
+CONFIG_VFAT_FS=m
+CONFIG_FAT_DEFAULT_CODEPAGE=437
+CONFIG_FAT_DEFAULT_IOCHARSET="ascii"
+# CONFIG_NTFS_FS is not set
+
+#
+# Pseudo filesystems
+#
+CONFIG_PROC_FS=y
+CONFIG_PROC_KCORE=y
+CONFIG_PROC_SYSCTL=y
+CONFIG_SYSFS=y
+CONFIG_TMPFS=y
+CONFIG_TMPFS_POSIX_ACL=y
+CONFIG_HUGETLBFS=y
+CONFIG_HUGETLB_PAGE=y
+CONFIG_RAMFS=y
+CONFIG_CONFIGFS_FS=m
+
+#
+# Miscellaneous filesystems
+#
+# CONFIG_ADFS_FS is not set
+# CONFIG_AFFS_FS is not set
+# CONFIG_HFS_FS is not set
+# CONFIG_HFSPLUS_FS is not set
+# CONFIG_BEFS_FS is not set
+# CONFIG_BFS_FS is not set
+# CONFIG_EFS_FS is not set
+CONFIG_CRAMFS=y
+# CONFIG_VXFS_FS is not set
+# CONFIG_HPFS_FS is not set
+# CONFIG_QNX4FS_FS is not set
+# CONFIG_SYSV_FS is not set
+# CONFIG_UFS_FS is not set
+
+#
+# Network File Systems
+#
+CONFIG_NFS_FS=m
+CONFIG_NFS_V3=y
+CONFIG_NFS_V3_ACL=y
+CONFIG_NFS_V4=y
+CONFIG_NFS_DIRECTIO=y
+CONFIG_NFSD=m
+CONFIG_NFSD_V2_ACL=y
+CONFIG_NFSD_V3=y
+CONFIG_NFSD_V3_ACL=y
+CONFIG_NFSD_V4=y
+CONFIG_NFSD_TCP=y
+CONFIG_LOCKD=m
+CONFIG_LOCKD_V4=y
+CONFIG_EXPORTFS=m
+CONFIG_NFS_ACL_SUPPORT=m
+CONFIG_NFS_COMMON=y
+CONFIG_SUNRPC=m
+CONFIG_SUNRPC_GSS=m
+CONFIG_SUNRPC_BIND34=y
+CONFIG_RPCSEC_GSS_KRB5=m
+CONFIG_RPCSEC_GSS_SPKM3=m
+# CONFIG_SMB_FS is not set
+# CONFIG_CIFS is not set
+# CONFIG_NCP_FS is not set
+# CONFIG_CODA_FS is not set
+# CONFIG_AFS_FS is not set
+# CONFIG_9P_FS is not set
+
+#
+# Partition Types
+#
+CONFIG_PARTITION_ADVANCED=y
+# CONFIG_ACORN_PARTITION is not set
+# CONFIG_OSF_PARTITION is not set
+# CONFIG_AMIGA_PARTITION is not set
+# CONFIG_ATARI_PARTITION is not set
+# CONFIG_MAC_PARTITION is not set
+CONFIG_MSDOS_PARTITION=y
+# CONFIG_BSD_DISKLABEL is not set
+# CONFIG_MINIX_SUBPARTITION is not set
+# CONFIG_SOLARIS_X86_PARTITION is not set
+# CONFIG_UNIXWARE_DISKLABEL is not set
+# CONFIG_LDM_PARTITION is not set
+# CONFIG_SGI_PARTITION is not set
+# CONFIG_ULTRIX_PARTITION is not set
+# CONFIG_SUN_PARTITION is not set
+# CONFIG_KARMA_PARTITION is not set
+CONFIG_EFI_PARTITION=y
+# CONFIG_SYSV68_PARTITION is not set
+
+#
+# Native Language Support
+#
+CONFIG_NLS=y
+CONFIG_NLS_DEFAULT="utf8"
+CONFIG_NLS_CODEPAGE_437=y
+# CONFIG_NLS_CODEPAGE_737 is not set
+# CONFIG_NLS_CODEPAGE_775 is not set
+# CONFIG_NLS_CODEPAGE_850 is not set
+# CONFIG_NLS_CODEPAGE_852 is not set
+# CONFIG_NLS_CODEPAGE_855 is not set
+# CONFIG_NLS_CODEPAGE_857 is not set
+# CONFIG_NLS_CODEPAGE_860 is not set
+# CONFIG_NLS_CODEPAGE_861 is not set
+# CONFIG_NLS_CODEPAGE_862 is not set
+# CONFIG_NLS_CODEPAGE_863 is not set
+# CONFIG_NLS_CODEPAGE_864 is not set
+# CONFIG_NLS_CODEPAGE_865 is not set
+# CONFIG_NLS_CODEPAGE_866 is not set
+# CONFIG_NLS_CODEPAGE_869 is not set
+# CONFIG_NLS_CODEPAGE_936 is not set
+# CONFIG_NLS_CODEPAGE_950 is not set
+# CONFIG_NLS_CODEPAGE_932 is not set
+# CONFIG_NLS_CODEPAGE_949 is not set
+# CONFIG_NLS_CODEPAGE_874 is not set
+# CONFIG_NLS_ISO8859_8 is not set
+# CONFIG_NLS_CODEPAGE_1250 is not set
+# CONFIG_NLS_CODEPAGE_1251 is not set
+CONFIG_NLS_ASCII=y
+CONFIG_NLS_ISO8859_1=y
+# CONFIG_NLS_ISO8859_2 is not set
+# CONFIG_NLS_ISO8859_3 is not set
+# CONFIG_NLS_ISO8859_4 is not set
+# CONFIG_NLS_ISO8859_5 is not set
+# CONFIG_NLS_ISO8859_6 is not set
+# CONFIG_NLS_ISO8859_7 is not set
+# CONFIG_NLS_ISO8859_9 is not set
+# CONFIG_NLS_ISO8859_13 is not set
+# CONFIG_NLS_ISO8859_14 is not set
+# CONFIG_NLS_ISO8859_15 is not set
+# CONFIG_NLS_KOI8_R is not set
+# CONFIG_NLS_KOI8_U is not set
+CONFIG_NLS_UTF8=y
+
+#
+# Distributed Lock Manager
+#
+# CONFIG_DLM is not set
+
+#
+# Instrumentation Support
+#
+CONFIG_PROFILING=y
+CONFIG_OPROFILE=m
+CONFIG_KPROBES=y
+
+#
+# Kernel hacking
+#
+CONFIG_TRACE_IRQFLAGS_SUPPORT=y
+# CONFIG_PRINTK_TIME is not set
+CONFIG_ENABLE_MUST_CHECK=y
+CONFIG_MAGIC_SYSRQ=y
+# CONFIG_UNUSED_SYMBOLS is not set
+CONFIG_DEBUG_FS=y
+CONFIG_HEADERS_CHECK=y
+CONFIG_DEBUG_KERNEL=y
+# CONFIG_DEBUG_SHIRQ is not set
+CONFIG_DETECT_SOFTLOCKUP=y
+CONFIG_SCHEDSTATS=y
+CONFIG_TIMER_STATS=y
+# CONFIG_DEBUG_SLAB is not set
+# CONFIG_DEBUG_RT_MUTEXES is not set
+# CONFIG_RT_MUTEX_TESTER is not set
+# CONFIG_DEBUG_SPINLOCK is not set
+# CONFIG_DEBUG_MUTEXES is not set
+# CONFIG_DEBUG_LOCK_ALLOC is not set
+# CONFIG_PROVE_LOCKING is not set
+CONFIG_DEBUG_SPINLOCK_SLEEP=y
+# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
+# CONFIG_DEBUG_KOBJECT is not set
+CONFIG_DEBUG_BUGVERBOSE=y
+CONFIG_DEBUG_INFO=y
+# CONFIG_DEBUG_VM is not set
+CONFIG_DEBUG_LIST=y
+# CONFIG_FRAME_POINTER is not set
+# CONFIG_FORCED_INLINING is not set
+# CONFIG_RCU_TORTURE_TEST is not set
+# CONFIG_LKDTM is not set
+# CONFIG_FAULT_INJECTION is not set
+CONFIG_DEBUG_RODATA=y
+# CONFIG_IOMMU_DEBUG is not set
+CONFIG_DEBUG_STACKOVERFLOW=y
+CONFIG_DEBUG_STACK_USAGE=y
+
+#
+# Linux VServer
+#
+CONFIG_VSERVER_FILESHARING=y
+CONFIG_VSERVER_AUTO_LBACK=y
+# CONFIG_VSERVER_AUTO_SINGLE is not set
+CONFIG_VSERVER_COWBL=y
+# CONFIG_VSERVER_VTIME is not set
+# CONFIG_VSERVER_DEVICE is not set
+# CONFIG_VSERVER_PROC_SECURE is not set
+CONFIG_VSERVER_HARDCPU=y
+CONFIG_VSERVER_IDLETIME=y
+# CONFIG_VSERVER_IDLELIMIT is not set
+# CONFIG_TAGGING_NONE is not set
+# CONFIG_TAGGING_UID16 is not set
+# CONFIG_TAGGING_GID16 is not set
+CONFIG_TAGGING_ID24=y
+# CONFIG_TAGGING_INTERN is not set
+# CONFIG_TAG_NFSD is not set
+# CONFIG_VSERVER_PRIVACY is not set
+CONFIG_VSERVER_CONTEXTS=768
+CONFIG_VSERVER_WARN=y
+# CONFIG_VSERVER_DEBUG is not set
+CONFIG_VSERVER=y
+CONFIG_VSERVER_SECURITY=y
+
+#
+# Security options
+#
+CONFIG_SECURITY=y
+CONFIG_SECURITY_NETWORK=y
+CONFIG_SECURITY_NETWORK_XFRM=y
+CONFIG_SECURITY_CAPABILITIES=y
+# CONFIG_SECURITY_ROOTPLUG is not set
+
+#
+# Cryptographic options
+#
+CONFIG_CRYPTO=y
+CONFIG_CRYPTO_ALGAPI=y
+CONFIG_CRYPTO_BLKCIPHER=m
+CONFIG_CRYPTO_HASH=y
+CONFIG_CRYPTO_MANAGER=y
+CONFIG_CRYPTO_HMAC=y
+CONFIG_CRYPTO_XCBC=m
+CONFIG_CRYPTO_NULL=m
+CONFIG_CRYPTO_MD4=m
+CONFIG_CRYPTO_MD5=y
+CONFIG_CRYPTO_SHA1=y
+CONFIG_CRYPTO_SHA256=m
+CONFIG_CRYPTO_SHA512=m
+CONFIG_CRYPTO_WP512=m
+CONFIG_CRYPTO_TGR192=m
+CONFIG_CRYPTO_GF128MUL=m
+CONFIG_CRYPTO_ECB=m
+CONFIG_CRYPTO_CBC=m
+CONFIG_CRYPTO_PCBC=m
+CONFIG_CRYPTO_LRW=m
+# CONFIG_CRYPTO_CRYPTD is not set
+CONFIG_CRYPTO_DES=m
+CONFIG_CRYPTO_FCRYPT=m
+CONFIG_CRYPTO_BLOWFISH=m
+CONFIG_CRYPTO_TWOFISH=m
+CONFIG_CRYPTO_TWOFISH_COMMON=m
+CONFIG_CRYPTO_TWOFISH_X86_64=m
+CONFIG_CRYPTO_SERPENT=m
+CONFIG_CRYPTO_AES=m
+CONFIG_CRYPTO_AES_X86_64=m
+CONFIG_CRYPTO_CAST5=m
+CONFIG_CRYPTO_CAST6=m
+CONFIG_CRYPTO_TEA=m
+CONFIG_CRYPTO_ARC4=m
+CONFIG_CRYPTO_KHAZAD=m
+CONFIG_CRYPTO_ANUBIS=m
+CONFIG_CRYPTO_DEFLATE=m
+CONFIG_CRYPTO_MICHAEL_MIC=m
+CONFIG_CRYPTO_CRC32C=m
+CONFIG_CRYPTO_CAMELLIA=m
+CONFIG_CRYPTO_TEST=m
+
+#
+# Hardware crypto devices
+#
+
+#
+# Library routines
+#
+CONFIG_BITREVERSE=y
+CONFIG_CRC_CCITT=m
+CONFIG_CRC16=m
+CONFIG_CRC_ITU_T=m
+CONFIG_CRC32=y
+CONFIG_LIBCRC32C=m
+CONFIG_ZLIB_INFLATE=y
+CONFIG_ZLIB_DEFLATE=m
+CONFIG_TEXTSEARCH=y
+CONFIG_TEXTSEARCH_KMP=m
+CONFIG_TEXTSEARCH_BM=m
+CONFIG_TEXTSEARCH_FSM=m
+CONFIG_PLIST=y
+CONFIG_HAS_IOMEM=y
+CONFIG_HAS_IOPORT=y
+CONFIG_HAS_DMA=y
similarity index 100%
rename from configs/kompare
rename to kompare
similarity index 100%
rename from configs/kread
rename to kread
diff --git a/linux-2.6-100-build-nonintconfig.patch b/linux-2.6-100-build-nonintconfig.patch
new file mode 100644 (file)
index 0000000..1f51ca1
--- /dev/null
@@ -0,0 +1,112 @@
+diff -Nurp linux-2.6.22.noarch.orig/scripts/kconfig/conf.c linux-2.6.22.noarch/scripts/kconfig/conf.c
+--- linux-2.6.22.noarch.orig/scripts/kconfig/conf.c    2007-10-11 20:51:33.000000000 +0200
++++ linux-2.6.22.noarch/scripts/kconfig/conf.c 2007-10-11 20:56:30.000000000 +0200
+@@ -21,6 +21,8 @@ enum {
+       ask_all,
+       ask_new,
+       ask_silent,
++      dont_ask,
++      dont_ask_dont_tell,
+       set_default,
+       set_yes,
+       set_mod,
+@@ -37,6 +39,8 @@ static struct menu *rootEntry;
+ static char nohelp_text[] = N_("Sorry, no help available for this option yet.\n");
++static int return_value = 0;
++
+ static void strip(char *str)
+ {
+       char *p = str;
+@@ -103,6 +107,13 @@ static int conf_askvalue(struct symbol *
+               fflush(stdout);
+               fgets(line, 128, stdin);
+               return 1;
++      case dont_ask:
++              if (!sym_has_value(sym)) {
++                      fprintf(stderr, "CONFIG_%s\n", sym->name);
++                      return_value++;
++              }
++      case dont_ask_dont_tell:
++              return 1;
+       case set_default:
+               printf("%s\n", def);
+               return 1;
+@@ -349,6 +360,11 @@ static int conf_choice(struct menu *menu
+                       printf("?");
+               printf("]: ");
+               switch (input_mode) {
++              case dont_ask:
++              case dont_ask_dont_tell:
++                      cnt = def;
++                      printf("%d\n", cnt);
++                      break;
+               case ask_new:
+               case ask_silent:
+                       if (!is_new) {
+@@ -485,6 +501,10 @@ static void check_conf(struct menu *menu
+                       if (!conf_cnt++)
+                               printf(_("*\n* Restart config...\n*\n"));
+                       rootEntry = menu_get_parent_menu(menu);
++                      if (input_mode == dont_ask
++                          || input_mode == dont_ask_dont_tell)
++                              fprintf(stderr,"CONFIG_%s\n",sym->name);
++                      else
+                       conf(rootEntry);
+               }
+       }
+@@ -504,6 +524,12 @@ int main(int ac, char **av)
+               case 'o':
+                       input_mode = ask_new;
+                       break;
++              case 'b':
++                      input_mode = dont_ask;
++                      break;
++              case 'B':
++                      input_mode = dont_ask_dont_tell;
++                      break;
+               case 's':
+                       input_mode = ask_silent;
+                       valid_stdin = isatty(0) && isatty(1) && isatty(2);
+@@ -570,6 +596,8 @@ int main(int ac, char **av)
+               }
+       case ask_all:
+       case ask_new:
++      case dont_ask:
++      case dont_ask_dont_tell:
+               conf_read(NULL);
+               break;
+       case set_no:
+@@ -616,7 +644,8 @@ int main(int ac, char **av)
+       do {
+               conf_cnt = 0;
+               check_conf(&rootmenu);
+-      } while (conf_cnt);
++      } while (conf_cnt && (input_mode != dont_ask
++                            && input_mode != dont_ask_dont_tell));
+       if (conf_write(NULL)) {
+               fprintf(stderr, _("\n*** Error during writing of the kernel configuration.\n\n"));
+               return 1;
+@@ -627,5 +656,5 @@ skip_check:
+               return 1;
+       }
+-      return 0;
++      return return_value;
+ }
+diff -Nurp linux-2.6.22.noarch.orig/scripts/kconfig/Makefile linux-2.6.22.noarch/scripts/kconfig/Makefile
+--- linux-2.6.22.noarch.orig/scripts/kconfig/Makefile  2007-07-09 01:32:17.000000000 +0200
++++ linux-2.6.22.noarch/scripts/kconfig/Makefile       2007-10-11 20:52:11.000000000 +0200
+@@ -22,6 +22,11 @@ oldconfig: $(obj)/conf
+ silentoldconfig: $(obj)/conf
+       $< -s arch/$(ARCH)/Kconfig
++nonint_oldconfig: $(obj)/conf
++      $< -b arch/$(ARCH)/Kconfig
++loose_nonint_oldconfig: $(obj)/conf
++      $< -B arch/$(ARCH)/Kconfig
++
+ update-po-config: $(obj)/kxgettext
+       xgettext --default-domain=linux \
+           --add-comments --keyword=_ --keyword=N_ \
diff --git a/linux-2.6-250-ipsets.patch b/linux-2.6-250-ipsets.patch
new file mode 100644 (file)
index 0000000..f295e3a
--- /dev/null
@@ -0,0 +1,7691 @@
+diff -Nurp linux-2.6.22.10-vs2.3.0.29-pl02/include/linux/netfilter_ipv4/ip_set.h linux-2.6.22.10-vs2.3.0.29-pl03/include/linux/netfilter_ipv4/ip_set.h
+--- linux-2.6.22.10-vs2.3.0.29-pl02/include/linux/netfilter_ipv4/ip_set.h      1969-12-31 19:00:00.000000000 -0500
++++ linux-2.6.22.10-vs2.3.0.29-pl03/include/linux/netfilter_ipv4/ip_set.h      2007-11-14 14:12:25.000000000 -0500
+@@ -0,0 +1,498 @@
++#ifndef _IP_SET_H
++#define _IP_SET_H
++
++/* Copyright (C) 2000-2002 Joakim Axelsson <gozem@linux.nu>
++ *                         Patrick Schaaf <bof@bof.de>
++ *                         Martin Josefsson <gandalf@wlug.westbo.se>
++ * Copyright (C) 2003-2004 Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License version 2 as
++ * published by the Free Software Foundation.  
++ */
++
++#if 0
++#define IP_SET_DEBUG
++#endif
++
++/*
++ * A sockopt of such quality has hardly ever been seen before on the open
++ * market!  This little beauty, hardly ever used: above 64, so it's
++ * traditionally used for firewalling, not touched (even once!) by the
++ * 2.0, 2.2 and 2.4 kernels!
++ *
++ * Comes with its own certificate of authenticity, valid anywhere in the
++ * Free world!
++ *
++ * Rusty, 19.4.2000
++ */
++#define SO_IP_SET             83
++
++/*
++ * Heavily modify by Joakim Axelsson 08.03.2002
++ * - Made it more modulebased
++ *
++ * Additional heavy modifications by Jozsef Kadlecsik 22.02.2004
++ * - bindings added
++ * - in order to "deal with" backward compatibility, renamed to ipset
++ */
++
++/* 
++ * Used so that the kernel module and ipset-binary can match their versions 
++ */
++#define IP_SET_PROTOCOL_VERSION 2
++
++#define IP_SET_MAXNAMELEN 32  /* set names and set typenames */
++
++/* Lets work with our own typedef for representing an IP address.
++ * We hope to make the code more portable, possibly to IPv6...
++ *
++ * The representation works in HOST byte order, because most set types
++ * will perform arithmetic operations and compare operations.
++ * 
++ * For now the type is an uint32_t.
++ *
++ * Make sure to ONLY use the functions when translating and parsing
++ * in order to keep the host byte order and make it more portable:
++ *  parse_ip()
++ *  parse_mask()
++ *  parse_ipandmask()
++ *  ip_tostring()
++ * (Joakim: where are they???)
++ */
++
++typedef uint32_t ip_set_ip_t;
++
++/* Sets are identified by an id in kernel space. Tweak with ip_set_id_t
++ * and IP_SET_INVALID_ID if you want to increase the max number of sets.
++ */
++typedef uint16_t ip_set_id_t;
++
++#define IP_SET_INVALID_ID     65535
++
++/* How deep we follow bindings */
++#define IP_SET_MAX_BINDINGS   6
++
++/*
++ * Option flags for kernel operations (ipt_set_info)
++ */
++#define IPSET_SRC             0x01    /* Source match/add */
++#define IPSET_DST             0x02    /* Destination match/add */
++#define IPSET_MATCH_INV               0x04    /* Inverse matching */
++
++/*
++ * Set features
++ */
++#define IPSET_TYPE_IP         0x01    /* IP address type of set */
++#define IPSET_TYPE_PORT               0x02    /* Port type of set */
++#define IPSET_DATA_SINGLE     0x04    /* Single data storage */
++#define IPSET_DATA_DOUBLE     0x08    /* Double data storage */
++
++/* Reserved keywords */
++#define IPSET_TOKEN_DEFAULT   ":default:"
++#define IPSET_TOKEN_ALL               ":all:"
++
++/* SO_IP_SET operation constants, and their request struct types.
++ *
++ * Operation ids:
++ *      0-99:  commands with version checking
++ *    100-199: add/del/test/bind/unbind
++ *    200-299: list, save, restore
++ */
++
++/* Single shot operations: 
++ * version, create, destroy, flush, rename and swap 
++ *
++ * Sets are identified by name.
++ */
++
++#define IP_SET_REQ_STD                \
++      unsigned op;            \
++      unsigned version;       \
++      char name[IP_SET_MAXNAMELEN]
++
++#define IP_SET_OP_CREATE      0x00000001      /* Create a new (empty) set */
++struct ip_set_req_create {
++      IP_SET_REQ_STD;
++      char typename[IP_SET_MAXNAMELEN];
++};
++
++#define IP_SET_OP_DESTROY     0x00000002      /* Remove a (empty) set */
++struct ip_set_req_std {
++      IP_SET_REQ_STD;
++};
++
++#define IP_SET_OP_FLUSH               0x00000003      /* Remove all IPs in a set */
++/* Uses ip_set_req_std */
++
++#define IP_SET_OP_RENAME      0x00000004      /* Rename a set */
++/* Uses ip_set_req_create */
++
++#define IP_SET_OP_SWAP                0x00000005      /* Swap two sets */
++/* Uses ip_set_req_create */
++
++union ip_set_name_index {
++      char name[IP_SET_MAXNAMELEN];
++      ip_set_id_t index;
++};
++
++#define IP_SET_OP_GET_BYNAME  0x00000006      /* Get set index by name */
++struct ip_set_req_get_set {
++      unsigned op;
++      unsigned version;
++      union ip_set_name_index set;
++};
++
++#define IP_SET_OP_GET_BYINDEX 0x00000007      /* Get set name by index */
++/* Uses ip_set_req_get_set */
++
++#define IP_SET_OP_VERSION     0x00000100      /* Ask kernel version */
++struct ip_set_req_version {
++      unsigned op;
++      unsigned version;
++};
++
++/* Double shots operations: 
++ * add, del, test, bind and unbind.
++ *
++ * First we query the kernel to get the index and type of the target set,
++ * then issue the command. Validity of IP is checked in kernel in order
++ * to minimalize sockopt operations.
++ */
++
++/* Get minimal set data for add/del/test/bind/unbind IP */
++#define IP_SET_OP_ADT_GET     0x00000010      /* Get set and type */
++struct ip_set_req_adt_get {
++      unsigned op;
++      unsigned version;
++      union ip_set_name_index set;
++      char typename[IP_SET_MAXNAMELEN];
++};
++
++#define IP_SET_REQ_BYINDEX    \
++      unsigned op;            \
++      ip_set_id_t index;
++
++struct ip_set_req_adt {
++      IP_SET_REQ_BYINDEX;
++};
++
++#define IP_SET_OP_ADD_IP      0x00000101      /* Add an IP to a set */
++/* Uses ip_set_req_adt, with type specific addage */
++
++#define IP_SET_OP_DEL_IP      0x00000102      /* Remove an IP from a set */
++/* Uses ip_set_req_adt, with type specific addage */
++
++#define IP_SET_OP_TEST_IP     0x00000103      /* Test an IP in a set */
++/* Uses ip_set_req_adt, with type specific addage */
++
++#define IP_SET_OP_BIND_SET    0x00000104      /* Bind an IP to a set */
++/* Uses ip_set_req_bind, with type specific addage */
++struct ip_set_req_bind {
++      IP_SET_REQ_BYINDEX;
++      char binding[IP_SET_MAXNAMELEN];
++};
++
++#define IP_SET_OP_UNBIND_SET  0x00000105      /* Unbind an IP from a set */
++/* Uses ip_set_req_bind, with type speficic addage 
++ * index = 0 means unbinding for all sets */
++
++#define IP_SET_OP_TEST_BIND_SET       0x00000106      /* Test binding an IP to a set */
++/* Uses ip_set_req_bind, with type specific addage */
++
++/* Multiple shots operations: list, save, restore.
++ *
++ * - check kernel version and query the max number of sets
++ * - get the basic information on all sets
++ *   and size required for the next step
++ * - get actual set data: header, data, bindings
++ */
++
++/* Get max_sets and the index of a queried set
++ */
++#define IP_SET_OP_MAX_SETS    0x00000020
++struct ip_set_req_max_sets {
++      unsigned op;
++      unsigned version;
++      ip_set_id_t max_sets;           /* max_sets */
++      ip_set_id_t sets;               /* real number of sets */
++      union ip_set_name_index set;    /* index of set if name used */
++};
++
++/* Get the id and name of the sets plus size for next step */
++#define IP_SET_OP_LIST_SIZE   0x00000201
++#define IP_SET_OP_SAVE_SIZE   0x00000202
++struct ip_set_req_setnames {
++      unsigned op;
++      ip_set_id_t index;              /* set to list/save */
++      size_t size;                    /* size to get setdata/bindings */
++      /* followed by sets number of struct ip_set_name_list */
++};
++
++struct ip_set_name_list {
++      char name[IP_SET_MAXNAMELEN];
++      char typename[IP_SET_MAXNAMELEN];
++      ip_set_id_t index;
++      ip_set_id_t id;
++};
++
++/* The actual list operation */
++#define IP_SET_OP_LIST                0x00000203
++struct ip_set_req_list {
++      IP_SET_REQ_BYINDEX;
++      /* sets number of struct ip_set_list in reply */ 
++};
++
++struct ip_set_list {
++      ip_set_id_t index;
++      ip_set_id_t binding;
++      u_int32_t ref;
++      size_t header_size;     /* Set header data of header_size */
++      size_t members_size;    /* Set members data of members_size */
++      size_t bindings_size;   /* Set bindings data of bindings_size */
++};
++
++struct ip_set_hash_list {
++      ip_set_ip_t ip;
++      ip_set_id_t binding;
++};
++
++/* The save operation */
++#define IP_SET_OP_SAVE                0x00000204
++/* Uses ip_set_req_list, in the reply replaced by
++ * sets number of struct ip_set_save plus a marker
++ * ip_set_save followed by ip_set_hash_save structures.
++ */
++struct ip_set_save {
++      ip_set_id_t index;
++      ip_set_id_t binding;
++      size_t header_size;     /* Set header data of header_size */
++      size_t members_size;    /* Set members data of members_size */
++};
++
++/* At restoring, ip == 0 means default binding for the given set: */
++struct ip_set_hash_save {
++      ip_set_ip_t ip;
++      ip_set_id_t id;
++      ip_set_id_t binding;
++};
++
++/* The restore operation */
++#define IP_SET_OP_RESTORE     0x00000205
++/* Uses ip_set_req_setnames followed by ip_set_restore structures
++ * plus a marker ip_set_restore, followed by ip_set_hash_save 
++ * structures.
++ */
++struct ip_set_restore {
++      char name[IP_SET_MAXNAMELEN];
++      char typename[IP_SET_MAXNAMELEN];
++      ip_set_id_t index;
++      size_t header_size;     /* Create data of header_size */
++      size_t members_size;    /* Set members data of members_size */
++};
++
++static inline int bitmap_bytes(ip_set_ip_t a, ip_set_ip_t b)
++{
++      return 4 * ((((b - a + 8) / 8) + 3) / 4);
++}
++
++#ifdef __KERNEL__
++
++#define ip_set_printk(format, args...)                        \
++      do {                                                    \
++              printk("%s: %s: ", __FILE__, __FUNCTION__);     \
++              printk(format "\n" , ## args);                  \
++      } while (0)
++
++#if defined(IP_SET_DEBUG)
++#define DP(format, args...)                                   \
++      do {                                                    \
++              printk("%s: %s (DBG): ", __FILE__, __FUNCTION__);\
++              printk(format "\n" , ## args);                  \
++      } while (0)
++#define IP_SET_ASSERT(x)                                      \
++      do {                                                    \
++              if (!(x))                                       \
++                      printk("IP_SET_ASSERT: %s:%i(%s)\n",    \
++                              __FILE__, __LINE__, __FUNCTION__); \
++      } while (0)
++#else
++#define DP(format, args...)
++#define IP_SET_ASSERT(x)
++#endif
++
++struct ip_set;
++
++/*
++ * The ip_set_type definition - one per set type, e.g. "ipmap".
++ *
++ * Each individual set has a pointer, set->type, going to one
++ * of these structures. Function pointers inside the structure implement
++ * the real behaviour of the sets.
++ *
++ * If not mentioned differently, the implementation behind the function
++ * pointers of a set_type, is expected to return 0 if ok, and a negative
++ * errno (e.g. -EINVAL) on error.
++ */
++struct ip_set_type {
++      struct list_head list;  /* next in list of set types */
++
++      /* test for IP in set (kernel: iptables -m set src|dst)
++       * return 0 if not in set, 1 if in set.
++       */
++      int (*testip_kernel) (struct ip_set *set,
++                            const struct sk_buff * skb, 
++                            ip_set_ip_t *ip,
++                            const u_int32_t *flags,
++                            unsigned char index);
++
++      /* test for IP in set (userspace: ipset -T set IP)
++       * return 0 if not in set, 1 if in set.
++       */
++      int (*testip) (struct ip_set *set,
++                     const void *data, size_t size,
++                     ip_set_ip_t *ip);
++
++      /*
++       * Size of the data structure passed by when
++       * adding/deletin/testing an entry.
++       */
++      size_t reqsize;
++
++      /* Add IP into set (userspace: ipset -A set IP)
++       * Return -EEXIST if the address is already in the set,
++       * and -ERANGE if the address lies outside the set bounds.
++       * If the address was not already in the set, 0 is returned.
++       */
++      int (*addip) (struct ip_set *set, 
++                    const void *data, size_t size,
++                    ip_set_ip_t *ip);
++
++      /* Add IP into set (kernel: iptables ... -j SET set src|dst)
++       * Return -EEXIST if the address is already in the set,
++       * and -ERANGE if the address lies outside the set bounds.
++       * If the address was not already in the set, 0 is returned.
++       */
++      int (*addip_kernel) (struct ip_set *set,
++                           const struct sk_buff * skb, 
++                           ip_set_ip_t *ip,
++                           const u_int32_t *flags,
++                           unsigned char index);
++
++      /* remove IP from set (userspace: ipset -D set --entry x)
++       * Return -EEXIST if the address is NOT in the set,
++       * and -ERANGE if the address lies outside the set bounds.
++       * If the address really was in the set, 0 is returned.
++       */
++      int (*delip) (struct ip_set *set, 
++                    const void *data, size_t size,
++                    ip_set_ip_t *ip);
++
++      /* remove IP from set (kernel: iptables ... -j SET --entry x)
++       * Return -EEXIST if the address is NOT in the set,
++       * and -ERANGE if the address lies outside the set bounds.
++       * If the address really was in the set, 0 is returned.
++       */
++      int (*delip_kernel) (struct ip_set *set,
++                           const struct sk_buff * skb, 
++                           ip_set_ip_t *ip,
++                           const u_int32_t *flags,
++                           unsigned char index);
++
++      /* new set creation - allocated type specific items
++       */
++      int (*create) (struct ip_set *set,
++                     const void *data, size_t size);
++
++      /* retry the operation after successfully tweaking the set
++       */
++      int (*retry) (struct ip_set *set);
++
++      /* set destruction - free type specific items
++       * There is no return value.
++       * Can be called only when child sets are destroyed.
++       */
++      void (*destroy) (struct ip_set *set);
++
++      /* set flushing - reset all bits in the set, or something similar.
++       * There is no return value.
++       */
++      void (*flush) (struct ip_set *set);
++
++      /* Listing: size needed for header
++       */
++      size_t header_size;
++
++      /* Listing: Get the header
++       *
++       * Fill in the information in "data".
++       * This function is always run after list_header_size() under a 
++       * writelock on the set. Therefor is the length of "data" always 
++       * correct. 
++       */
++      void (*list_header) (const struct ip_set *set, 
++                           void *data);
++
++      /* Listing: Get the size for the set members
++       */
++      int (*list_members_size) (const struct ip_set *set);
++
++      /* Listing: Get the set members
++       *
++       * Fill in the information in "data".
++       * This function is always run after list_member_size() under a 
++       * writelock on the set. Therefor is the length of "data" always 
++       * correct. 
++       */
++      void (*list_members) (const struct ip_set *set,
++                            void *data);
++
++      char typename[IP_SET_MAXNAMELEN];
++      unsigned char features;
++      int protocol_version;
++
++      /* Set this to THIS_MODULE if you are a module, otherwise NULL */
++      struct module *me;
++};
++
++extern int ip_set_register_set_type(struct ip_set_type *set_type);
++extern void ip_set_unregister_set_type(struct ip_set_type *set_type);
++
++/* A generic ipset */
++struct ip_set {
++      char name[IP_SET_MAXNAMELEN];   /* the name of the set */
++      rwlock_t lock;                  /* lock for concurrency control */
++      ip_set_id_t id;                 /* set id for swapping */
++      ip_set_id_t binding;            /* default binding for the set */
++      atomic_t ref;                   /* in kernel and in hash references */
++      struct ip_set_type *type;       /* the set types */
++      void *data;                     /* pooltype specific data */
++};
++
++/* Structure to bind set elements to sets */
++struct ip_set_hash {
++      struct list_head list;          /* list of clashing entries in hash */
++      ip_set_ip_t ip;                 /* ip from set */
++      ip_set_id_t id;                 /* set id */
++      ip_set_id_t binding;            /* set we bind the element to */
++};
++
++/* register and unregister set references */
++extern ip_set_id_t ip_set_get_byname(const char name[IP_SET_MAXNAMELEN]);
++extern ip_set_id_t ip_set_get_byindex(ip_set_id_t id);
++extern void ip_set_put(ip_set_id_t id);
++
++/* API for iptables set match, and SET target */
++extern void ip_set_addip_kernel(ip_set_id_t id,
++                              const struct sk_buff *skb,
++                              const u_int32_t *flags);
++extern void ip_set_delip_kernel(ip_set_id_t id,
++                              const struct sk_buff *skb,
++                              const u_int32_t *flags);
++extern int ip_set_testip_kernel(ip_set_id_t id,
++                              const struct sk_buff *skb,
++                              const u_int32_t *flags);
++
++#endif                                /* __KERNEL__ */
++
++#endif /*_IP_SET_H*/
+diff -Nurp linux-2.6.22.10-vs2.3.0.29-pl02/include/linux/netfilter_ipv4/ip_set_iphash.h linux-2.6.22.10-vs2.3.0.29-pl03/include/linux/netfilter_ipv4/ip_set_iphash.h
+--- linux-2.6.22.10-vs2.3.0.29-pl02/include/linux/netfilter_ipv4/ip_set_iphash.h       1969-12-31 19:00:00.000000000 -0500
++++ linux-2.6.22.10-vs2.3.0.29-pl03/include/linux/netfilter_ipv4/ip_set_iphash.h       2007-11-14 14:12:25.000000000 -0500
+@@ -0,0 +1,30 @@
++#ifndef __IP_SET_IPHASH_H
++#define __IP_SET_IPHASH_H
++
++#include <linux/netfilter_ipv4/ip_set.h>
++
++#define SETTYPE_NAME "iphash"
++#define MAX_RANGE 0x0000FFFF
++
++struct ip_set_iphash {
++      ip_set_ip_t *members;           /* the iphash proper */
++      uint32_t elements;              /* number of elements */
++      uint32_t hashsize;              /* hash size */
++      uint16_t probes;                /* max number of probes  */
++      uint16_t resize;                /* resize factor in percent */
++      ip_set_ip_t netmask;            /* netmask */
++      void *initval[0];               /* initvals for jhash_1word */
++};
++
++struct ip_set_req_iphash_create {
++      uint32_t hashsize;
++      uint16_t probes;
++      uint16_t resize;
++      ip_set_ip_t netmask;
++};
++
++struct ip_set_req_iphash {
++      ip_set_ip_t ip;
++};
++
++#endif        /* __IP_SET_IPHASH_H */
+diff -Nurp linux-2.6.22.10-vs2.3.0.29-pl02/include/linux/netfilter_ipv4/ip_set_ipmap.h linux-2.6.22.10-vs2.3.0.29-pl03/include/linux/netfilter_ipv4/ip_set_ipmap.h
+--- linux-2.6.22.10-vs2.3.0.29-pl02/include/linux/netfilter_ipv4/ip_set_ipmap.h        1969-12-31 19:00:00.000000000 -0500
++++ linux-2.6.22.10-vs2.3.0.29-pl03/include/linux/netfilter_ipv4/ip_set_ipmap.h        2007-11-14 14:12:25.000000000 -0500
+@@ -0,0 +1,56 @@
++#ifndef __IP_SET_IPMAP_H
++#define __IP_SET_IPMAP_H
++
++#include <linux/netfilter_ipv4/ip_set.h>
++
++#define SETTYPE_NAME "ipmap"
++#define MAX_RANGE 0x0000FFFF
++
++struct ip_set_ipmap {
++      void *members;                  /* the ipmap proper */
++      ip_set_ip_t first_ip;           /* host byte order, included in range */
++      ip_set_ip_t last_ip;            /* host byte order, included in range */
++      ip_set_ip_t netmask;            /* subnet netmask */
++      ip_set_ip_t sizeid;             /* size of set in IPs */
++      ip_set_ip_t hosts;              /* number of hosts in a subnet */
++};
++
++struct ip_set_req_ipmap_create {
++      ip_set_ip_t from;
++      ip_set_ip_t to;
++      ip_set_ip_t netmask;
++};
++
++struct ip_set_req_ipmap {
++      ip_set_ip_t ip;
++};
++
++unsigned int
++mask_to_bits(ip_set_ip_t mask)
++{
++      unsigned int bits = 32;
++      ip_set_ip_t maskaddr;
++      
++      if (mask == 0xFFFFFFFF)
++              return bits;
++      
++      maskaddr = 0xFFFFFFFE;
++      while (--bits >= 0 && maskaddr != mask)
++              maskaddr <<= 1;
++      
++      return bits;
++}
++
++ip_set_ip_t
++range_to_mask(ip_set_ip_t from, ip_set_ip_t to, unsigned int *bits)
++{
++      ip_set_ip_t mask = 0xFFFFFFFE;
++      
++      *bits = 32;
++      while (--(*bits) >= 0 && mask && (to & mask) != from)
++              mask <<= 1;
++              
++      return mask;
++}
++      
++#endif /* __IP_SET_IPMAP_H */
+diff -Nurp linux-2.6.22.10-vs2.3.0.29-pl02/include/linux/netfilter_ipv4/ip_set_ipporthash.h linux-2.6.22.10-vs2.3.0.29-pl03/include/linux/netfilter_ipv4/ip_set_ipporthash.h
+--- linux-2.6.22.10-vs2.3.0.29-pl02/include/linux/netfilter_ipv4/ip_set_ipporthash.h   1969-12-31 19:00:00.000000000 -0500
++++ linux-2.6.22.10-vs2.3.0.29-pl03/include/linux/netfilter_ipv4/ip_set_ipporthash.h   2007-11-14 14:12:25.000000000 -0500
+@@ -0,0 +1,34 @@
++#ifndef __IP_SET_IPPORTHASH_H
++#define __IP_SET_IPPORTHASH_H
++
++#include <linux/netfilter_ipv4/ip_set.h>
++
++#define SETTYPE_NAME "ipporthash"
++#define MAX_RANGE 0x0000FFFF
++#define INVALID_PORT  (MAX_RANGE + 1)
++
++struct ip_set_ipporthash {
++      ip_set_ip_t *members;           /* the ipporthash proper */
++      uint32_t elements;              /* number of elements */
++      uint32_t hashsize;              /* hash size */
++      uint16_t probes;                /* max number of probes  */
++      uint16_t resize;                /* resize factor in percent */
++      ip_set_ip_t first_ip;           /* host byte order, included in range */
++      ip_set_ip_t last_ip;            /* host byte order, included in range */
++      void *initval[0];               /* initvals for jhash_1word */
++};
++
++struct ip_set_req_ipporthash_create {
++      uint32_t hashsize;
++      uint16_t probes;
++      uint16_t resize;
++      ip_set_ip_t from;
++      ip_set_ip_t to;
++};
++
++struct ip_set_req_ipporthash {
++      ip_set_ip_t ip;
++      ip_set_ip_t port;
++};
++
++#endif        /* __IP_SET_IPPORTHASH_H */
+diff -Nurp linux-2.6.22.10-vs2.3.0.29-pl02/include/linux/netfilter_ipv4/ip_set_iptree.h linux-2.6.22.10-vs2.3.0.29-pl03/include/linux/netfilter_ipv4/ip_set_iptree.h
+--- linux-2.6.22.10-vs2.3.0.29-pl02/include/linux/netfilter_ipv4/ip_set_iptree.h       1969-12-31 19:00:00.000000000 -0500
++++ linux-2.6.22.10-vs2.3.0.29-pl03/include/linux/netfilter_ipv4/ip_set_iptree.h       2007-11-14 14:12:25.000000000 -0500
+@@ -0,0 +1,40 @@
++#ifndef __IP_SET_IPTREE_H
++#define __IP_SET_IPTREE_H
++
++#include <linux/netfilter_ipv4/ip_set.h>
++
++#define SETTYPE_NAME "iptree"
++#define MAX_RANGE 0x0000FFFF
++
++struct ip_set_iptreed {
++      unsigned long expires[256];             /* x.x.x.ADDR */
++};
++
++struct ip_set_iptreec {
++      struct ip_set_iptreed *tree[256];       /* x.x.ADDR.* */
++};
++
++struct ip_set_iptreeb {
++      struct ip_set_iptreec *tree[256];       /* x.ADDR.*.* */
++};
++
++struct ip_set_iptree {
++      unsigned int timeout;
++      unsigned int gc_interval;
++#ifdef __KERNEL__
++      uint32_t elements;              /* number of elements */
++      struct timer_list gc;
++      struct ip_set_iptreeb *tree[256];       /* ADDR.*.*.* */
++#endif
++};
++
++struct ip_set_req_iptree_create {
++      unsigned int timeout;
++};
++
++struct ip_set_req_iptree {
++      ip_set_ip_t ip;
++      unsigned int timeout;
++};
++
++#endif        /* __IP_SET_IPTREE_H */
+diff -Nurp linux-2.6.22.10-vs2.3.0.29-pl02/include/linux/netfilter_ipv4/ip_set_iptreemap.h linux-2.6.22.10-vs2.3.0.29-pl03/include/linux/netfilter_ipv4/ip_set_iptreemap.h
+--- linux-2.6.22.10-vs2.3.0.29-pl02/include/linux/netfilter_ipv4/ip_set_iptreemap.h    1969-12-31 19:00:00.000000000 -0500
++++ linux-2.6.22.10-vs2.3.0.29-pl03/include/linux/netfilter_ipv4/ip_set_iptreemap.h    2007-11-14 14:12:25.000000000 -0500
+@@ -0,0 +1,40 @@
++#ifndef __IP_SET_IPTREEMAP_H
++#define __IP_SET_IPTREEMAP_H
++
++#include <linux/netfilter_ipv4/ip_set.h>
++
++#define SETTYPE_NAME "iptreemap"
++
++#ifdef __KERNEL__
++struct ip_set_iptreemap_d {
++      unsigned char bitmap[32]; /* x.x.x.y */
++};
++
++struct ip_set_iptreemap_c {
++      struct ip_set_iptreemap_d *tree[256]; /* x.x.y.x */
++};
++
++struct ip_set_iptreemap_b {
++      struct ip_set_iptreemap_c *tree[256]; /* x.y.x.x */
++      unsigned char dirty[32];
++};
++#endif
++
++struct ip_set_iptreemap {
++      unsigned int gc_interval;
++#ifdef __KERNEL__
++      struct timer_list gc;
++      struct ip_set_iptreemap_b *tree[256]; /* y.x.x.x */
++#endif
++};
++
++struct ip_set_req_iptreemap_create {
++      unsigned int gc_interval;
++};
++
++struct ip_set_req_iptreemap {
++      ip_set_ip_t start;
++      ip_set_ip_t end;
++};
++
++#endif /* __IP_SET_IPTREEMAP_H */
+diff -Nurp linux-2.6.22.10-vs2.3.0.29-pl02/include/linux/netfilter_ipv4/ip_set_jhash.h linux-2.6.22.10-vs2.3.0.29-pl03/include/linux/netfilter_ipv4/ip_set_jhash.h
+--- linux-2.6.22.10-vs2.3.0.29-pl02/include/linux/netfilter_ipv4/ip_set_jhash.h        1969-12-31 19:00:00.000000000 -0500
++++ linux-2.6.22.10-vs2.3.0.29-pl03/include/linux/netfilter_ipv4/ip_set_jhash.h        2007-11-14 14:12:25.000000000 -0500
+@@ -0,0 +1,148 @@
++#ifndef _LINUX_IPSET_JHASH_H
++#define _LINUX_IPSET_JHASH_H
++
++/* This is a copy of linux/jhash.h but the types u32/u8 are changed
++ * to __u32/__u8 so that the header file can be included into
++ * userspace code as well. Jozsef Kadlecsik (kadlec@blackhole.kfki.hu)
++ */
++
++/* jhash.h: Jenkins hash support.
++ *
++ * Copyright (C) 1996 Bob Jenkins (bob_jenkins@burtleburtle.net)
++ *
++ * http://burtleburtle.net/bob/hash/
++ *
++ * These are the credits from Bob's sources:
++ *
++ * lookup2.c, by Bob Jenkins, December 1996, Public Domain.
++ * hash(), hash2(), hash3, and mix() are externally useful functions.
++ * Routines to test the hash are included if SELF_TEST is defined.
++ * You can use this free for any purpose.  It has no warranty.
++ *
++ * Copyright (C) 2003 David S. Miller (davem@redhat.com)
++ *
++ * I've modified Bob's hash to be useful in the Linux kernel, and
++ * any bugs present are surely my fault.  -DaveM
++ */
++
++/* NOTE: Arguments are modified. */
++#define __jhash_mix(a, b, c) \
++{ \
++  a -= b; a -= c; a ^= (c>>13); \
++  b -= c; b -= a; b ^= (a<<8); \
++  c -= a; c -= b; c ^= (b>>13); \
++  a -= b; a -= c; a ^= (c>>12);  \
++  b -= c; b -= a; b ^= (a<<16); \
++  c -= a; c -= b; c ^= (b>>5); \
++  a -= b; a -= c; a ^= (c>>3);  \
++  b -= c; b -= a; b ^= (a<<10); \
++  c -= a; c -= b; c ^= (b>>15); \
++}
++
++/* The golden ration: an arbitrary value */
++#define JHASH_GOLDEN_RATIO    0x9e3779b9
++
++/* The most generic version, hashes an arbitrary sequence
++ * of bytes.  No alignment or length assumptions are made about
++ * the input key.
++ */
++static inline __u32 jhash(void *key, __u32 length, __u32 initval)
++{
++      __u32 a, b, c, len;
++      __u8 *k = key;
++
++      len = length;
++      a = b = JHASH_GOLDEN_RATIO;
++      c = initval;
++
++      while (len >= 12) {
++              a += (k[0] +((__u32)k[1]<<8) +((__u32)k[2]<<16) +((__u32)k[3]<<24));
++              b += (k[4] +((__u32)k[5]<<8) +((__u32)k[6]<<16) +((__u32)k[7]<<24));
++              c += (k[8] +((__u32)k[9]<<8) +((__u32)k[10]<<16)+((__u32)k[11]<<24));
++
++              __jhash_mix(a,b,c);
++
++              k += 12;
++              len -= 12;
++      }
++
++      c += length;
++      switch (len) {
++      case 11: c += ((__u32)k[10]<<24);
++      case 10: c += ((__u32)k[9]<<16);
++      case 9 : c += ((__u32)k[8]<<8);
++      case 8 : b += ((__u32)k[7]<<24);
++      case 7 : b += ((__u32)k[6]<<16);
++      case 6 : b += ((__u32)k[5]<<8);
++      case 5 : b += k[4];
++      case 4 : a += ((__u32)k[3]<<24);
++      case 3 : a += ((__u32)k[2]<<16);
++      case 2 : a += ((__u32)k[1]<<8);
++      case 1 : a += k[0];
++      };
++
++      __jhash_mix(a,b,c);
++
++      return c;
++}
++
++/* A special optimized version that handles 1 or more of __u32s.
++ * The length parameter here is the number of __u32s in the key.
++ */
++static inline __u32 jhash2(__u32 *k, __u32 length, __u32 initval)
++{
++      __u32 a, b, c, len;
++
++      a = b = JHASH_GOLDEN_RATIO;
++      c = initval;
++      len = length;
++
++      while (len >= 3) {
++              a += k[0];
++              b += k[1];
++              c += k[2];
++              __jhash_mix(a, b, c);
++              k += 3; len -= 3;
++      }
++
++      c += length * 4;
++
++      switch (len) {
++      case 2 : b += k[1];
++      case 1 : a += k[0];
++      };
++
++      __jhash_mix(a,b,c);
++
++      return c;
++}
++
++
++/* A special ultra-optimized versions that knows they are hashing exactly
++ * 3, 2 or 1 word(s).
++ *
++ * NOTE: In partilar the "c += length; __jhash_mix(a,b,c);" normally
++ *       done at the end is not done here.
++ */
++static inline __u32 jhash_3words(__u32 a, __u32 b, __u32 c, __u32 initval)
++{
++      a += JHASH_GOLDEN_RATIO;
++      b += JHASH_GOLDEN_RATIO;
++      c += initval;
++
++      __jhash_mix(a, b, c);
++
++      return c;
++}
++
++static inline __u32 jhash_2words(__u32 a, __u32 b, __u32 initval)
++{
++      return jhash_3words(a, b, 0, initval);
++}
++
++static inline __u32 jhash_1word(__u32 a, __u32 initval)
++{
++      return jhash_3words(a, 0, 0, initval);
++}
++
++#endif /* _LINUX_IPSET_JHASH_H */
+diff -Nurp linux-2.6.22.10-vs2.3.0.29-pl02/include/linux/netfilter_ipv4/ip_set_macipmap.h linux-2.6.22.10-vs2.3.0.29-pl03/include/linux/netfilter_ipv4/ip_set_macipmap.h
+--- linux-2.6.22.10-vs2.3.0.29-pl02/include/linux/netfilter_ipv4/ip_set_macipmap.h     1969-12-31 19:00:00.000000000 -0500
++++ linux-2.6.22.10-vs2.3.0.29-pl03/include/linux/netfilter_ipv4/ip_set_macipmap.h     2007-11-14 14:12:25.000000000 -0500
+@@ -0,0 +1,38 @@
++#ifndef __IP_SET_MACIPMAP_H
++#define __IP_SET_MACIPMAP_H
++
++#include <linux/netfilter_ipv4/ip_set.h>
++
++#define SETTYPE_NAME "macipmap"
++#define MAX_RANGE 0x0000FFFF
++
++/* general flags */
++#define IPSET_MACIP_MATCHUNSET        1
++
++/* per ip flags */
++#define IPSET_MACIP_ISSET     1
++
++struct ip_set_macipmap {
++      void *members;                  /* the macipmap proper */
++      ip_set_ip_t first_ip;           /* host byte order, included in range */
++      ip_set_ip_t last_ip;            /* host byte order, included in range */
++      u_int32_t flags;
++};
++
++struct ip_set_req_macipmap_create {
++      ip_set_ip_t from;
++      ip_set_ip_t to;
++      u_int32_t flags;
++};
++
++struct ip_set_req_macipmap {
++      ip_set_ip_t ip;
++      unsigned char ethernet[ETH_ALEN];
++};
++
++struct ip_set_macip {
++      unsigned short flags;
++      unsigned char ethernet[ETH_ALEN];
++};
++
++#endif        /* __IP_SET_MACIPMAP_H */
+diff -Nurp linux-2.6.22.10-vs2.3.0.29-pl02/include/linux/netfilter_ipv4/ip_set_malloc.h linux-2.6.22.10-vs2.3.0.29-pl03/include/linux/netfilter_ipv4/ip_set_malloc.h
+--- linux-2.6.22.10-vs2.3.0.29-pl02/include/linux/netfilter_ipv4/ip_set_malloc.h       1969-12-31 19:00:00.000000000 -0500
++++ linux-2.6.22.10-vs2.3.0.29-pl03/include/linux/netfilter_ipv4/ip_set_malloc.h       2007-11-14 14:12:25.000000000 -0500
+@@ -0,0 +1,116 @@
++#ifndef _IP_SET_MALLOC_H
++#define _IP_SET_MALLOC_H
++
++#ifdef __KERNEL__
++
++/* Memory allocation and deallocation */
++static size_t max_malloc_size = 0;
++
++static inline void init_max_malloc_size(void)
++{
++#define CACHE(x) max_malloc_size = x;
++#include <linux/kmalloc_sizes.h>
++#undef CACHE
++}
++
++static inline void * ip_set_malloc(size_t bytes)
++{
++      if (bytes > max_malloc_size)
++              return vmalloc(bytes);
++      else
++              return kmalloc(bytes, GFP_KERNEL);
++}
++
++static inline void ip_set_free(void * data, size_t bytes)
++{
++      if (bytes > max_malloc_size)
++              vfree(data);
++      else
++              kfree(data);
++}
++
++struct harray {
++      size_t max_elements;
++      void *arrays[0];
++};
++
++static inline void * 
++harray_malloc(size_t hashsize, size_t typesize, int flags)
++{
++      struct harray *harray;
++      size_t max_elements, size, i, j;
++
++      if (!max_malloc_size)
++              init_max_malloc_size();
++
++      if (typesize > max_malloc_size)
++              return NULL;
++
++      max_elements = max_malloc_size/typesize;
++      size = hashsize/max_elements;
++      if (hashsize % max_elements)
++              size++;
++      
++      /* Last pointer signals end of arrays */
++      harray = kmalloc(sizeof(struct harray) + (size + 1) * sizeof(void *),
++                       flags);
++
++      if (!harray)
++              return NULL;
++      
++      for (i = 0; i < size - 1; i++) {
++              harray->arrays[i] = kmalloc(max_elements * typesize, flags);
++              if (!harray->arrays[i])
++                      goto undo;
++              memset(harray->arrays[i], 0, max_elements * typesize);
++      }
++      harray->arrays[i] = kmalloc((hashsize - i * max_elements) * typesize, 
++                                  flags);
++      if (!harray->arrays[i])
++              goto undo;
++      memset(harray->arrays[i], 0, (hashsize - i * max_elements) * typesize);
++
++      harray->max_elements = max_elements;
++      harray->arrays[size] = NULL;
++      
++      return (void *)harray;
++
++    undo:
++      for (j = 0; j < i; j++) {
++              kfree(harray->arrays[j]);
++      }
++      kfree(harray);
++      return NULL;
++}
++
++static inline void harray_free(void *h)
++{
++      struct harray *harray = (struct harray *) h;
++      size_t i;
++      
++      for (i = 0; harray->arrays[i] != NULL; i++)
++              kfree(harray->arrays[i]);
++      kfree(harray);
++}
++
++static inline void harray_flush(void *h, size_t hashsize, size_t typesize)
++{
++      struct harray *harray = (struct harray *) h;
++      size_t i;
++      
++      for (i = 0; harray->arrays[i+1] != NULL; i++)
++              memset(harray->arrays[i], 0, harray->max_elements * typesize);
++      memset(harray->arrays[i], 0, 
++             (hashsize - i * harray->max_elements) * typesize);
++}
++
++#define HARRAY_ELEM(h, type, which)                           \
++({                                                            \
++      struct harray *__h = (struct harray *)(h);              \
++      ((type)((__h)->arrays[(which)/(__h)->max_elements])     \
++              + (which)%(__h)->max_elements);                 \
++})
++
++#endif                                /* __KERNEL__ */
++
++#endif /*_IP_SET_MALLOC_H*/
+diff -Nurp linux-2.6.22.10-vs2.3.0.29-pl02/include/linux/netfilter_ipv4/ip_set_nethash.h linux-2.6.22.10-vs2.3.0.29-pl03/include/linux/netfilter_ipv4/ip_set_nethash.h
+--- linux-2.6.22.10-vs2.3.0.29-pl02/include/linux/netfilter_ipv4/ip_set_nethash.h      1969-12-31 19:00:00.000000000 -0500
++++ linux-2.6.22.10-vs2.3.0.29-pl03/include/linux/netfilter_ipv4/ip_set_nethash.h      2007-11-14 14:12:25.000000000 -0500
+@@ -0,0 +1,55 @@
++#ifndef __IP_SET_NETHASH_H
++#define __IP_SET_NETHASH_H
++
++#include <linux/netfilter_ipv4/ip_set.h>
++
++#define SETTYPE_NAME "nethash"
++#define MAX_RANGE 0x0000FFFF
++
++struct ip_set_nethash {
++      ip_set_ip_t *members;           /* the nethash proper */
++      uint32_t elements;              /* number of elements */
++      uint32_t hashsize;              /* hash size */
++      uint16_t probes;                /* max number of probes  */
++      uint16_t resize;                /* resize factor in percent */
++      unsigned char cidr[30];         /* CIDR sizes */
++      void *initval[0];               /* initvals for jhash_1word */
++};
++
++struct ip_set_req_nethash_create {
++      uint32_t hashsize;
++      uint16_t probes;
++      uint16_t resize;
++};
++
++struct ip_set_req_nethash {
++      ip_set_ip_t ip;
++      unsigned char cidr;
++};
++
++static unsigned char shifts[] = {255, 253, 249, 241, 225, 193, 129, 1};
++
++static inline ip_set_ip_t 
++pack(ip_set_ip_t ip, unsigned char cidr)
++{
++      ip_set_ip_t addr, *paddr = &addr;
++      unsigned char n, t, *a;
++
++      addr = htonl(ip & (0xFFFFFFFF << (32 - (cidr))));
++#ifdef __KERNEL__
++      DP("ip:%u.%u.%u.%u/%u", NIPQUAD(addr), cidr);
++#endif
++      n = cidr / 8;
++      t = cidr % 8;   
++      a = &((unsigned char *)paddr)[n];
++      *a = *a /(1 << (8 - t)) + shifts[t];
++#ifdef __KERNEL__
++      DP("n: %u, t: %u, a: %u", n, t, *a);
++      DP("ip:%u.%u.%u.%u/%u, %u.%u.%u.%u",
++         HIPQUAD(ip), cidr, NIPQUAD(addr));
++#endif
++
++      return ntohl(addr);
++}
++
++#endif        /* __IP_SET_NETHASH_H */
+diff -Nurp linux-2.6.22.10-vs2.3.0.29-pl02/include/linux/netfilter_ipv4/ip_set_portmap.h linux-2.6.22.10-vs2.3.0.29-pl03/include/linux/netfilter_ipv4/ip_set_portmap.h
+--- linux-2.6.22.10-vs2.3.0.29-pl02/include/linux/netfilter_ipv4/ip_set_portmap.h      1969-12-31 19:00:00.000000000 -0500
++++ linux-2.6.22.10-vs2.3.0.29-pl03/include/linux/netfilter_ipv4/ip_set_portmap.h      2007-11-14 14:12:25.000000000 -0500
+@@ -0,0 +1,25 @@
++#ifndef __IP_SET_PORTMAP_H
++#define __IP_SET_PORTMAP_H
++
++#include <linux/netfilter_ipv4/ip_set.h>
++
++#define SETTYPE_NAME  "portmap"
++#define MAX_RANGE     0x0000FFFF
++#define INVALID_PORT  (MAX_RANGE + 1)
++
++struct ip_set_portmap {
++      void *members;                  /* the portmap proper */
++      ip_set_ip_t first_port;         /* host byte order, included in range */
++      ip_set_ip_t last_port;          /* host byte order, included in range */
++};
++
++struct ip_set_req_portmap_create {
++      ip_set_ip_t from;
++      ip_set_ip_t to;
++};
++
++struct ip_set_req_portmap {
++      ip_set_ip_t port;
++};
++
++#endif /* __IP_SET_PORTMAP_H */
+diff -Nurp linux-2.6.22.10-vs2.3.0.29-pl02/include/linux/netfilter_ipv4/ipt_set.h linux-2.6.22.10-vs2.3.0.29-pl03/include/linux/netfilter_ipv4/ipt_set.h
+--- linux-2.6.22.10-vs2.3.0.29-pl02/include/linux/netfilter_ipv4/ipt_set.h     1969-12-31 19:00:00.000000000 -0500
++++ linux-2.6.22.10-vs2.3.0.29-pl03/include/linux/netfilter_ipv4/ipt_set.h     2007-11-14 14:12:25.000000000 -0500
+@@ -0,0 +1,21 @@
++#ifndef _IPT_SET_H
++#define _IPT_SET_H
++
++#include <linux/netfilter_ipv4/ip_set.h>
++
++struct ipt_set_info {
++      ip_set_id_t index;
++      u_int32_t flags[IP_SET_MAX_BINDINGS + 1];
++};
++
++/* match info */
++struct ipt_set_info_match {
++      struct ipt_set_info match_set;
++};
++
++struct ipt_set_info_target {
++      struct ipt_set_info add_set;
++      struct ipt_set_info del_set;
++};
++
++#endif /*_IPT_SET_H*/
+diff -Nurp linux-2.6.22.10-vs2.3.0.29-pl02/net/ipv4/netfilter/ip_set.c linux-2.6.22.10-vs2.3.0.29-pl03/net/ipv4/netfilter/ip_set.c
+--- linux-2.6.22.10-vs2.3.0.29-pl02/net/ipv4/netfilter/ip_set.c        1969-12-31 19:00:00.000000000 -0500
++++ linux-2.6.22.10-vs2.3.0.29-pl03/net/ipv4/netfilter/ip_set.c        2007-11-14 14:12:25.000000000 -0500
+@@ -0,0 +1,2005 @@
++/* Copyright (C) 2000-2002 Joakim Axelsson <gozem@linux.nu>
++ *                         Patrick Schaaf <bof@bof.de>
++ * Copyright (C) 2003-2004 Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License version 2 as
++ * published by the Free Software Foundation.  
++ */
++
++/* Kernel module for IP set management */
++
++#include <linux/version.h>
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,19)
++#include <linux/config.h>
++#endif
++#include <linux/module.h>
++#include <linux/moduleparam.h>
++#include <linux/kmod.h>
++#include <linux/ip.h>
++#include <linux/skbuff.h>
++#include <linux/random.h>
++#include <linux/jhash.h>
++#include <linux/netfilter_ipv4/ip_tables.h>
++#include <linux/errno.h>
++#include <asm/uaccess.h>
++#include <asm/bitops.h>
++#include <asm/semaphore.h>
++#include <linux/spinlock.h>
++#include <linux/vmalloc.h>
++
++#define ASSERT_READ_LOCK(x)
++#define ASSERT_WRITE_LOCK(x)
++#include <linux/netfilter_ipv4/ip_set.h>
++
++static struct list_head set_type_list;                /* all registered sets */
++static struct ip_set **ip_set_list;           /* all individual sets */
++static DEFINE_RWLOCK(ip_set_lock);            /* protects the lists and the hash */
++static DECLARE_MUTEX(ip_set_app_mutex);               /* serializes user access */
++static ip_set_id_t ip_set_max = CONFIG_IP_NF_SET_MAX;
++static ip_set_id_t ip_set_bindings_hash_size =  CONFIG_IP_NF_SET_HASHSIZE;
++static struct list_head *ip_set_hash;         /* hash of bindings */
++static unsigned int ip_set_hash_random;               /* random seed */
++
++/*
++ * Sets are identified either by the index in ip_set_list or by id.
++ * The id never changes and is used to find a key in the hash. 
++ * The index may change by swapping and used at all other places 
++ * (set/SET netfilter modules, binding value, etc.)
++ *
++ * Userspace requests are serialized by ip_set_mutex and sets can
++ * be deleted only from userspace. Therefore ip_set_list locking 
++ * must obey the following rules:
++ *
++ * - kernel requests: read and write locking mandatory
++ * - user requests: read locking optional, write locking mandatory
++ */
++
++static inline void
++__ip_set_get(ip_set_id_t index)
++{
++      atomic_inc(&ip_set_list[index]->ref);
++}
++
++static inline void
++__ip_set_put(ip_set_id_t index)
++{
++      atomic_dec(&ip_set_list[index]->ref);
++}
++
++/*
++ * Binding routines
++ */
++
++static inline struct ip_set_hash *
++__ip_set_find(u_int32_t key, ip_set_id_t id, ip_set_ip_t ip)
++{
++      struct ip_set_hash *set_hash;
++
++      list_for_each_entry(set_hash, &ip_set_hash[key], list)
++              if (set_hash->id == id && set_hash->ip == ip)
++                      return set_hash;
++                      
++      return NULL;
++}
++
++static ip_set_id_t
++ip_set_find_in_hash(ip_set_id_t id, ip_set_ip_t ip)
++{
++      u_int32_t key = jhash_2words(id, ip, ip_set_hash_random) 
++                              % ip_set_bindings_hash_size;
++      struct ip_set_hash *set_hash;
++
++      ASSERT_READ_LOCK(&ip_set_lock);
++      IP_SET_ASSERT(ip_set_list[id]);
++      DP("set: %s, ip: %u.%u.%u.%u", ip_set_list[id]->name, HIPQUAD(ip));     
++      
++      set_hash = __ip_set_find(key, id, ip);
++      
++      DP("set: %s, ip: %u.%u.%u.%u, binding: %s", ip_set_list[id]->name, 
++         HIPQUAD(ip),
++         set_hash != NULL ? ip_set_list[set_hash->binding]->name : "");
++
++      return (set_hash != NULL ? set_hash->binding : IP_SET_INVALID_ID);
++}
++
++static inline void 
++__set_hash_del(struct ip_set_hash *set_hash)
++{
++      ASSERT_WRITE_LOCK(&ip_set_lock);
++      IP_SET_ASSERT(ip_set_list[set_hash->binding]);  
++
++      __ip_set_put(set_hash->binding);
++      list_del(&set_hash->list);
++      kfree(set_hash);
++}
++
++static int
++ip_set_hash_del(ip_set_id_t id, ip_set_ip_t ip)
++{
++      u_int32_t key = jhash_2words(id, ip, ip_set_hash_random)
++                              % ip_set_bindings_hash_size;
++      struct ip_set_hash *set_hash;
++      
++      IP_SET_ASSERT(ip_set_list[id]);
++      DP("set: %s, ip: %u.%u.%u.%u", ip_set_list[id]->name, HIPQUAD(ip));     
++      write_lock_bh(&ip_set_lock);
++      set_hash = __ip_set_find(key, id, ip);
++      DP("set: %s, ip: %u.%u.%u.%u, binding: %s", ip_set_list[id]->name,
++         HIPQUAD(ip),
++         set_hash != NULL ? ip_set_list[set_hash->binding]->name : "");
++
++      if (set_hash != NULL)
++              __set_hash_del(set_hash);
++      write_unlock_bh(&ip_set_lock);
++      return 0;
++}
++
++static int 
++ip_set_hash_add(ip_set_id_t id, ip_set_ip_t ip, ip_set_id_t binding)
++{
++      u_int32_t key = jhash_2words(id, ip, ip_set_hash_random)
++                              % ip_set_bindings_hash_size;
++      struct ip_set_hash *set_hash;
++      int ret = 0;
++      
++      IP_SET_ASSERT(ip_set_list[id]);
++      IP_SET_ASSERT(ip_set_list[binding]);
++      DP("set: %s, ip: %u.%u.%u.%u, binding: %s", ip_set_list[id]->name, 
++         HIPQUAD(ip), ip_set_list[binding]->name);
++      write_lock_bh(&ip_set_lock);
++      set_hash = __ip_set_find(key, id, ip);
++      if (!set_hash) {
++              set_hash = kmalloc(sizeof(struct ip_set_hash), GFP_ATOMIC);
++              if (!set_hash) {
++                      ret = -ENOMEM;
++                      goto unlock;
++              }
++              INIT_LIST_HEAD(&set_hash->list);
++              set_hash->id = id;
++              set_hash->ip = ip;
++              list_add(&set_hash->list, &ip_set_hash[key]);
++      } else {
++              IP_SET_ASSERT(ip_set_list[set_hash->binding]);  
++              DP("overwrite binding: %s",
++                 ip_set_list[set_hash->binding]->name);
++              __ip_set_put(set_hash->binding);
++      }
++      set_hash->binding = binding;
++      __ip_set_get(set_hash->binding);
++      DP("stored: key %u, id %u (%s), ip %u.%u.%u.%u, binding %u (%s)",
++         key, id, ip_set_list[id]->name,
++         HIPQUAD(ip), binding, ip_set_list[binding]->name);
++    unlock:
++      write_unlock_bh(&ip_set_lock);
++      return ret;
++}
++
++#define FOREACH_HASH_DO(fn, args...)                                          \
++({                                                                            \
++      ip_set_id_t __key;                                                      \
++      struct ip_set_hash *__set_hash;                                         \
++                                                                              \
++      for (__key = 0; __key < ip_set_bindings_hash_size; __key++) {           \
++              list_for_each_entry(__set_hash, &ip_set_hash[__key], list)      \
++                      fn(__set_hash , ## args);                               \
++      }                                                                       \
++})
++
++#define FOREACH_HASH_RW_DO(fn, args...)                                               \
++({                                                                            \
++      ip_set_id_t __key;                                                      \
++      struct ip_set_hash *__set_hash, *__n;                                   \
++                                                                              \
++      ASSERT_WRITE_LOCK(&ip_set_lock);                                        \
++      for (__key = 0; __key < ip_set_bindings_hash_size; __key++) {           \
++              list_for_each_entry_safe(__set_hash, __n, &ip_set_hash[__key], list)\
++                      fn(__set_hash , ## args);                               \
++      }                                                                       \
++})
++
++/* Add, del and test set entries from kernel */
++
++#define follow_bindings(index, set, ip)                                       \
++((index = ip_set_find_in_hash((set)->id, ip)) != IP_SET_INVALID_ID    \
++ || (index = (set)->binding) != IP_SET_INVALID_ID)
++
++int
++ip_set_testip_kernel(ip_set_id_t index,
++                   const struct sk_buff *skb,
++                   const u_int32_t *flags)
++{
++      struct ip_set *set;
++      ip_set_ip_t ip;
++      int res;
++      unsigned char i = 0;
++      
++      IP_SET_ASSERT(flags[i]);
++      read_lock_bh(&ip_set_lock);
++      do {
++              set = ip_set_list[index];
++              IP_SET_ASSERT(set);
++              DP("set %s, index %u", set->name, index);
++              read_lock_bh(&set->lock);
++              res = set->type->testip_kernel(set, skb, &ip, flags, i++);
++              read_unlock_bh(&set->lock);
++              i += !!(set->type->features & IPSET_DATA_DOUBLE);
++      } while (res > 0 
++               && flags[i] 
++               && follow_bindings(index, set, ip));
++      read_unlock_bh(&ip_set_lock);
++
++      return res;
++}
++
++void
++ip_set_addip_kernel(ip_set_id_t index,
++                  const struct sk_buff *skb,
++                  const u_int32_t *flags)
++{
++      struct ip_set *set;
++      ip_set_ip_t ip;
++      int res;
++      unsigned char i = 0;
++
++      IP_SET_ASSERT(flags[i]);
++   retry:
++      read_lock_bh(&ip_set_lock);
++      do {
++              set = ip_set_list[index];
++              IP_SET_ASSERT(set);
++              DP("set %s, index %u", set->name, index);
++              write_lock_bh(&set->lock);
++              res = set->type->addip_kernel(set, skb, &ip, flags, i++);
++              write_unlock_bh(&set->lock);
++              i += !!(set->type->features & IPSET_DATA_DOUBLE);
++      } while ((res == 0 || res == -EEXIST)
++               && flags[i] 
++               && follow_bindings(index, set, ip));
++      read_unlock_bh(&ip_set_lock);
++
++      if (res == -EAGAIN
++          && set->type->retry
++          && (res = set->type->retry(set)) == 0)
++              goto retry;
++}
++
++void
++ip_set_delip_kernel(ip_set_id_t index,
++                  const struct sk_buff *skb,
++                  const u_int32_t *flags)
++{
++      struct ip_set *set;
++      ip_set_ip_t ip;
++      int res;
++      unsigned char i = 0;
++
++      IP_SET_ASSERT(flags[i]);
++      read_lock_bh(&ip_set_lock);
++      do {
++              set = ip_set_list[index];
++              IP_SET_ASSERT(set);
++              DP("set %s, index %u", set->name, index);
++              write_lock_bh(&set->lock);
++              res = set->type->delip_kernel(set, skb, &ip, flags, i++);
++              write_unlock_bh(&set->lock);
++              i += !!(set->type->features & IPSET_DATA_DOUBLE);
++      } while ((res == 0 || res == -EEXIST)
++               && flags[i] 
++               && follow_bindings(index, set, ip));
++      read_unlock_bh(&ip_set_lock);
++}
++
++/* Register and deregister settype */
++
++static inline struct ip_set_type *
++find_set_type(const char *name)
++{
++      struct ip_set_type *set_type;
++
++      list_for_each_entry(set_type, &set_type_list, list)
++              if (!strncmp(set_type->typename, name, IP_SET_MAXNAMELEN - 1))
++                      return set_type;
++      return NULL;
++}
++
++int 
++ip_set_register_set_type(struct ip_set_type *set_type)
++{
++      int ret = 0;
++      
++      if (set_type->protocol_version != IP_SET_PROTOCOL_VERSION) {
++              ip_set_printk("'%s' uses wrong protocol version %u (want %u)",
++                            set_type->typename,
++                            set_type->protocol_version,
++                            IP_SET_PROTOCOL_VERSION);
++              return -EINVAL;
++      }
++
++      write_lock_bh(&ip_set_lock);
++      if (find_set_type(set_type->typename)) {
++              /* Duplicate! */
++              ip_set_printk("'%s' already registered!", 
++                            set_type->typename);
++              ret = -EINVAL;
++              goto unlock;
++      }
++      if (!try_module_get(THIS_MODULE)) {
++              ret = -EFAULT;
++              goto unlock;
++      }
++      list_add(&set_type->list, &set_type_list);
++      DP("'%s' registered.", set_type->typename);
++   unlock:
++      write_unlock_bh(&ip_set_lock);
++      return ret;
++}
++
++void
++ip_set_unregister_set_type(struct ip_set_type *set_type)
++{
++      write_lock_bh(&ip_set_lock);
++      if (!find_set_type(set_type->typename)) {
++              ip_set_printk("'%s' not registered?",
++                            set_type->typename);
++              goto unlock;
++      }
++      list_del(&set_type->list);
++      module_put(THIS_MODULE);
++      DP("'%s' unregistered.", set_type->typename);
++   unlock:
++      write_unlock_bh(&ip_set_lock);
++
++}
++
++/*
++ * Userspace routines
++ */
++
++/*
++ * Find set by name, reference it once. The reference makes sure the
++ * thing pointed to, does not go away under our feet. Drop the reference
++ * later, using ip_set_put().
++ */
++ip_set_id_t
++ip_set_get_byname(const char *name)
++{
++      ip_set_id_t i, index = IP_SET_INVALID_ID;
++      
++      down(&ip_set_app_mutex);
++      for (i = 0; i < ip_set_max; i++) {
++              if (ip_set_list[i] != NULL
++                  && strcmp(ip_set_list[i]->name, name) == 0) {
++                      __ip_set_get(i);
++                      index = i;
++                      break;
++              }
++      }
++      up(&ip_set_app_mutex);
++      return index;
++}
++
++/*
++ * Find set by index, reference it once. The reference makes sure the
++ * thing pointed to, does not go away under our feet. Drop the reference
++ * later, using ip_set_put().
++ */
++ip_set_id_t
++ip_set_get_byindex(ip_set_id_t index)
++{
++      down(&ip_set_app_mutex);
++
++      if (index >= ip_set_max)
++              return IP_SET_INVALID_ID;
++      
++      if (ip_set_list[index])
++              __ip_set_get(index);
++      else
++              index = IP_SET_INVALID_ID;
++              
++      up(&ip_set_app_mutex);
++      return index;
++}
++
++/*
++ * If the given set pointer points to a valid set, decrement
++ * reference count by 1. The caller shall not assume the index
++ * to be valid, after calling this function.
++ */
++void ip_set_put(ip_set_id_t index)
++{
++      down(&ip_set_app_mutex);
++      if (ip_set_list[index])
++              __ip_set_put(index);
++      up(&ip_set_app_mutex);
++}
++
++/* Find a set by name or index */
++static ip_set_id_t
++ip_set_find_byname(const char *name)
++{
++      ip_set_id_t i, index = IP_SET_INVALID_ID;
++      
++      for (i = 0; i < ip_set_max; i++) {
++              if (ip_set_list[i] != NULL
++                  && strcmp(ip_set_list[i]->name, name) == 0) {
++                      index = i;
++                      break;
++              }
++      }
++      return index;
++}
++
++static ip_set_id_t
++ip_set_find_byindex(ip_set_id_t index)
++{
++      if (index >= ip_set_max || ip_set_list[index] == NULL)
++              index = IP_SET_INVALID_ID;
++      
++      return index;
++}
++
++/*
++ * Add, del, test, bind and unbind
++ */
++
++static inline int
++__ip_set_testip(struct ip_set *set,
++              const void *data,
++              size_t size,
++              ip_set_ip_t *ip)
++{
++      int res;
++
++      read_lock_bh(&set->lock);
++      res = set->type->testip(set, data, size, ip);
++      read_unlock_bh(&set->lock);
++
++      return res;
++}
++
++static int
++__ip_set_addip(ip_set_id_t index,
++             const void *data,
++             size_t size)
++{
++      struct ip_set *set = ip_set_list[index];
++      ip_set_ip_t ip;
++      int res;
++      
++      IP_SET_ASSERT(set);
++      do {
++              write_lock_bh(&set->lock);
++              res = set->type->addip(set, data, size, &ip);
++              write_unlock_bh(&set->lock);
++      } while (res == -EAGAIN
++               && set->type->retry
++               && (res = set->type->retry(set)) == 0);
++
++      return res;
++}
++
++static int
++ip_set_addip(ip_set_id_t index,
++           const void *data,
++           size_t size)
++{
++
++      return __ip_set_addip(index,
++                            data + sizeof(struct ip_set_req_adt),
++                            size - sizeof(struct ip_set_req_adt));
++}
++
++static int
++ip_set_delip(ip_set_id_t index,
++           const void *data,
++           size_t size)
++{
++      struct ip_set *set = ip_set_list[index];
++      ip_set_ip_t ip;
++      int res;
++      
++      IP_SET_ASSERT(set);
++      write_lock_bh(&set->lock);
++      res = set->type->delip(set,
++                             data + sizeof(struct ip_set_req_adt),
++                             size - sizeof(struct ip_set_req_adt),
++                             &ip);
++      write_unlock_bh(&set->lock);
++
++      return res;
++}
++
++static int
++ip_set_testip(ip_set_id_t index,
++            const void *data,
++            size_t size)
++{
++      struct ip_set *set = ip_set_list[index];
++      ip_set_ip_t ip;
++      int res;
++
++      IP_SET_ASSERT(set);
++      res = __ip_set_testip(set,
++                            data + sizeof(struct ip_set_req_adt),
++                            size - sizeof(struct ip_set_req_adt),
++                            &ip);
++
++      return (res > 0 ? -EEXIST : res);
++}
++
++static int
++ip_set_bindip(ip_set_id_t index,
++            const void *data,
++            size_t size)
++{
++      struct ip_set *set = ip_set_list[index];
++      struct ip_set_req_bind *req_bind;
++      ip_set_id_t binding;
++      ip_set_ip_t ip;
++      int res;
++
++      IP_SET_ASSERT(set);
++      if (size < sizeof(struct ip_set_req_bind))
++              return -EINVAL;
++              
++      req_bind = (struct ip_set_req_bind *) data;
++      req_bind->binding[IP_SET_MAXNAMELEN - 1] = '\0';
++
++      if (strcmp(req_bind->binding, IPSET_TOKEN_DEFAULT) == 0) {
++              /* Default binding of a set */
++              char *binding_name;
++              
++              if (size != sizeof(struct ip_set_req_bind) + IP_SET_MAXNAMELEN)
++                      return -EINVAL;
++
++              binding_name = (char *)(data + sizeof(struct ip_set_req_bind)); 
++              binding_name[IP_SET_MAXNAMELEN - 1] = '\0';
++
++              binding = ip_set_find_byname(binding_name);
++              if (binding == IP_SET_INVALID_ID)
++                      return -ENOENT;
++
++              write_lock_bh(&ip_set_lock);
++              /* Sets as binding values are referenced */
++              if (set->binding != IP_SET_INVALID_ID)
++                      __ip_set_put(set->binding);
++              set->binding = binding;
++              __ip_set_get(set->binding);
++              write_unlock_bh(&ip_set_lock);
++
++              return 0;
++      }
++      binding = ip_set_find_byname(req_bind->binding);
++      if (binding == IP_SET_INVALID_ID)
++              return -ENOENT;
++
++      res = __ip_set_testip(set,
++                            data + sizeof(struct ip_set_req_bind),
++                            size - sizeof(struct ip_set_req_bind),
++                            &ip);
++      DP("set %s, ip: %u.%u.%u.%u, binding %s",
++         set->name, HIPQUAD(ip), ip_set_list[binding]->name);
++      
++      if (res >= 0)
++              res = ip_set_hash_add(set->id, ip, binding);
++
++      return res;
++}
++
++#define FOREACH_SET_DO(fn, args...)                           \
++({                                                            \
++      ip_set_id_t __i;                                        \
++      struct ip_set *__set;                                   \
++                                                              \
++      for (__i = 0; __i < ip_set_max; __i++) {                \
++              __set = ip_set_list[__i];                       \
++              if (__set != NULL)                              \
++                      fn(__set , ##args);                     \
++      }                                                       \
++})
++
++static inline void
++__set_hash_del_byid(struct ip_set_hash *set_hash, ip_set_id_t id)
++{
++      if (set_hash->id == id)
++              __set_hash_del(set_hash);
++}
++
++static inline void
++__unbind_default(struct ip_set *set)
++{
++      if (set->binding != IP_SET_INVALID_ID) {
++              /* Sets as binding values are referenced */
++              __ip_set_put(set->binding);
++              set->binding = IP_SET_INVALID_ID;
++      }
++}
++
++static int
++ip_set_unbindip(ip_set_id_t index,
++              const void *data,
++              size_t size)
++{
++      struct ip_set *set;
++      struct ip_set_req_bind *req_bind;
++      ip_set_ip_t ip;
++      int res;
++
++      DP("");
++      if (size < sizeof(struct ip_set_req_bind))
++              return -EINVAL;
++              
++      req_bind = (struct ip_set_req_bind *) data;
++      req_bind->binding[IP_SET_MAXNAMELEN - 1] = '\0';
++      
++      DP("%u %s", index, req_bind->binding);
++      if (index == IP_SET_INVALID_ID) {
++              /* unbind :all: */
++              if (strcmp(req_bind->binding, IPSET_TOKEN_DEFAULT) == 0) {
++                      /* Default binding of sets */
++                      write_lock_bh(&ip_set_lock);
++                      FOREACH_SET_DO(__unbind_default);
++                      write_unlock_bh(&ip_set_lock);
++                      return 0;
++              } else if (strcmp(req_bind->binding, IPSET_TOKEN_ALL) == 0) {
++                      /* Flush all bindings of all sets*/
++                      write_lock_bh(&ip_set_lock);
++                      FOREACH_HASH_RW_DO(__set_hash_del);
++                      write_unlock_bh(&ip_set_lock);
++                      return 0;
++              }
++              DP("unreachable reached!");
++              return -EINVAL;
++      }
++      
++      set = ip_set_list[index];
++      IP_SET_ASSERT(set);
++      if (strcmp(req_bind->binding, IPSET_TOKEN_DEFAULT) == 0) {
++              /* Default binding of set */
++              ip_set_id_t binding = ip_set_find_byindex(set->binding);
++
++              if (binding == IP_SET_INVALID_ID)
++                      return -ENOENT;
++                      
++              write_lock_bh(&ip_set_lock);
++              /* Sets in hash values are referenced */
++              __ip_set_put(set->binding);
++              set->binding = IP_SET_INVALID_ID;
++              write_unlock_bh(&ip_set_lock);
++
++              return 0;
++      } else if (strcmp(req_bind->binding, IPSET_TOKEN_ALL) == 0) {
++              /* Flush all bindings */
++
++              write_lock_bh(&ip_set_lock);
++              FOREACH_HASH_RW_DO(__set_hash_del_byid, set->id);
++              write_unlock_bh(&ip_set_lock);
++              return 0;
++      }
++      
++      res = __ip_set_testip(set,
++                            data + sizeof(struct ip_set_req_bind),
++                            size - sizeof(struct ip_set_req_bind),
++                            &ip);
++
++      DP("set %s, ip: %u.%u.%u.%u", set->name, HIPQUAD(ip));
++      if (res >= 0)
++              res = ip_set_hash_del(set->id, ip);
++
++      return res;
++}
++
++static int
++ip_set_testbind(ip_set_id_t index,
++              const void *data,
++              size_t size)
++{
++      struct ip_set *set = ip_set_list[index];
++      struct ip_set_req_bind *req_bind;
++      ip_set_id_t binding;
++      ip_set_ip_t ip;
++      int res;
++
++      IP_SET_ASSERT(set);
++      if (size < sizeof(struct ip_set_req_bind))
++              return -EINVAL;
++              
++      req_bind = (struct ip_set_req_bind *) data;
++      req_bind->binding[IP_SET_MAXNAMELEN - 1] = '\0';
++
++      if (strcmp(req_bind->binding, IPSET_TOKEN_DEFAULT) == 0) {
++              /* Default binding of set */
++              char *binding_name;
++              
++              if (size != sizeof(struct ip_set_req_bind) + IP_SET_MAXNAMELEN)
++                      return -EINVAL;
++
++              binding_name = (char *)(data + sizeof(struct ip_set_req_bind)); 
++              binding_name[IP_SET_MAXNAMELEN - 1] = '\0';
++
++              binding = ip_set_find_byname(binding_name);
++              if (binding == IP_SET_INVALID_ID)
++                      return -ENOENT;
++              
++              res = (set->binding == binding) ? -EEXIST : 0;
++
++              return res;
++      }
++      binding = ip_set_find_byname(req_bind->binding);
++      if (binding == IP_SET_INVALID_ID)
++              return -ENOENT;
++              
++      
++      res = __ip_set_testip(set,
++                            data + sizeof(struct ip_set_req_bind),
++                            size - sizeof(struct ip_set_req_bind),
++                            &ip);
++      DP("set %s, ip: %u.%u.%u.%u, binding %s",
++         set->name, HIPQUAD(ip), ip_set_list[binding]->name);
++         
++      if (res >= 0)
++              res = (ip_set_find_in_hash(set->id, ip) == binding)
++                      ? -EEXIST : 0;
++
++      return res;
++}
++
++static struct ip_set_type *
++find_set_type_rlock(const char *typename)
++{
++      struct ip_set_type *type;
++      
++      read_lock_bh(&ip_set_lock);
++      type = find_set_type(typename);
++      if (type == NULL)
++              read_unlock_bh(&ip_set_lock);
++
++      return type;
++}
++
++static int
++find_free_id(const char *name,
++           ip_set_id_t *index,
++           ip_set_id_t *id)
++{
++      ip_set_id_t i;
++
++      *id = IP_SET_INVALID_ID;
++      for (i = 0;  i < ip_set_max; i++) {
++              if (ip_set_list[i] == NULL) {
++                      if (*id == IP_SET_INVALID_ID)
++                              *id = *index = i;
++              } else if (strcmp(name, ip_set_list[i]->name) == 0)
++                      /* Name clash */
++                      return -EEXIST;
++      }
++      if (*id == IP_SET_INVALID_ID)
++              /* No free slot remained */
++              return -ERANGE;
++      /* Check that index is usable as id (swapping) */
++    check:    
++      for (i = 0;  i < ip_set_max; i++) {
++              if (ip_set_list[i] != NULL
++                  && ip_set_list[i]->id == *id) {
++                  *id = i;
++                  goto check;
++              }
++      }
++      return 0;
++}
++
++/*
++ * Create a set
++ */
++static int
++ip_set_create(const char *name,
++            const char *typename,
++            ip_set_id_t restore,
++            const void *data,
++            size_t size)
++{
++      struct ip_set *set;
++      ip_set_id_t index = 0, id;
++      int res = 0;
++
++      DP("setname: %s, typename: %s, id: %u", name, typename, restore);
++      /*
++       * First, and without any locks, allocate and initialize
++       * a normal base set structure.
++       */
++      set = kmalloc(sizeof(struct ip_set), GFP_KERNEL);
++      if (!set)
++              return -ENOMEM;
++      set->lock = RW_LOCK_UNLOCKED;
++      strncpy(set->name, name, IP_SET_MAXNAMELEN);
++      set->binding = IP_SET_INVALID_ID;
++      atomic_set(&set->ref, 0);
++
++      /*
++       * Next, take the &ip_set_lock, check that we know the type,
++       * and take a reference on the type, to make sure it
++       * stays available while constructing our new set.
++       *
++       * After referencing the type, we drop the &ip_set_lock,
++       * and let the new set construction run without locks.
++       */
++      set->type = find_set_type_rlock(typename);
++      if (set->type == NULL) {
++              /* Try loading the module */
++              char modulename[IP_SET_MAXNAMELEN + strlen("ip_set_") + 1];
++              strcpy(modulename, "ip_set_");
++              strcat(modulename, typename);
++              DP("try to load %s", modulename);
++              request_module(modulename);
++              set->type = find_set_type_rlock(typename);
++      }
++      if (set->type == NULL) {
++              ip_set_printk("no set type '%s', set '%s' not created",
++                            typename, name);
++              res = -ENOENT;
++              goto out;
++      }
++      if (!try_module_get(set->type->me)) {
++              read_unlock_bh(&ip_set_lock);
++              res = -EFAULT;
++              goto out;
++      }
++      read_unlock_bh(&ip_set_lock);
++
++      /*
++       * Without holding any locks, create private part.
++       */
++      res = set->type->create(set, data, size);
++      if (res != 0)
++              goto put_out;
++
++      /* BTW, res==0 here. */
++
++      /*
++       * Here, we have a valid, constructed set. &ip_set_lock again,
++       * find free id/index and check that it is not already in 
++       * ip_set_list.
++       */
++      write_lock_bh(&ip_set_lock);
++      if ((res = find_free_id(set->name, &index, &id)) != 0) {
++              DP("no free id!");
++              goto cleanup;
++      }
++
++      /* Make sure restore gets the same index */
++      if (restore != IP_SET_INVALID_ID && index != restore) {
++              DP("Can't restore, sets are screwed up");
++              res = -ERANGE;
++              goto cleanup;
++      }
++       
++      /*
++       * Finally! Add our shiny new set to the list, and be done.
++       */
++      DP("create: '%s' created with index %u, id %u!", set->name, index, id);
++      set->id = id;
++      ip_set_list[index] = set;
++      write_unlock_bh(&ip_set_lock);
++      return res;
++      
++    cleanup:
++      write_unlock_bh(&ip_set_lock);
++      set->type->destroy(set);
++    put_out:
++      module_put(set->type->me);
++    out:
++      kfree(set);
++      return res;
++}
++
++/*
++ * Destroy a given existing set
++ */
++static void
++ip_set_destroy_set(ip_set_id_t index)
++{
++      struct ip_set *set = ip_set_list[index];
++
++      IP_SET_ASSERT(set);
++      DP("set: %s",  set->name);
++      write_lock_bh(&ip_set_lock);
++      FOREACH_HASH_RW_DO(__set_hash_del_byid, set->id);
++      if (set->binding != IP_SET_INVALID_ID)
++              __ip_set_put(set->binding);
++      ip_set_list[index] = NULL;
++      write_unlock_bh(&ip_set_lock);
++
++      /* Must call it without holding any lock */
++      set->type->destroy(set);
++      module_put(set->type->me);
++      kfree(set);
++}
++
++/*
++ * Destroy a set - or all sets
++ * Sets must not be referenced/used.
++ */
++static int
++ip_set_destroy(ip_set_id_t index)
++{
++      ip_set_id_t i;
++
++      /* ref modification always protected by the mutex */
++      if (index != IP_SET_INVALID_ID) {
++              if (atomic_read(&ip_set_list[index]->ref))
++                      return -EBUSY;
++              ip_set_destroy_set(index);
++      } else {
++              for (i = 0; i < ip_set_max; i++) {
++                      if (ip_set_list[i] != NULL 
++                          && (atomic_read(&ip_set_list[i]->ref)))
++                              return -EBUSY;
++              }
++
++              for (i = 0; i < ip_set_max; i++) {
++                      if (ip_set_list[i] != NULL)
++                              ip_set_destroy_set(i);
++              }
++      }
++      return 0;
++}
++
++static void
++ip_set_flush_set(struct ip_set *set)
++{
++      DP("set: %s %u",  set->name, set->id);
++
++      write_lock_bh(&set->lock);
++      set->type->flush(set);
++      write_unlock_bh(&set->lock);
++}
++
++/* 
++ * Flush data in a set - or in all sets
++ */
++static int
++ip_set_flush(ip_set_id_t index)
++{
++      if (index != IP_SET_INVALID_ID) {
++              IP_SET_ASSERT(ip_set_list[index]);
++              ip_set_flush_set(ip_set_list[index]);
++      } else
++              FOREACH_SET_DO(ip_set_flush_set);
++
++      return 0;
++}
++
++/* Rename a set */
++static int
++ip_set_rename(ip_set_id_t index, const char *name)
++{
++      struct ip_set *set = ip_set_list[index];
++      ip_set_id_t i;
++      int res = 0;
++
++      DP("set: %s to %s",  set->name, name);
++      write_lock_bh(&ip_set_lock);
++      for (i = 0; i < ip_set_max; i++) {
++              if (ip_set_list[i] != NULL
++                  && strncmp(ip_set_list[i]->name, 
++                             name,
++                             IP_SET_MAXNAMELEN - 1) == 0) {
++                      res = -EEXIST;
++                      goto unlock;
++              }
++      }
++      strncpy(set->name, name, IP_SET_MAXNAMELEN);
++    unlock:
++      write_unlock_bh(&ip_set_lock);
++      return res;
++}
++
++/*
++ * Swap two sets so that name/index points to the other.
++ * References are also swapped.
++ */
++static int
++ip_set_swap(ip_set_id_t from_index, ip_set_id_t to_index)
++{
++      struct ip_set *from = ip_set_list[from_index];
++      struct ip_set *to = ip_set_list[to_index];
++      char from_name[IP_SET_MAXNAMELEN];
++      u_int32_t from_ref;
++
++      DP("set: %s to %s",  from->name, to->name);
++      /* Features must not change. Artifical restriction. */
++      if (from->type->features != to->type->features)
++              return -ENOEXEC;
++
++      /* No magic here: ref munging protected by the mutex */ 
++      write_lock_bh(&ip_set_lock);
++      strncpy(from_name, from->name, IP_SET_MAXNAMELEN);
++      from_ref = atomic_read(&from->ref);
++
++      strncpy(from->name, to->name, IP_SET_MAXNAMELEN);
++      atomic_set(&from->ref, atomic_read(&to->ref));
++      strncpy(to->name, from_name, IP_SET_MAXNAMELEN);
++      atomic_set(&to->ref, from_ref);
++      
++      ip_set_list[from_index] = to;
++      ip_set_list[to_index] = from;
++      
++      write_unlock_bh(&ip_set_lock);
++      return 0;
++}
++
++/*
++ * List set data
++ */
++
++static inline void
++__set_hash_bindings_size_list(struct ip_set_hash *set_hash,
++                            ip_set_id_t id, size_t *size)
++{
++      if (set_hash->id == id)
++              *size += sizeof(struct ip_set_hash_list);
++}
++
++static inline void
++__set_hash_bindings_size_save(struct ip_set_hash *set_hash,
++                            ip_set_id_t id, size_t *size)
++{
++      if (set_hash->id == id)
++              *size += sizeof(struct ip_set_hash_save);
++}
++
++static inline void
++__set_hash_bindings(struct ip_set_hash *set_hash,
++                  ip_set_id_t id, void *data, int *used)
++{
++      if (set_hash->id == id) {
++              struct ip_set_hash_list *hash_list = 
++                      (struct ip_set_hash_list *)(data + *used);
++
++              hash_list->ip = set_hash->ip;
++              hash_list->binding = set_hash->binding;
++              *used += sizeof(struct ip_set_hash_list);
++      }
++}
++
++static int ip_set_list_set(ip_set_id_t index,
++                         void *data,
++                         int *used,
++                         int len)
++{
++      struct ip_set *set = ip_set_list[index];
++      struct ip_set_list *set_list;
++
++      /* Pointer to our header */
++      set_list = (struct ip_set_list *) (data + *used);
++
++      DP("set: %s, used: %d %p %p", set->name, *used, data, data + *used);
++
++      /* Get and ensure header size */
++      if (*used + sizeof(struct ip_set_list) > len)
++              goto not_enough_mem;
++      *used += sizeof(struct ip_set_list);
++
++      read_lock_bh(&set->lock);
++      /* Get and ensure set specific header size */
++      set_list->header_size = set->type->header_size;
++      if (*used + set_list->header_size > len)
++              goto unlock_set;
++
++      /* Fill in the header */
++      set_list->index = index;
++      set_list->binding = set->binding;
++      set_list->ref = atomic_read(&set->ref);
++
++      /* Fill in set spefific header data */
++      set->type->list_header(set, data + *used);
++      *used += set_list->header_size;
++
++      /* Get and ensure set specific members size */
++      set_list->members_size = set->type->list_members_size(set);
++      if (*used + set_list->members_size > len)
++              goto unlock_set;
++
++      /* Fill in set spefific members data */
++      set->type->list_members(set, data + *used);
++      *used += set_list->members_size;
++      read_unlock_bh(&set->lock);
++
++      /* Bindings */
++
++      /* Get and ensure set specific bindings size */
++      set_list->bindings_size = 0;
++      FOREACH_HASH_DO(__set_hash_bindings_size_list,
++                      set->id, &set_list->bindings_size);
++      if (*used + set_list->bindings_size > len)
++              goto not_enough_mem;
++
++      /* Fill in set spefific bindings data */
++      FOREACH_HASH_DO(__set_hash_bindings, set->id, data, used);
++      
++      return 0;
++
++    unlock_set:
++      read_unlock_bh(&set->lock);
++    not_enough_mem:
++      DP("not enough mem, try again");
++      return -EAGAIN;
++}
++
++/*
++ * Save sets
++ */
++static int ip_set_save_set(ip_set_id_t index,
++                         void *data,
++                         int *used,
++                         int len)
++{
++      struct ip_set *set;
++      struct ip_set_save *set_save;
++
++      /* Pointer to our header */
++      set_save = (struct ip_set_save *) (data + *used);
++
++      /* Get and ensure header size */
++      if (*used + sizeof(struct ip_set_save) > len)
++              goto not_enough_mem;
++      *used += sizeof(struct ip_set_save);
++
++      set = ip_set_list[index];
++      DP("set: %s, used: %u(%u) %p %p", set->name, *used, len, 
++         data, data + *used);
++
++      read_lock_bh(&set->lock);
++      /* Get and ensure set specific header size */
++      set_save->header_size = set->type->header_size;
++      if (*used + set_save->header_size > len)
++              goto unlock_set;
++
++      /* Fill in the header */
++      set_save->index = index;
++      set_save->binding = set->binding;
++
++      /* Fill in set spefific header data */
++      set->type->list_header(set, data + *used);
++      *used += set_save->header_size;
++
++      DP("set header filled: %s, used: %u(%u) %p %p", set->name, *used,
++         set_save->header_size, data, data + *used);
++      /* Get and ensure set specific members size */
++      set_save->members_size = set->type->list_members_size(set);
++      if (*used + set_save->members_size > len)
++              goto unlock_set;
++
++      /* Fill in set spefific members data */
++      set->type->list_members(set, data + *used);
++      *used += set_save->members_size;
++      read_unlock_bh(&set->lock);
++      DP("set members filled: %s, used: %u(%u) %p %p", set->name, *used,
++         set_save->members_size, data, data + *used);
++      return 0;
++
++    unlock_set:
++      read_unlock_bh(&set->lock);
++    not_enough_mem:
++      DP("not enough mem, try again");
++      return -EAGAIN;
++}
++
++static inline void
++__set_hash_save_bindings(struct ip_set_hash *set_hash,
++                       ip_set_id_t id,
++                       void *data,
++                       int *used,
++                       int len,
++                       int *res)
++{
++      if (*res == 0
++          && (id == IP_SET_INVALID_ID || set_hash->id == id)) {
++              struct ip_set_hash_save *hash_save = 
++                      (struct ip_set_hash_save *)(data + *used);
++              /* Ensure bindings size */
++              if (*used + sizeof(struct ip_set_hash_save) > len) {
++                      *res = -ENOMEM;
++                      return;
++              }
++              hash_save->id = set_hash->id;
++              hash_save->ip = set_hash->ip;
++              hash_save->binding = set_hash->binding;
++              *used += sizeof(struct ip_set_hash_save);
++      }
++}
++
++static int ip_set_save_bindings(ip_set_id_t index,
++                              void *data,
++                              int *used,
++                              int len)
++{
++      int res = 0;
++      struct ip_set_save *set_save;
++
++      DP("used %u, len %u", *used, len);
++      /* Get and ensure header size */
++      if (*used + sizeof(struct ip_set_save) > len)
++              return -ENOMEM;
++
++      /* Marker */
++      set_save = (struct ip_set_save *) (data + *used);
++      set_save->index = IP_SET_INVALID_ID;
++      set_save->header_size = 0;
++      set_save->members_size = 0;
++      *used += sizeof(struct ip_set_save);
++
++      DP("marker added used %u, len %u", *used, len);
++      /* Fill in bindings data */
++      if (index != IP_SET_INVALID_ID)
++              /* Sets are identified by id in hash */
++              index = ip_set_list[index]->id;
++      FOREACH_HASH_DO(__set_hash_save_bindings, index, data, used, len, &res);
++
++      return res;     
++}
++
++/*
++ * Restore sets
++ */
++static int ip_set_restore(void *data,
++                        int len)
++{
++      int res = 0;
++      int line = 0, used = 0, members_size;
++      struct ip_set *set;
++      struct ip_set_hash_save *hash_save;
++      struct ip_set_restore *set_restore;
++      ip_set_id_t index;
++
++      /* Loop to restore sets */
++      while (1) {
++              line++;
++              
++              DP("%u %u %u", used, sizeof(struct ip_set_restore), len);
++              /* Get and ensure header size */
++              if (used + sizeof(struct ip_set_restore) > len)
++                      return line;
++              set_restore = (struct ip_set_restore *) (data + used);
++              used += sizeof(struct ip_set_restore);
++
++              /* Ensure data size */
++              if (used 
++                  + set_restore->header_size 
++                  + set_restore->members_size > len)
++                      return line;
++
++              /* Check marker */
++              if (set_restore->index == IP_SET_INVALID_ID) {
++                      line--;
++                      goto bindings;
++              }
++              
++              /* Try to create the set */
++              DP("restore %s %s", set_restore->name, set_restore->typename);
++              res = ip_set_create(set_restore->name,
++                                  set_restore->typename,
++                                  set_restore->index,
++                                  data + used,
++                                  set_restore->header_size);
++              
++              if (res != 0)
++                      return line;
++              used += set_restore->header_size;
++
++              index = ip_set_find_byindex(set_restore->index);
++              DP("index %u, restore_index %u", index, set_restore->index);
++              if (index != set_restore->index)
++                      return line;
++              /* Try to restore members data */
++              set = ip_set_list[index];
++              members_size = 0;
++              DP("members_size %u reqsize %u",
++                 set_restore->members_size, set->type->reqsize);
++              while (members_size + set->type->reqsize <=
++                     set_restore->members_size) {
++                      line++;
++                      DP("members: %u, line %u", members_size, line);
++                      res = __ip_set_addip(index,
++                                         data + used + members_size,
++                                         set->type->reqsize);
++                      if (!(res == 0 || res == -EEXIST)) 
++                              return line;
++                      members_size += set->type->reqsize;
++              }
++
++              DP("members_size %u  %u",
++                 set_restore->members_size, members_size);
++              if (members_size != set_restore->members_size)
++                      return line++;
++              used += set_restore->members_size;              
++      }
++      
++   bindings:
++      /* Loop to restore bindings */
++      while (used < len) {
++              line++;
++
++              DP("restore binding, line %u", line);           
++              /* Get and ensure size */
++              if (used + sizeof(struct ip_set_hash_save) > len)
++                      return line;
++              hash_save = (struct ip_set_hash_save *) (data + used);
++              used += sizeof(struct ip_set_hash_save);
++              
++              /* hash_save->id is used to store the index */
++              index = ip_set_find_byindex(hash_save->id);
++              DP("restore binding index %u, id %u, %u -> %u",
++                 index, hash_save->id, hash_save->ip, hash_save->binding);            
++              if (index != hash_save->id)
++                      return line;
++              if (ip_set_find_byindex(hash_save->binding) == IP_SET_INVALID_ID) {
++                      DP("corrupt binding set index %u", hash_save->binding);
++                      return line;
++              }
++              set = ip_set_list[hash_save->id];
++              /* Null valued IP means default binding */
++              if (hash_save->ip)
++                      res = ip_set_hash_add(set->id, 
++                                            hash_save->ip,
++                                            hash_save->binding);
++              else {
++                      IP_SET_ASSERT(set->binding == IP_SET_INVALID_ID);
++                      write_lock_bh(&ip_set_lock);
++                      set->binding = hash_save->binding;
++                      __ip_set_get(set->binding);
++                      write_unlock_bh(&ip_set_lock);
++                      DP("default binding: %u", set->binding);
++              }
++              if (res != 0)
++                      return line;
++      }
++      if (used != len)
++              return line;
++      
++      return 0;       
++}
++
++static int
++ip_set_sockfn_set(struct sock *sk, int optval, void *user, unsigned int len)
++{
++      void *data;
++      int res = 0;            /* Assume OK */
++      unsigned *op;
++      struct ip_set_req_adt *req_adt;
++      ip_set_id_t index = IP_SET_INVALID_ID;
++      int (*adtfn)(ip_set_id_t index,
++                   const void *data, size_t size);
++      struct fn_table {
++              int (*fn)(ip_set_id_t index,
++                        const void *data, size_t size);
++      } adtfn_table[] =
++      { { ip_set_addip }, { ip_set_delip }, { ip_set_testip},
++        { ip_set_bindip}, { ip_set_unbindip }, { ip_set_testbind },
++      };
++
++      DP("optval=%d, user=%p, len=%d", optval, user, len);
++      if (!capable(CAP_NET_ADMIN))
++              return -EPERM;
++      if (optval != SO_IP_SET)
++              return -EBADF;
++      if (len <= sizeof(unsigned)) {
++              ip_set_printk("short userdata (want >%zu, got %u)",
++                            sizeof(unsigned), len);
++              return -EINVAL;
++      }
++      data = vmalloc(len);
++      if (!data) {
++              DP("out of mem for %u bytes", len);
++              return -ENOMEM;
++      }
++      if (copy_from_user(data, user, len) != 0) {
++              res = -EFAULT;
++              goto done;
++      }
++      if (down_interruptible(&ip_set_app_mutex)) {
++              res = -EINTR;
++              goto done;
++      }
++
++      op = (unsigned *)data;
++      DP("op=%x", *op);
++      
++      if (*op < IP_SET_OP_VERSION) {
++              /* Check the version at the beginning of operations */
++              struct ip_set_req_version *req_version =
++                      (struct ip_set_req_version *) data;
++              if (req_version->version != IP_SET_PROTOCOL_VERSION) {
++                      res = -EPROTO;
++                      goto done;
++              }
++      }
++
++      switch (*op) {
++      case IP_SET_OP_CREATE:{
++              struct ip_set_req_create *req_create
++                      = (struct ip_set_req_create *) data;
++              
++              if (len < sizeof(struct ip_set_req_create)) {
++                      ip_set_printk("short CREATE data (want >=%zu, got %u)",
++                                    sizeof(struct ip_set_req_create), len);
++                      res = -EINVAL;
++                      goto done;
++              }
++              req_create->name[IP_SET_MAXNAMELEN - 1] = '\0';
++              req_create->typename[IP_SET_MAXNAMELEN - 1] = '\0';
++              res = ip_set_create(req_create->name,
++                                  req_create->typename,
++                                  IP_SET_INVALID_ID,
++                                  data + sizeof(struct ip_set_req_create),
++                                  len - sizeof(struct ip_set_req_create));
++              goto done;
++      }
++      case IP_SET_OP_DESTROY:{
++              struct ip_set_req_std *req_destroy
++                      = (struct ip_set_req_std *) data;
++              
++              if (len != sizeof(struct ip_set_req_std)) {
++                      ip_set_printk("invalid DESTROY data (want %zu, got %u)",
++                                    sizeof(struct ip_set_req_std), len);
++                      res = -EINVAL;
++                      goto done;
++              }
++              if (strcmp(req_destroy->name, IPSET_TOKEN_ALL) == 0) {
++                      /* Destroy all sets */
++                      index = IP_SET_INVALID_ID;
++              } else {
++                      req_destroy->name[IP_SET_MAXNAMELEN - 1] = '\0';
++                      index = ip_set_find_byname(req_destroy->name);
++
++                      if (index == IP_SET_INVALID_ID) {
++                              res = -ENOENT;
++                              goto done;
++                      }
++              }
++                      
++              res = ip_set_destroy(index);
++              goto done;
++      }
++      case IP_SET_OP_FLUSH:{
++              struct ip_set_req_std *req_flush =
++                      (struct ip_set_req_std *) data;
++
++              if (len != sizeof(struct ip_set_req_std)) {
++                      ip_set_printk("invalid FLUSH data (want %zu, got %u)",
++                                    sizeof(struct ip_set_req_std), len);
++                      res = -EINVAL;
++                      goto done;
++              }
++              if (strcmp(req_flush->name, IPSET_TOKEN_ALL) == 0) {
++                      /* Flush all sets */
++                      index = IP_SET_INVALID_ID;
++              } else {
++                      req_flush->name[IP_SET_MAXNAMELEN - 1] = '\0';
++                      index = ip_set_find_byname(req_flush->name);
++
++                      if (index == IP_SET_INVALID_ID) {
++                              res = -ENOENT;
++                              goto done;
++                      }
++              }
++              res = ip_set_flush(index);
++              goto done;
++      }
++      case IP_SET_OP_RENAME:{
++              struct ip_set_req_create *req_rename
++                      = (struct ip_set_req_create *) data;
++
++              if (len != sizeof(struct ip_set_req_create)) {
++                      ip_set_printk("invalid RENAME data (want %zu, got %u)",
++                                    sizeof(struct ip_set_req_create), len);
++                      res = -EINVAL;
++                      goto done;
++              }
++
++              req_rename->name[IP_SET_MAXNAMELEN - 1] = '\0';
++              req_rename->typename[IP_SET_MAXNAMELEN - 1] = '\0';
++                      
++              index = ip_set_find_byname(req_rename->name);
++              if (index == IP_SET_INVALID_ID) {
++                      res = -ENOENT;
++                      goto done;
++              }
++              res = ip_set_rename(index, req_rename->typename);
++              goto done;
++      }
++      case IP_SET_OP_SWAP:{
++              struct ip_set_req_create *req_swap
++                      = (struct ip_set_req_create *) data;
++              ip_set_id_t to_index;
++
++              if (len != sizeof(struct ip_set_req_create)) {
++                      ip_set_printk("invalid SWAP data (want %zu, got %u)",
++                                    sizeof(struct ip_set_req_create), len);
++                      res = -EINVAL;
++                      goto done;
++              }
++
++              req_swap->name[IP_SET_MAXNAMELEN - 1] = '\0';
++              req_swap->typename[IP_SET_MAXNAMELEN - 1] = '\0';
++
++              index = ip_set_find_byname(req_swap->name);
++              if (index == IP_SET_INVALID_ID) {
++                      res = -ENOENT;
++                      goto done;
++              }
++              to_index = ip_set_find_byname(req_swap->typename);
++              if (to_index == IP_SET_INVALID_ID) {
++                      res = -ENOENT;
++                      goto done;
++              }
++              res = ip_set_swap(index, to_index);
++              goto done;
++      }
++      default: 
++              break;  /* Set identified by id */
++      }
++      
++      /* There we may have add/del/test/bind/unbind/test_bind operations */
++      if (*op < IP_SET_OP_ADD_IP || *op > IP_SET_OP_TEST_BIND_SET) {
++              res = -EBADMSG;
++              goto done;
++      }
++      adtfn = adtfn_table[*op - IP_SET_OP_ADD_IP].fn;
++
++      if (len < sizeof(struct ip_set_req_adt)) {
++              ip_set_printk("short data in adt request (want >=%zu, got %u)",
++                            sizeof(struct ip_set_req_adt), len);
++              res = -EINVAL;
++              goto done;
++      }
++      req_adt = (struct ip_set_req_adt *) data;
++
++      /* -U :all: :all:|:default: uses IP_SET_INVALID_ID */
++      if (!(*op == IP_SET_OP_UNBIND_SET 
++            && req_adt->index == IP_SET_INVALID_ID)) {
++              index = ip_set_find_byindex(req_adt->index);
++              if (index == IP_SET_INVALID_ID) {
++                      res = -ENOENT;
++                      goto done;
++              }
++      }
++      res = adtfn(index, data, len);
++
++    done:
++      up(&ip_set_app_mutex);
++      vfree(data);
++      if (res > 0)
++              res = 0;
++      DP("final result %d", res);
++      return res;
++}
++
++static int 
++ip_set_sockfn_get(struct sock *sk, int optval, void *user, int *len)
++{
++      int res = 0;
++      unsigned *op;
++      ip_set_id_t index = IP_SET_INVALID_ID;
++      void *data;
++      int copylen = *len;
++
++      DP("optval=%d, user=%p, len=%d", optval, user, *len);
++      if (!capable(CAP_NET_ADMIN))
++              return -EPERM;
++      if (optval != SO_IP_SET)
++              return -EBADF;
++      if (*len < sizeof(unsigned)) {
++              ip_set_printk("short userdata (want >=%zu, got %d)",
++                            sizeof(unsigned), *len);
++              return -EINVAL;
++      }
++      data = vmalloc(*len);
++      if (!data) {
++              DP("out of mem for %d bytes", *len);
++              return -ENOMEM;
++      }
++      if (copy_from_user(data, user, *len) != 0) {
++              res = -EFAULT;
++              goto done;
++      }
++      if (down_interruptible(&ip_set_app_mutex)) {
++              res = -EINTR;
++              goto done;
++      }
++
++      op = (unsigned *) data;
++      DP("op=%x", *op);
++
++      if (*op < IP_SET_OP_VERSION) {
++              /* Check the version at the beginning of operations */
++              struct ip_set_req_version *req_version =
++                      (struct ip_set_req_version *) data;
++              if (req_version->version != IP_SET_PROTOCOL_VERSION) {
++                      res = -EPROTO;
++                      goto done;
++              }
++      }
++
++      switch (*op) {
++      case IP_SET_OP_VERSION: {
++              struct ip_set_req_version *req_version =
++                  (struct ip_set_req_version *) data;
++
++              if (*len != sizeof(struct ip_set_req_version)) {
++                      ip_set_printk("invalid VERSION (want %zu, got %d)",
++                                    sizeof(struct ip_set_req_version),
++                                    *len);
++                      res = -EINVAL;
++                      goto done;
++              }
++
++              req_version->version = IP_SET_PROTOCOL_VERSION;
++              res = copy_to_user(user, req_version,
++                                 sizeof(struct ip_set_req_version));
++              goto done;
++      }
++      case IP_SET_OP_GET_BYNAME: {
++              struct ip_set_req_get_set *req_get
++                      = (struct ip_set_req_get_set *) data;
++
++              if (*len != sizeof(struct ip_set_req_get_set)) {
++                      ip_set_printk("invalid GET_BYNAME (want %zu, got %d)",
++                                    sizeof(struct ip_set_req_get_set), *len);
++                      res = -EINVAL;
++                      goto done;
++              }
++              req_get->set.name[IP_SET_MAXNAMELEN - 1] = '\0';
++              index = ip_set_find_byname(req_get->set.name);
++              req_get->set.index = index;
++              goto copy;
++      }
++      case IP_SET_OP_GET_BYINDEX: {
++              struct ip_set_req_get_set *req_get
++                      = (struct ip_set_req_get_set *) data;
++
++              if (*len != sizeof(struct ip_set_req_get_set)) {
++                      ip_set_printk("invalid GET_BYINDEX (want %zu, got %d)",
++                                    sizeof(struct ip_set_req_get_set), *len);
++                      res = -EINVAL;
++                      goto done;
++              }
++              req_get->set.name[IP_SET_MAXNAMELEN - 1] = '\0';
++              index = ip_set_find_byindex(req_get->set.index);
++              strncpy(req_get->set.name,
++                      index == IP_SET_INVALID_ID ? ""
++                      : ip_set_list[index]->name, IP_SET_MAXNAMELEN);
++              goto copy;
++      }
++      case IP_SET_OP_ADT_GET: {
++              struct ip_set_req_adt_get *req_get
++                      = (struct ip_set_req_adt_get *) data;
++
++              if (*len != sizeof(struct ip_set_req_adt_get)) {
++                      ip_set_printk("invalid ADT_GET (want %zu, got %d)",
++                                    sizeof(struct ip_set_req_adt_get), *len);
++                      res = -EINVAL;
++                      goto done;
++              }
++              req_get->set.name[IP_SET_MAXNAMELEN - 1] = '\0';
++              index = ip_set_find_byname(req_get->set.name);
++              if (index != IP_SET_INVALID_ID) {
++                      req_get->set.index = index;
++                      strncpy(req_get->typename,
++                              ip_set_list[index]->type->typename,
++                              IP_SET_MAXNAMELEN - 1);
++              } else {
++                      res = -ENOENT;
++                      goto done;
++              }
++              goto copy;
++      }
++      case IP_SET_OP_MAX_SETS: {
++              struct ip_set_req_max_sets *req_max_sets
++                      = (struct ip_set_req_max_sets *) data;
++              ip_set_id_t i;
++
++              if (*len != sizeof(struct ip_set_req_max_sets)) {
++                      ip_set_printk("invalid MAX_SETS (want %zu, got %d)",
++                                    sizeof(struct ip_set_req_max_sets), *len);
++                      res = -EINVAL;
++                      goto done;
++              }
++
++              if (strcmp(req_max_sets->set.name, IPSET_TOKEN_ALL) == 0) {
++                      req_max_sets->set.index = IP_SET_INVALID_ID;
++              } else {
++                      req_max_sets->set.name[IP_SET_MAXNAMELEN - 1] = '\0';
++                      req_max_sets->set.index = 
++                              ip_set_find_byname(req_max_sets->set.name);
++                      if (req_max_sets->set.index == IP_SET_INVALID_ID) {
++                              res = -ENOENT;
++                              goto done;
++                      }
++              }
++              req_max_sets->max_sets = ip_set_max;
++              req_max_sets->sets = 0;
++              for (i = 0; i < ip_set_max; i++) {
++                      if (ip_set_list[i] != NULL)
++                              req_max_sets->sets++;
++              }
++              goto copy;
++      }
++      case IP_SET_OP_LIST_SIZE: 
++      case IP_SET_OP_SAVE_SIZE: {
++              struct ip_set_req_setnames *req_setnames
++                      = (struct ip_set_req_setnames *) data;
++              struct ip_set_name_list *name_list;
++              struct ip_set *set;
++              ip_set_id_t i;
++              int used;
++
++              if (*len < sizeof(struct ip_set_req_setnames)) {
++                      ip_set_printk("short LIST_SIZE (want >=%zu, got %d)",
++                                    sizeof(struct ip_set_req_setnames), *len);
++                      res = -EINVAL;
++                      goto done;
++              }
++
++              req_setnames->size = 0;
++              used = sizeof(struct ip_set_req_setnames);
++              for (i = 0; i < ip_set_max; i++) {
++                      if (ip_set_list[i] == NULL)
++                              continue;
++                      name_list = (struct ip_set_name_list *) 
++                              (data + used);
++                      used += sizeof(struct ip_set_name_list);
++                      if (used > copylen) {
++                              res = -EAGAIN;
++                              goto done;
++                      }
++                      set = ip_set_list[i];
++                      /* Fill in index, name, etc. */
++                      name_list->index = i;
++                      name_list->id = set->id;
++                      strncpy(name_list->name,
++                              set->name,
++                              IP_SET_MAXNAMELEN - 1);
++                      strncpy(name_list->typename,
++                              set->type->typename,
++                              IP_SET_MAXNAMELEN - 1);
++                      DP("filled %s of type %s, index %u\n",
++                         name_list->name, name_list->typename,
++                         name_list->index);
++                      if (!(req_setnames->index == IP_SET_INVALID_ID
++                            || req_setnames->index == i))
++                            continue;
++                      /* Update size */
++                      switch (*op) {
++                      case IP_SET_OP_LIST_SIZE: {
++                              req_setnames->size += sizeof(struct ip_set_list)
++                                      + set->type->header_size
++                                      + set->type->list_members_size(set);
++                              /* Sets are identified by id in the hash */
++                              FOREACH_HASH_DO(__set_hash_bindings_size_list, 
++                                              set->id, &req_setnames->size);
++                              break;
++                      }
++                      case IP_SET_OP_SAVE_SIZE: {
++                              req_setnames->size += sizeof(struct ip_set_save)
++                                      + set->type->header_size
++                                      + set->type->list_members_size(set);
++                              FOREACH_HASH_DO(__set_hash_bindings_size_save,
++                                              set->id, &req_setnames->size);
++                              break;
++                      }
++                      default:
++                              break;
++                      }
++              }
++              if (copylen != used) {
++                      res = -EAGAIN;
++                      goto done;
++              }
++              goto copy;
++      }
++      case IP_SET_OP_LIST: {
++              struct ip_set_req_list *req_list
++                      = (struct ip_set_req_list *) data;
++              ip_set_id_t i;
++              int used;
++
++              if (*len < sizeof(struct ip_set_req_list)) {
++                      ip_set_printk("short LIST (want >=%zu, got %d)",
++                                    sizeof(struct ip_set_req_list), *len);
++                      res = -EINVAL;
++                      goto done;
++              }
++              index = req_list->index;
++              if (index != IP_SET_INVALID_ID
++                  && ip_set_find_byindex(index) != index) {
++                      res = -ENOENT;
++                      goto done;
++              }
++              used = 0;
++              if (index == IP_SET_INVALID_ID) {
++                      /* List all sets */
++                      for (i = 0; i < ip_set_max && res == 0; i++) {
++                              if (ip_set_list[i] != NULL)
++                                      res = ip_set_list_set(i, data, &used, *len);
++                      }
++              } else {
++                      /* List an individual set */
++                      res = ip_set_list_set(index, data, &used, *len);
++              }
++              if (res != 0)
++                      goto done;
++              else if (copylen != used) {
++                      res = -EAGAIN;
++                      goto done;
++              }
++              goto copy;
++      }
++      case IP_SET_OP_SAVE: {
++              struct ip_set_req_list *req_save
++                      = (struct ip_set_req_list *) data;
++              ip_set_id_t i;
++              int used;
++
++              if (*len < sizeof(struct ip_set_req_list)) {
++                      ip_set_printk("short SAVE (want >=%zu, got %d)",
++                                    sizeof(struct ip_set_req_list), *len);
++                      res = -EINVAL;
++                      goto done;
++              }
++              index = req_save->index;
++              if (index != IP_SET_INVALID_ID
++                  && ip_set_find_byindex(index) != index) {
++                      res = -ENOENT;
++                      goto done;
++              }
++              used = 0;
++              if (index == IP_SET_INVALID_ID) {
++                      /* Save all sets */
++                      for (i = 0; i < ip_set_max && res == 0; i++) {
++                              if (ip_set_list[i] != NULL)
++                                      res = ip_set_save_set(i, data, &used, *len);
++                      }
++              } else {
++                      /* Save an individual set */
++                      res = ip_set_save_set(index, data, &used, *len);
++              }
++              if (res == 0)
++                      res = ip_set_save_bindings(index, data, &used, *len);
++                      
++              if (res != 0)
++                      goto done;
++              else if (copylen != used) {
++                      res = -EAGAIN;
++                      goto done;
++              }
++              goto copy;
++      }
++      case IP_SET_OP_RESTORE: {
++              struct ip_set_req_setnames *req_restore
++                      = (struct ip_set_req_setnames *) data;
++              int line;
++
++              if (*len < sizeof(struct ip_set_req_setnames)
++                  || *len != req_restore->size) {
++                      ip_set_printk("invalid RESTORE (want =%zu, got %d)",
++                                    req_restore->size, *len);
++                      res = -EINVAL;
++                      goto done;
++              }
++              line = ip_set_restore(data + sizeof(struct ip_set_req_setnames),
++                                    req_restore->size - sizeof(struct ip_set_req_setnames));
++              DP("ip_set_restore: %u", line);
++              if (line != 0) {
++                      res = -EAGAIN;
++                      req_restore->size = line;
++                      copylen = sizeof(struct ip_set_req_setnames);
++                      goto copy;
++              }
++              goto done;
++      }
++      default:
++              res = -EBADMSG;
++              goto done;
++      }       /* end of switch(op) */
++
++    copy:
++      DP("set %s, copylen %u", index != IP_SET_INVALID_ID
++                               && ip_set_list[index]
++                   ? ip_set_list[index]->name
++                   : ":all:", copylen);
++      res = copy_to_user(user, data, copylen);
++      
++    done:
++      up(&ip_set_app_mutex);
++      vfree(data);
++      if (res > 0)
++              res = 0;
++      DP("final result %d", res);
++      return res;
++}
++
++static struct nf_sockopt_ops so_set = {
++      .pf             = PF_INET,
++      .set_optmin     = SO_IP_SET,
++      .set_optmax     = SO_IP_SET + 1,
++      .set            = &ip_set_sockfn_set,
++      .get_optmin     = SO_IP_SET,
++      .get_optmax     = SO_IP_SET + 1,
++      .get            = &ip_set_sockfn_get,
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,23)
++      .use            = 0,
++#else
++      .owner          = THIS_MODULE,
++#endif
++};
++
++static int max_sets, hash_size;
++module_param(max_sets, int, 0600);
++MODULE_PARM_DESC(max_sets, "maximal number of sets");
++module_param(hash_size, int, 0600);
++MODULE_PARM_DESC(hash_size, "hash size for bindings");
++MODULE_LICENSE("GPL");
++MODULE_AUTHOR("Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>");
++MODULE_DESCRIPTION("module implementing core IP set support");
++
++static int __init ip_set_init(void)
++{
++      int res;
++      ip_set_id_t i;
++
++      get_random_bytes(&ip_set_hash_random, 4);
++      if (max_sets)
++              ip_set_max = max_sets;
++      ip_set_list = vmalloc(sizeof(struct ip_set *) * ip_set_max);
++      if (!ip_set_list) {
++              printk(KERN_ERR "Unable to create ip_set_list\n");
++              return -ENOMEM;
++      }
++      memset(ip_set_list, 0, sizeof(struct ip_set *) * ip_set_max);
++      if (hash_size)
++              ip_set_bindings_hash_size = hash_size;
++      ip_set_hash = vmalloc(sizeof(struct list_head) * ip_set_bindings_hash_size);
++      if (!ip_set_hash) {
++              printk(KERN_ERR "Unable to create ip_set_hash\n");
++              vfree(ip_set_list);
++              return -ENOMEM;
++      }
++      for (i = 0; i < ip_set_bindings_hash_size; i++)
++              INIT_LIST_HEAD(&ip_set_hash[i]);
++
++      INIT_LIST_HEAD(&set_type_list);
++
++      res = nf_register_sockopt(&so_set);
++      if (res != 0) {
++              ip_set_printk("SO_SET registry failed: %d", res);
++              vfree(ip_set_list);
++              vfree(ip_set_hash);
++              return res;
++      }
++      return 0;
++}
++
++static void __exit ip_set_fini(void)
++{
++      /* There can't be any existing set or binding */
++      nf_unregister_sockopt(&so_set);
++      vfree(ip_set_list);
++      vfree(ip_set_hash);
++      DP("these are the famous last words");
++}
++
++EXPORT_SYMBOL(ip_set_register_set_type);
++EXPORT_SYMBOL(ip_set_unregister_set_type);
++
++EXPORT_SYMBOL(ip_set_get_byname);
++EXPORT_SYMBOL(ip_set_get_byindex);
++EXPORT_SYMBOL(ip_set_put);
++
++EXPORT_SYMBOL(ip_set_addip_kernel);
++EXPORT_SYMBOL(ip_set_delip_kernel);
++EXPORT_SYMBOL(ip_set_testip_kernel);
++
++module_init(ip_set_init);
++module_exit(ip_set_fini);
+diff -Nurp linux-2.6.22.10-vs2.3.0.29-pl02/net/ipv4/netfilter/ip_set_iphash.c linux-2.6.22.10-vs2.3.0.29-pl03/net/ipv4/netfilter/ip_set_iphash.c
+--- linux-2.6.22.10-vs2.3.0.29-pl02/net/ipv4/netfilter/ip_set_iphash.c 1969-12-31 19:00:00.000000000 -0500
++++ linux-2.6.22.10-vs2.3.0.29-pl03/net/ipv4/netfilter/ip_set_iphash.c 2007-11-14 14:12:25.000000000 -0500
+@@ -0,0 +1,429 @@
++/* Copyright (C) 2003-2004 Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License version 2 as
++ * published by the Free Software Foundation.  
++ */
++
++/* Kernel module implementing an ip hash set */
++
++#include <linux/module.h>
++#include <linux/ip.h>
++#include <linux/skbuff.h>
++#include <linux/version.h>
++#include <linux/jhash.h>
++#include <linux/netfilter_ipv4/ip_tables.h>
++#include <linux/netfilter_ipv4/ip_set.h>
++#include <linux/errno.h>
++#include <asm/uaccess.h>
++#include <asm/bitops.h>
++#include <linux/spinlock.h>
++#include <linux/vmalloc.h>
++#include <linux/random.h>
++
++#include <net/ip.h>
++
++#include <linux/netfilter_ipv4/ip_set_malloc.h>
++#include <linux/netfilter_ipv4/ip_set_iphash.h>
++
++static int limit = MAX_RANGE;
++
++static inline __u32
++jhash_ip(const struct ip_set_iphash *map, uint16_t i, ip_set_ip_t ip)
++{
++      return jhash_1word(ip, *(((uint32_t *) map->initval) + i));
++}
++
++static inline __u32
++hash_id(struct ip_set *set, ip_set_ip_t ip, ip_set_ip_t *hash_ip)
++{
++      struct ip_set_iphash *map = (struct ip_set_iphash *) set->data;
++      __u32 id;
++      u_int16_t i;
++      ip_set_ip_t *elem;
++
++      *hash_ip = ip & map->netmask;
++      DP("set: %s, ip:%u.%u.%u.%u, %u.%u.%u.%u, %u.%u.%u.%u",
++         set->name, HIPQUAD(ip), HIPQUAD(*hash_ip), HIPQUAD(map->netmask));
++      
++      for (i = 0; i < map->probes; i++) {
++              id = jhash_ip(map, i, *hash_ip) % map->hashsize;
++              DP("hash key: %u", id);
++              elem = HARRAY_ELEM(map->members, ip_set_ip_t *, id);
++              if (*elem == *hash_ip)
++                      return id;
++              /* No shortcut at testing - there can be deleted
++               * entries. */
++      }
++      return UINT_MAX;
++}
++
++static inline int
++__testip(struct ip_set *set, ip_set_ip_t ip, ip_set_ip_t *hash_ip)
++{
++      return (ip && hash_id(set, ip, hash_ip) != UINT_MAX);
++}
++
++static int
++testip(struct ip_set *set, const void *data, size_t size,
++       ip_set_ip_t *hash_ip)
++{
++      struct ip_set_req_iphash *req = 
++          (struct ip_set_req_iphash *) data;
++
++      if (size != sizeof(struct ip_set_req_iphash)) {
++              ip_set_printk("data length wrong (want %zu, have %zu)",
++                            sizeof(struct ip_set_req_iphash),
++                            size);
++              return -EINVAL;
++      }
++      return __testip(set, req->ip, hash_ip);
++}
++
++static int
++testip_kernel(struct ip_set *set, 
++            const struct sk_buff *skb,
++            ip_set_ip_t *hash_ip,
++            const u_int32_t *flags,
++            unsigned char index)
++{
++      return __testip(set,
++                      ntohl(flags[index] & IPSET_SRC 
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22)
++                              ? ip_hdr(skb)->saddr 
++                              : ip_hdr(skb)->daddr),
++#else
++                              ? skb->nh.iph->saddr 
++                              : skb->nh.iph->daddr),
++#endif
++                      hash_ip);
++}
++
++static inline int
++__addip(struct ip_set_iphash *map, ip_set_ip_t ip, ip_set_ip_t *hash_ip)
++{
++      __u32 probe;
++      u_int16_t i;
++      ip_set_ip_t *elem;
++      
++      if (!ip || map->elements >= limit)
++              return -ERANGE;
++
++      *hash_ip = ip & map->netmask;
++      
++      for (i = 0; i < map->probes; i++) {
++              probe = jhash_ip(map, i, *hash_ip) % map->hashsize;
++              elem = HARRAY_ELEM(map->members, ip_set_ip_t *, probe);
++              if (*elem == *hash_ip)
++                      return -EEXIST;
++              if (!*elem) {
++                      *elem = *hash_ip;
++                      map->elements++;
++                      return 0;
++              }
++      }
++      /* Trigger rehashing */
++      return -EAGAIN;
++}
++
++static int
++addip(struct ip_set *set, const void *data, size_t size,
++        ip_set_ip_t *hash_ip)
++{
++      struct ip_set_req_iphash *req = 
++          (struct ip_set_req_iphash *) data;
++
++      if (size != sizeof(struct ip_set_req_iphash)) {
++              ip_set_printk("data length wrong (want %zu, have %zu)",
++                            sizeof(struct ip_set_req_iphash),
++                            size);
++              return -EINVAL;
++      }
++      return __addip((struct ip_set_iphash *) set->data, req->ip, hash_ip);
++}
++
++static int
++addip_kernel(struct ip_set *set, 
++           const struct sk_buff *skb,
++           ip_set_ip_t *hash_ip,
++           const u_int32_t *flags,
++           unsigned char index)
++{
++      return __addip((struct ip_set_iphash *) set->data,
++                     ntohl(flags[index] & IPSET_SRC 
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22)
++                              ? ip_hdr(skb)->saddr 
++                              : ip_hdr(skb)->daddr),
++#else
++                              ? skb->nh.iph->saddr 
++                              : skb->nh.iph->daddr),
++#endif
++                     hash_ip);
++}
++
++static int retry(struct ip_set *set)
++{
++      struct ip_set_iphash *map = (struct ip_set_iphash *) set->data;
++      ip_set_ip_t hash_ip, *elem;
++      void *members;
++      u_int32_t i, hashsize = map->hashsize;
++      int res;
++      struct ip_set_iphash *tmp;
++      
++      if (map->resize == 0)
++              return -ERANGE;
++
++    again:
++      res = 0;
++      
++      /* Calculate new hash size */
++      hashsize += (hashsize * map->resize)/100;
++      if (hashsize == map->hashsize)
++              hashsize++;
++      
++      ip_set_printk("rehashing of set %s triggered: "
++                    "hashsize grows from %u to %u",
++                    set->name, map->hashsize, hashsize);
++
++      tmp = kmalloc(sizeof(struct ip_set_iphash) 
++                    + map->probes * sizeof(uint32_t), GFP_ATOMIC);
++      if (!tmp) {
++              DP("out of memory for %d bytes",
++                 sizeof(struct ip_set_iphash)
++                 + map->probes * sizeof(uint32_t));
++              return -ENOMEM;
++      }
++      tmp->members = harray_malloc(hashsize, sizeof(ip_set_ip_t), GFP_ATOMIC);
++      if (!tmp->members) {
++              DP("out of memory for %d bytes", hashsize * sizeof(ip_set_ip_t));
++              kfree(tmp);
++              return -ENOMEM;
++      }
++      tmp->hashsize = hashsize;
++      tmp->elements = 0;
++      tmp->probes = map->probes;
++      tmp->resize = map->resize;
++      tmp->netmask = map->netmask;
++      memcpy(tmp->initval, map->initval, map->probes * sizeof(uint32_t));
++      
++      write_lock_bh(&set->lock);
++      map = (struct ip_set_iphash *) set->data; /* Play safe */
++      for (i = 0; i < map->hashsize && res == 0; i++) {
++              elem = HARRAY_ELEM(map->members, ip_set_ip_t *, i);     
++              if (*elem)
++                      res = __addip(tmp, *elem, &hash_ip);
++      }
++      if (res) {
++              /* Failure, try again */
++              write_unlock_bh(&set->lock);
++              harray_free(tmp->members);
++              kfree(tmp);
++              goto again;
++      }
++      
++      /* Success at resizing! */
++      members = map->members;
++
++      map->hashsize = tmp->hashsize;
++      map->members = tmp->members;
++      write_unlock_bh(&set->lock);
++
++      harray_free(members);
++      kfree(tmp);
++
++      return 0;
++}
++
++static inline int
++__delip(struct ip_set *set, ip_set_ip_t ip, ip_set_ip_t *hash_ip)
++{
++      struct ip_set_iphash *map = (struct ip_set_iphash *) set->data;
++      ip_set_ip_t id, *elem;
++
++      if (!ip)
++              return -ERANGE;
++
++      id = hash_id(set, ip, hash_ip);
++      if (id == UINT_MAX)
++              return -EEXIST;
++              
++      elem = HARRAY_ELEM(map->members, ip_set_ip_t *, id);
++      *elem = 0;
++      map->elements--;
++
++      return 0;
++}
++
++static int
++delip(struct ip_set *set, const void *data, size_t size,
++        ip_set_ip_t *hash_ip)
++{
++      struct ip_set_req_iphash *req =
++          (struct ip_set_req_iphash *) data;
++
++      if (size != sizeof(struct ip_set_req_iphash)) {
++              ip_set_printk("data length wrong (want %zu, have %zu)",
++                            sizeof(struct ip_set_req_iphash),
++                            size);
++              return -EINVAL;
++      }
++      return __delip(set, req->ip, hash_ip);
++}
++
++static int
++delip_kernel(struct ip_set *set, 
++           const struct sk_buff *skb,
++           ip_set_ip_t *hash_ip,
++           const u_int32_t *flags,
++           unsigned char index)
++{
++      return __delip(set,
++                     ntohl(flags[index] & IPSET_SRC 
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22)
++                              ? ip_hdr(skb)->saddr 
++                              : ip_hdr(skb)->daddr),
++#else
++                              ? skb->nh.iph->saddr 
++                              : skb->nh.iph->daddr),
++#endif
++                     hash_ip);
++}
++
++static int create(struct ip_set *set, const void *data, size_t size)
++{
++      struct ip_set_req_iphash_create *req =
++          (struct ip_set_req_iphash_create *) data;
++      struct ip_set_iphash *map;
++      uint16_t i;
++
++      if (size != sizeof(struct ip_set_req_iphash_create)) {
++              ip_set_printk("data length wrong (want %zu, have %zu)",
++                             sizeof(struct ip_set_req_iphash_create),
++                             size);
++              return -EINVAL;
++      }
++
++      if (req->hashsize < 1) {
++              ip_set_printk("hashsize too small");
++              return -ENOEXEC;
++      }
++
++      if (req->probes < 1) {
++              ip_set_printk("probes too small");
++              return -ENOEXEC;
++      }
++
++      map = kmalloc(sizeof(struct ip_set_iphash) 
++                    + req->probes * sizeof(uint32_t), GFP_KERNEL);
++      if (!map) {
++              DP("out of memory for %d bytes",
++                 sizeof(struct ip_set_iphash)
++                 + req->probes * sizeof(uint32_t));
++              return -ENOMEM;
++      }
++      for (i = 0; i < req->probes; i++)
++              get_random_bytes(((uint32_t *) map->initval)+i, 4);
++      map->elements = 0;
++      map->hashsize = req->hashsize;
++      map->probes = req->probes;
++      map->resize = req->resize;
++      map->netmask = req->netmask;
++      map->members = harray_malloc(map->hashsize, sizeof(ip_set_ip_t), GFP_KERNEL);
++      if (!map->members) {
++              DP("out of memory for %d bytes", map->hashsize * sizeof(ip_set_ip_t));
++              kfree(map);
++              return -ENOMEM;
++      }
++
++      set->data = map;
++      return 0;
++}
++
++static void destroy(struct ip_set *set)
++{
++      struct ip_set_iphash *map = (struct ip_set_iphash *) set->data;
++
++      harray_free(map->members);
++      kfree(map);
++
++      set->data = NULL;
++}
++
++static void flush(struct ip_set *set)
++{
++      struct ip_set_iphash *map = (struct ip_set_iphash *) set->data;
++      harray_flush(map->members, map->hashsize, sizeof(ip_set_ip_t));
++      map->elements = 0;
++}
++
++static void list_header(const struct ip_set *set, void *data)
++{
++      struct ip_set_iphash *map = (struct ip_set_iphash *) set->data;
++      struct ip_set_req_iphash_create *header =
++          (struct ip_set_req_iphash_create *) data;
++
++      header->hashsize = map->hashsize;
++      header->probes = map->probes;
++      header->resize = map->resize;
++      header->netmask = map->netmask;
++}
++
++static int list_members_size(const struct ip_set *set)
++{
++      struct ip_set_iphash *map = (struct ip_set_iphash *) set->data;
++
++      return (map->hashsize * sizeof(ip_set_ip_t));
++}
++
++static void list_members(const struct ip_set *set, void *data)
++{
++      struct ip_set_iphash *map = (struct ip_set_iphash *) set->data;
++      ip_set_ip_t i, *elem;
++
++      for (i = 0; i < map->hashsize; i++) {
++              elem = HARRAY_ELEM(map->members, ip_set_ip_t *, i);     
++              ((ip_set_ip_t *)data)[i] = *elem;
++      }
++}
++
++static struct ip_set_type ip_set_iphash = {
++      .typename               = SETTYPE_NAME,
++      .features               = IPSET_TYPE_IP | IPSET_DATA_SINGLE,
++      .protocol_version       = IP_SET_PROTOCOL_VERSION,
++      .create                 = &create,
++      .destroy                = &destroy,
++      .flush                  = &flush,
++      .reqsize                = sizeof(struct ip_set_req_iphash),
++      .addip                  = &addip,
++      .addip_kernel           = &addip_kernel,
++      .retry                  = &retry,
++      .delip                  = &delip,
++      .delip_kernel           = &delip_kernel,
++      .testip                 = &testip,
++      .testip_kernel          = &testip_kernel,
++      .header_size            = sizeof(struct ip_set_req_iphash_create),
++      .list_header            = &list_header,
++      .list_members_size      = &list_members_size,
++      .list_members           = &list_members,
++      .me                     = THIS_MODULE,
++};
++
++MODULE_LICENSE("GPL");
++MODULE_AUTHOR("Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>");
++MODULE_DESCRIPTION("iphash type of IP sets");
++module_param(limit, int, 0600);
++MODULE_PARM_DESC(limit, "maximal number of elements stored in the sets");
++
++static int __init ip_set_iphash_init(void)
++{
++      return ip_set_register_set_type(&ip_set_iphash);
++}
++
++static void __exit ip_set_iphash_fini(void)
++{
++      /* FIXME: possible race with ip_set_create() */
++      ip_set_unregister_set_type(&ip_set_iphash);
++}
++
++module_init(ip_set_iphash_init);
++module_exit(ip_set_iphash_fini);
+diff -Nurp linux-2.6.22.10-vs2.3.0.29-pl02/net/ipv4/netfilter/ip_set_ipmap.c linux-2.6.22.10-vs2.3.0.29-pl03/net/ipv4/netfilter/ip_set_ipmap.c
+--- linux-2.6.22.10-vs2.3.0.29-pl02/net/ipv4/netfilter/ip_set_ipmap.c  1969-12-31 19:00:00.000000000 -0500
++++ linux-2.6.22.10-vs2.3.0.29-pl03/net/ipv4/netfilter/ip_set_ipmap.c  2007-11-14 14:12:25.000000000 -0500
+@@ -0,0 +1,336 @@
++/* Copyright (C) 2000-2002 Joakim Axelsson <gozem@linux.nu>
++ *                         Patrick Schaaf <bof@bof.de>
++ * Copyright (C) 2003-2004 Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License version 2 as
++ * published by the Free Software Foundation.  
++ */
++
++/* Kernel module implementing an IP set type: the single bitmap type */
++
++#include <linux/module.h>
++#include <linux/ip.h>
++#include <linux/skbuff.h>
++#include <linux/version.h>
++#include <linux/netfilter_ipv4/ip_tables.h>
++#include <linux/netfilter_ipv4/ip_set.h>
++#include <linux/errno.h>
++#include <asm/uaccess.h>
++#include <asm/bitops.h>
++#include <linux/spinlock.h>
++
++#include <linux/netfilter_ipv4/ip_set_ipmap.h>
++
++static inline ip_set_ip_t
++ip_to_id(const struct ip_set_ipmap *map, ip_set_ip_t ip)
++{
++      return (ip - map->first_ip)/map->hosts;
++}
++
++static inline int
++__testip(struct ip_set *set, ip_set_ip_t ip, ip_set_ip_t *hash_ip)
++{
++      struct ip_set_ipmap *map = (struct ip_set_ipmap *) set->data;
++      
++      if (ip < map->first_ip || ip > map->last_ip)
++              return -ERANGE;
++
++      *hash_ip = ip & map->netmask;
++      DP("set: %s, ip:%u.%u.%u.%u, %u.%u.%u.%u",
++         set->name, HIPQUAD(ip), HIPQUAD(*hash_ip));
++      return !!test_bit(ip_to_id(map, *hash_ip), map->members);
++}
++
++static int
++testip(struct ip_set *set, const void *data, size_t size,
++       ip_set_ip_t *hash_ip)
++{
++      struct ip_set_req_ipmap *req = 
++          (struct ip_set_req_ipmap *) data;
++
++      if (size != sizeof(struct ip_set_req_ipmap)) {
++              ip_set_printk("data length wrong (want %zu, have %zu)",
++                            sizeof(struct ip_set_req_ipmap),
++                            size);
++              return -EINVAL;
++      }
++      return __testip(set, req->ip, hash_ip);
++}
++
++static int
++testip_kernel(struct ip_set *set, 
++            const struct sk_buff *skb,
++            ip_set_ip_t *hash_ip,
++            const u_int32_t *flags,
++            unsigned char index)
++{
++      int res =  __testip(set,
++                      ntohl(flags[index] & IPSET_SRC
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22)
++                              ? ip_hdr(skb)->saddr 
++                              : ip_hdr(skb)->daddr),
++#else
++                              ? skb->nh.iph->saddr 
++                              : skb->nh.iph->daddr),
++#endif
++                      hash_ip);
++      return (res < 0 ? 0 : res);
++}
++
++static inline int
++__addip(struct ip_set *set, ip_set_ip_t ip, ip_set_ip_t *hash_ip)
++{
++      struct ip_set_ipmap *map = (struct ip_set_ipmap *) set->data;
++
++      if (ip < map->first_ip || ip > map->last_ip)
++              return -ERANGE;
++
++      *hash_ip = ip & map->netmask;
++      DP("%u.%u.%u.%u, %u.%u.%u.%u", HIPQUAD(ip), HIPQUAD(*hash_ip));
++      if (test_and_set_bit(ip_to_id(map, *hash_ip), map->members))
++              return -EEXIST;
++
++      return 0;
++}
++
++static int
++addip(struct ip_set *set, const void *data, size_t size,
++      ip_set_ip_t *hash_ip)
++{
++      struct ip_set_req_ipmap *req = 
++          (struct ip_set_req_ipmap *) data;
++
++      if (size != sizeof(struct ip_set_req_ipmap)) {
++              ip_set_printk("data length wrong (want %zu, have %zu)",
++                            sizeof(struct ip_set_req_ipmap),
++                            size);
++              return -EINVAL;
++      }
++      DP("%u.%u.%u.%u", HIPQUAD(req->ip));
++      return __addip(set, req->ip, hash_ip);
++}
++
++static int
++addip_kernel(struct ip_set *set, 
++           const struct sk_buff *skb,
++           ip_set_ip_t *hash_ip,
++           const u_int32_t *flags,
++           unsigned char index)
++{
++      return __addip(set,
++                     ntohl(flags[index] & IPSET_SRC 
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22)
++                              ? ip_hdr(skb)->saddr 
++                              : ip_hdr(skb)->daddr),
++#else
++                              ? skb->nh.iph->saddr 
++                              : skb->nh.iph->daddr),
++#endif
++                     hash_ip);
++}
++
++static inline int 
++__delip(struct ip_set *set, ip_set_ip_t ip, ip_set_ip_t *hash_ip)
++{
++      struct ip_set_ipmap *map = (struct ip_set_ipmap *) set->data;
++
++      if (ip < map->first_ip || ip > map->last_ip)
++              return -ERANGE;
++
++      *hash_ip = ip & map->netmask;
++      DP("%u.%u.%u.%u, %u.%u.%u.%u", HIPQUAD(ip), HIPQUAD(*hash_ip));
++      if (!test_and_clear_bit(ip_to_id(map, *hash_ip), map->members))
++              return -EEXIST;
++      
++      return 0;
++}
++
++static int
++delip(struct ip_set *set, const void *data, size_t size,
++      ip_set_ip_t *hash_ip)
++{
++      struct ip_set_req_ipmap *req =
++          (struct ip_set_req_ipmap *) data;
++
++      if (size != sizeof(struct ip_set_req_ipmap)) {
++              ip_set_printk("data length wrong (want %zu, have %zu)",
++                            sizeof(struct ip_set_req_ipmap),
++                            size);
++              return -EINVAL;
++      }
++      return __delip(set, req->ip, hash_ip);
++}
++
++static int
++delip_kernel(struct ip_set *set,
++           const struct sk_buff *skb,
++           ip_set_ip_t *hash_ip,
++           const u_int32_t *flags,
++           unsigned char index)
++{
++      return __delip(set,
++                     ntohl(flags[index] & IPSET_SRC 
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22)
++                              ? ip_hdr(skb)->saddr 
++                              : ip_hdr(skb)->daddr),
++#else
++                              ? skb->nh.iph->saddr 
++                              : skb->nh.iph->daddr),
++#endif
++                     hash_ip);
++}
++
++static int create(struct ip_set *set, const void *data, size_t size)
++{
++      int newbytes;
++      struct ip_set_req_ipmap_create *req =
++          (struct ip_set_req_ipmap_create *) data;
++      struct ip_set_ipmap *map;
++
++      if (size != sizeof(struct ip_set_req_ipmap_create)) {
++              ip_set_printk("data length wrong (want %zu, have %zu)",
++                            sizeof(struct ip_set_req_ipmap_create),
++                            size);
++              return -EINVAL;
++      }
++
++      DP("from %u.%u.%u.%u to %u.%u.%u.%u",
++         HIPQUAD(req->from), HIPQUAD(req->to));
++
++      if (req->from > req->to) {
++              DP("bad ip range");
++              return -ENOEXEC;
++      }
++
++      map = kmalloc(sizeof(struct ip_set_ipmap), GFP_KERNEL);
++      if (!map) {
++              DP("out of memory for %d bytes",
++                 sizeof(struct ip_set_ipmap));
++              return -ENOMEM;
++      }
++      map->first_ip = req->from;
++      map->last_ip = req->to;
++      map->netmask = req->netmask;
++
++      if (req->netmask == 0xFFFFFFFF) {
++              map->hosts = 1;
++              map->sizeid = map->last_ip - map->first_ip + 1;
++      } else {
++              unsigned int mask_bits, netmask_bits;
++              ip_set_ip_t mask;
++              
++              map->first_ip &= map->netmask;  /* Should we better bark? */
++              
++              mask = range_to_mask(map->first_ip, map->last_ip, &mask_bits);
++              netmask_bits = mask_to_bits(map->netmask);
++              
++              if ((!mask && (map->first_ip || map->last_ip != 0xFFFFFFFF))
++                  || netmask_bits <= mask_bits)
++                      return -ENOEXEC;
++
++              DP("mask_bits %u, netmask_bits %u",
++                 mask_bits, netmask_bits);
++              map->hosts = 2 << (32 - netmask_bits - 1);
++              map->sizeid = 2 << (netmask_bits - mask_bits - 1);
++      }
++      if (map->sizeid > MAX_RANGE + 1) {
++              ip_set_printk("range too big (max %d addresses)",
++                             MAX_RANGE+1);
++              kfree(map);
++              return -ENOEXEC;
++      }
++      DP("hosts %u, sizeid %u", map->hosts, map->sizeid);
++      newbytes = bitmap_bytes(0, map->sizeid - 1);
++      map->members = kmalloc(newbytes, GFP_KERNEL);
++      if (!map->members) {
++              DP("out of memory for %d bytes", newbytes);
++              kfree(map);
++              return -ENOMEM;
++      }
++      memset(map->members, 0, newbytes);
++      
++      set->data = map;
++      return 0;
++}
++
++static void destroy(struct ip_set *set)
++{
++      struct ip_set_ipmap *map = (struct ip_set_ipmap *) set->data;
++      
++      kfree(map->members);
++      kfree(map);
++      
++      set->data = NULL;
++}
++
++static void flush(struct ip_set *set)
++{
++      struct ip_set_ipmap *map = (struct ip_set_ipmap *) set->data;
++      memset(map->members, 0, bitmap_bytes(0, map->sizeid - 1));
++}
++
++static void list_header(const struct ip_set *set, void *data)
++{
++      struct ip_set_ipmap *map = (struct ip_set_ipmap *) set->data;
++      struct ip_set_req_ipmap_create *header =
++          (struct ip_set_req_ipmap_create *) data;
++
++      header->from = map->first_ip;
++      header->to = map->last_ip;
++      header->netmask = map->netmask;
++}
++
++static int list_members_size(const struct ip_set *set)
++{
++      struct ip_set_ipmap *map = (struct ip_set_ipmap *) set->data;
++
++      return bitmap_bytes(0, map->sizeid - 1);
++}
++
++static void list_members(const struct ip_set *set, void *data)
++{
++      struct ip_set_ipmap *map = (struct ip_set_ipmap *) set->data;
++      int bytes = bitmap_bytes(0, map->sizeid - 1);
++
++      memcpy(data, map->members, bytes);
++}
++
++static struct ip_set_type ip_set_ipmap = {
++      .typename               = SETTYPE_NAME,
++      .features               = IPSET_TYPE_IP | IPSET_DATA_SINGLE,
++      .protocol_version       = IP_SET_PROTOCOL_VERSION,
++      .create                 = &create,
++      .destroy                = &destroy,
++      .flush                  = &flush,
++      .reqsize                = sizeof(struct ip_set_req_ipmap),
++      .addip                  = &addip,
++      .addip_kernel           = &addip_kernel,
++      .delip                  = &delip,
++      .delip_kernel           = &delip_kernel,
++      .testip                 = &testip,
++      .testip_kernel          = &testip_kernel,
++      .header_size            = sizeof(struct ip_set_req_ipmap_create),
++      .list_header            = &list_header,
++      .list_members_size      = &list_members_size,
++      .list_members           = &list_members,
++      .me                     = THIS_MODULE,
++};
++
++MODULE_LICENSE("GPL");
++MODULE_AUTHOR("Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>");
++MODULE_DESCRIPTION("ipmap type of IP sets");
++
++static int __init ip_set_ipmap_init(void)
++{
++      return ip_set_register_set_type(&ip_set_ipmap);
++}
++
++static void __exit ip_set_ipmap_fini(void)
++{
++      /* FIXME: possible race with ip_set_create() */
++      ip_set_unregister_set_type(&ip_set_ipmap);
++}
++
++module_init(ip_set_ipmap_init);
++module_exit(ip_set_ipmap_fini);
+diff -Nurp linux-2.6.22.10-vs2.3.0.29-pl02/net/ipv4/netfilter/ip_set_ipporthash.c linux-2.6.22.10-vs2.3.0.29-pl03/net/ipv4/netfilter/ip_set_ipporthash.c
+--- linux-2.6.22.10-vs2.3.0.29-pl02/net/ipv4/netfilter/ip_set_ipporthash.c     1969-12-31 19:00:00.000000000 -0500
++++ linux-2.6.22.10-vs2.3.0.29-pl03/net/ipv4/netfilter/ip_set_ipporthash.c     2007-11-14 14:12:25.000000000 -0500
+@@ -0,0 +1,581 @@
++/* Copyright (C) 2003-2004 Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License version 2 as
++ * published by the Free Software Foundation.  
++ */
++
++/* Kernel module implementing an ip+port hash set */
++
++#include <linux/module.h>
++#include <linux/ip.h>
++#include <linux/tcp.h>
++#include <linux/udp.h>
++#include <linux/skbuff.h>
++#include <linux/version.h>
++#include <linux/jhash.h>
++#include <linux/netfilter_ipv4/ip_tables.h>
++#include <linux/netfilter_ipv4/ip_set.h>
++#include <linux/errno.h>
++#include <asm/uaccess.h>
++#include <asm/bitops.h>
++#include <linux/spinlock.h>
++#include <linux/vmalloc.h>
++#include <linux/random.h>
++
++#include <net/ip.h>
++
++#include <linux/netfilter_ipv4/ip_set_malloc.h>
++#include <linux/netfilter_ipv4/ip_set_ipporthash.h>
++
++static int limit = MAX_RANGE;
++
++/* We must handle non-linear skbs */
++static inline ip_set_ip_t
++get_port(const struct sk_buff *skb, u_int32_t flags)
++{
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22)
++      struct iphdr *iph = ip_hdr(skb);
++#else
++      struct iphdr *iph = skb->nh.iph;
++#endif
++      u_int16_t offset = ntohs(iph->frag_off) & IP_OFFSET;
++
++      switch (iph->protocol) {
++      case IPPROTO_TCP: {
++              struct tcphdr tcph;
++              
++              /* See comments at tcp_match in ip_tables.c */
++              if (offset)
++                      return INVALID_PORT;
++
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22)
++              if (skb_copy_bits(skb, ip_hdr(skb)->ihl*4, &tcph, sizeof(tcph)) < 0)
++#else
++              if (skb_copy_bits(skb, skb->nh.iph->ihl*4, &tcph, sizeof(tcph)) < 0)
++#endif
++                      /* No choice either */
++                      return INVALID_PORT;
++              
++              return ntohs(flags & IPSET_SRC ?
++                           tcph.source : tcph.dest);
++          }
++      case IPPROTO_UDP: {
++              struct udphdr udph;
++
++              if (offset)
++                      return INVALID_PORT;
++
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22)
++              if (skb_copy_bits(skb, ip_hdr(skb)->ihl*4, &udph, sizeof(udph)) < 0)
++#else
++              if (skb_copy_bits(skb, skb->nh.iph->ihl*4, &udph, sizeof(udph)) < 0)
++#endif
++                      /* No choice either */
++                      return INVALID_PORT;
++              
++              return ntohs(flags & IPSET_SRC ?
++                           udph.source : udph.dest);
++          }
++      default:
++              return INVALID_PORT;
++      }
++}
++
++static inline __u32
++jhash_ip(const struct ip_set_ipporthash *map, uint16_t i, ip_set_ip_t ip)
++{
++      return jhash_1word(ip, *(((uint32_t *) map->initval) + i));
++}
++
++#define HASH_IP(map, ip, port) (port + ((ip - ((map)->first_ip)) << 16))
++
++static inline __u32
++hash_id(struct ip_set *set, ip_set_ip_t ip, ip_set_ip_t port,
++      ip_set_ip_t *hash_ip)
++{
++      struct ip_set_ipporthash *map = 
++              (struct ip_set_ipporthash *) set->data;
++      __u32 id;
++      u_int16_t i;
++      ip_set_ip_t *elem;
++
++      *hash_ip = HASH_IP(map, ip, port);
++      DP("set: %s, ipport:%u.%u.%u.%u:%u, %u.%u.%u.%u",
++         set->name, HIPQUAD(ip), port, HIPQUAD(*hash_ip));
++      
++      for (i = 0; i < map->probes; i++) {
++              id = jhash_ip(map, i, *hash_ip) % map->hashsize;
++              DP("hash key: %u", id);
++              elem = HARRAY_ELEM(map->members, ip_set_ip_t *, id);
++              if (*elem == *hash_ip)
++                      return id;
++              /* No shortcut at testing - there can be deleted
++               * entries. */
++      }
++      return UINT_MAX;
++}
++
++static inline int
++__testip(struct ip_set *set, ip_set_ip_t ip, ip_set_ip_t port,
++       ip_set_ip_t *hash_ip)
++{
++      struct ip_set_ipporthash *map = (struct ip_set_ipporthash *) set->data;
++      
++      if (ip < map->first_ip || ip > map->last_ip)
++              return -ERANGE;
++
++      return (hash_id(set, ip, port, hash_ip) != UINT_MAX);
++}
++
++static int
++testip(struct ip_set *set, const void *data, size_t size,
++       ip_set_ip_t *hash_ip)
++{
++      struct ip_set_req_ipporthash *req = 
++          (struct ip_set_req_ipporthash *) data;
++
++      if (size != sizeof(struct ip_set_req_ipporthash)) {
++              ip_set_printk("data length wrong (want %zu, have %zu)",
++                            sizeof(struct ip_set_req_ipporthash),
++                            size);
++              return -EINVAL;
++      }
++      return __testip(set, req->ip, req->port, hash_ip);
++}
++
++static int
++testip_kernel(struct ip_set *set, 
++            const struct sk_buff *skb,
++            ip_set_ip_t *hash_ip,
++            const u_int32_t *flags,
++            unsigned char index)
++{
++      ip_set_ip_t port;
++      int res;
++
++      if (flags[index+1] == 0)
++              return 0;
++              
++      port = get_port(skb, flags[index+1]);
++
++      DP("flag: %s src: %u.%u.%u.%u dst: %u.%u.%u.%u",
++         flags[index] & IPSET_SRC ? "SRC" : "DST",
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22)
++         NIPQUAD(ip_hdr(skb)->saddr),
++         NIPQUAD(ip_hdr(skb)->daddr));
++#else
++         NIPQUAD(skb->nh.iph->saddr),
++         NIPQUAD(skb->nh.iph->daddr));
++#endif
++      DP("flag %s port %u",
++         flags[index+1] & IPSET_SRC ? "SRC" : "DST", 
++         port);       
++      if (port == INVALID_PORT)
++              return 0;       
++
++      res =  __testip(set,
++                      ntohl(flags[index] & IPSET_SRC 
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22)
++                                      ? ip_hdr(skb)->saddr 
++                                      : ip_hdr(skb)->daddr),
++#else
++                                      ? skb->nh.iph->saddr 
++                                      : skb->nh.iph->daddr),
++#endif
++                      port,
++                      hash_ip);
++      return (res < 0 ? 0 : res);
++      
++}
++
++static inline int
++__add_haship(struct ip_set_ipporthash *map, ip_set_ip_t hash_ip)
++{
++      __u32 probe;
++      u_int16_t i;
++      ip_set_ip_t *elem;
++
++      for (i = 0; i < map->probes; i++) {
++              probe = jhash_ip(map, i, hash_ip) % map->hashsize;
++              elem = HARRAY_ELEM(map->members, ip_set_ip_t *, probe);
++              if (*elem == hash_ip)
++                      return -EEXIST;
++              if (!*elem) {
++                      *elem = hash_ip;
++                      map->elements++;
++                      return 0;
++              }
++      }
++      /* Trigger rehashing */
++      return -EAGAIN;
++}
++
++static inline int
++__addip(struct ip_set_ipporthash *map, ip_set_ip_t ip, ip_set_ip_t port,
++      ip_set_ip_t *hash_ip)
++{
++      if (map->elements > limit)
++              return -ERANGE;
++      if (ip < map->first_ip || ip > map->last_ip)
++              return -ERANGE;
++
++      *hash_ip = HASH_IP(map, ip, port);
++      
++      return __add_haship(map, *hash_ip);
++}
++
++static int
++addip(struct ip_set *set, const void *data, size_t size,
++        ip_set_ip_t *hash_ip)
++{
++      struct ip_set_req_ipporthash *req = 
++          (struct ip_set_req_ipporthash *) data;
++
++      if (size != sizeof(struct ip_set_req_ipporthash)) {
++              ip_set_printk("data length wrong (want %zu, have %zu)",
++                            sizeof(struct ip_set_req_ipporthash),
++                            size);
++              return -EINVAL;
++      }
++      return __addip((struct ip_set_ipporthash *) set->data, 
++                      req->ip, req->port, hash_ip);
++}
++
++static int
++addip_kernel(struct ip_set *set, 
++           const struct sk_buff *skb,
++           ip_set_ip_t *hash_ip,
++           const u_int32_t *flags,
++           unsigned char index)
++{
++      ip_set_ip_t port;
++
++      if (flags[index+1] == 0)
++              return -EINVAL;
++              
++      port = get_port(skb, flags[index+1]);
++
++      DP("flag: %s src: %u.%u.%u.%u dst: %u.%u.%u.%u",
++         flags[index] & IPSET_SRC ? "SRC" : "DST",
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22)
++         NIPQUAD(ip_hdr(skb)->saddr),
++         NIPQUAD(ip_hdr(skb)->daddr));
++#else
++         NIPQUAD(skb->nh.iph->saddr),
++         NIPQUAD(skb->nh.iph->daddr));
++#endif
++      DP("flag %s port %u", 
++         flags[index+1] & IPSET_SRC ? "SRC" : "DST", 
++         port);       
++      if (port == INVALID_PORT)
++              return -EINVAL; 
++
++      return __addip((struct ip_set_ipporthash *) set->data,
++                     ntohl(flags[index] & IPSET_SRC 
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22)
++                              ? ip_hdr(skb)->saddr 
++                              : ip_hdr(skb)->daddr),
++#else
++                              ? skb->nh.iph->saddr 
++                              : skb->nh.iph->daddr),
++#endif
++                     port,
++                     hash_ip);
++}
++
++static int retry(struct ip_set *set)
++{
++      struct ip_set_ipporthash *map = (struct ip_set_ipporthash *) set->data;
++      ip_set_ip_t *elem;
++      void *members;
++      u_int32_t i, hashsize = map->hashsize;
++      int res;
++      struct ip_set_ipporthash *tmp;
++      
++      if (map->resize == 0)
++              return -ERANGE;
++
++    again:
++      res = 0;
++      
++      /* Calculate new hash size */
++      hashsize += (hashsize * map->resize)/100;
++      if (hashsize == map->hashsize)
++              hashsize++;
++      
++      ip_set_printk("rehashing of set %s triggered: "
++                    "hashsize grows from %u to %u",
++                    set->name, map->hashsize, hashsize);
++
++      tmp = kmalloc(sizeof(struct ip_set_ipporthash) 
++                    + map->probes * sizeof(uint32_t), GFP_ATOMIC);
++      if (!tmp) {
++              DP("out of memory for %d bytes",
++                 sizeof(struct ip_set_ipporthash)
++                 + map->probes * sizeof(uint32_t));
++              return -ENOMEM;
++      }
++      tmp->members = harray_malloc(hashsize, sizeof(ip_set_ip_t), GFP_ATOMIC);
++      if (!tmp->members) {
++              DP("out of memory for %d bytes", hashsize * sizeof(ip_set_ip_t));
++              kfree(tmp);
++              return -ENOMEM;
++      }
++      tmp->hashsize = hashsize;
++      tmp->elements = 0;
++      tmp->probes = map->probes;
++      tmp->resize = map->resize;
++      tmp->first_ip = map->first_ip;
++      tmp->last_ip = map->last_ip;
++      memcpy(tmp->initval, map->initval, map->probes * sizeof(uint32_t));
++      
++      write_lock_bh(&set->lock);
++      map = (struct ip_set_ipporthash *) set->data; /* Play safe */
++      for (i = 0; i < map->hashsize && res == 0; i++) {
++              elem = HARRAY_ELEM(map->members, ip_set_ip_t *, i);     
++              if (*elem)
++                      res = __add_haship(tmp, *elem);
++      }
++      if (res) {
++              /* Failure, try again */
++              write_unlock_bh(&set->lock);
++              harray_free(tmp->members);
++              kfree(tmp);
++              goto again;
++      }
++      
++      /* Success at resizing! */
++      members = map->members;
++
++      map->hashsize = tmp->hashsize;
++      map->members = tmp->members;
++      write_unlock_bh(&set->lock);
++
++      harray_free(members);
++      kfree(tmp);
++
++      return 0;
++}
++
++static inline int
++__delip(struct ip_set *set, ip_set_ip_t ip, ip_set_ip_t port,
++      ip_set_ip_t *hash_ip)
++{
++      struct ip_set_ipporthash *map = (struct ip_set_ipporthash *) set->data;
++      ip_set_ip_t id;
++      ip_set_ip_t *elem;
++
++      if (ip < map->first_ip || ip > map->last_ip)
++              return -ERANGE;
++
++      id = hash_id(set, ip, port, hash_ip);
++
++      if (id == UINT_MAX)
++              return -EEXIST;
++              
++      elem = HARRAY_ELEM(map->members, ip_set_ip_t *, id);
++      *elem = 0;
++      map->elements--;
++
++      return 0;
++}
++
++static int
++delip(struct ip_set *set, const void *data, size_t size,
++        ip_set_ip_t *hash_ip)
++{
++      struct ip_set_req_ipporthash *req =
++          (struct ip_set_req_ipporthash *) data;
++
++      if (size != sizeof(struct ip_set_req_ipporthash)) {
++              ip_set_printk("data length wrong (want %zu, have %zu)",
++                            sizeof(struct ip_set_req_ipporthash),
++                            size);
++              return -EINVAL;
++      }
++      return __delip(set, req->ip, req->port, hash_ip);
++}
++
++static int
++delip_kernel(struct ip_set *set, 
++           const struct sk_buff *skb,
++           ip_set_ip_t *hash_ip,
++           const u_int32_t *flags,
++           unsigned char index)
++{
++      ip_set_ip_t port;
++
++      if (flags[index+1] == 0)
++              return -EINVAL;
++              
++      port = get_port(skb, flags[index+1]);
++
++      DP("flag: %s src: %u.%u.%u.%u dst: %u.%u.%u.%u",
++         flags[index] & IPSET_SRC ? "SRC" : "DST",
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22)
++         NIPQUAD(ip_hdr(skb)->saddr),
++         NIPQUAD(ip_hdr(skb)->daddr));
++#else
++         NIPQUAD(skb->nh.iph->saddr),
++         NIPQUAD(skb->nh.iph->daddr));
++#endif
++      DP("flag %s port %u",
++         flags[index+1] & IPSET_SRC ? "SRC" : "DST", 
++         port);       
++      if (port == INVALID_PORT)
++              return -EINVAL; 
++
++      return __delip(set,
++                     ntohl(flags[index] & IPSET_SRC 
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22)
++                              ? ip_hdr(skb)->saddr 
++                              : ip_hdr(skb)->daddr),
++#else
++                              ? skb->nh.iph->saddr 
++                              : skb->nh.iph->daddr),
++#endif
++                     port,
++                     hash_ip);
++}
++
++static int create(struct ip_set *set, const void *data, size_t size)
++{
++      struct ip_set_req_ipporthash_create *req =
++          (struct ip_set_req_ipporthash_create *) data;
++      struct ip_set_ipporthash *map;
++      uint16_t i;
++
++      if (size != sizeof(struct ip_set_req_ipporthash_create)) {
++              ip_set_printk("data length wrong (want %zu, have %zu)",
++                             sizeof(struct ip_set_req_ipporthash_create),
++                             size);
++              return -EINVAL;
++      }
++
++      if (req->hashsize < 1) {
++              ip_set_printk("hashsize too small");
++              return -ENOEXEC;
++      }
++
++      if (req->probes < 1) {
++              ip_set_printk("probes too small");
++              return -ENOEXEC;
++      }
++
++      map = kmalloc(sizeof(struct ip_set_ipporthash) 
++                    + req->probes * sizeof(uint32_t), GFP_KERNEL);
++      if (!map) {
++              DP("out of memory for %d bytes",
++                 sizeof(struct ip_set_ipporthash)
++                 + req->probes * sizeof(uint32_t));
++              return -ENOMEM;
++      }
++      for (i = 0; i < req->probes; i++)
++              get_random_bytes(((uint32_t *) map->initval)+i, 4);
++      map->elements = 0;
++      map->hashsize = req->hashsize;
++      map->probes = req->probes;
++      map->resize = req->resize;
++      map->first_ip = req->from;
++      map->last_ip = req->to;
++      map->members = harray_malloc(map->hashsize, sizeof(ip_set_ip_t), GFP_KERNEL);
++      if (!map->members) {
++              DP("out of memory for %d bytes", map->hashsize * sizeof(ip_set_ip_t));
++              kfree(map);
++              return -ENOMEM;
++      }
++
++      set->data = map;
++      return 0;
++}
++
++static void destroy(struct ip_set *set)
++{
++      struct ip_set_ipporthash *map = (struct ip_set_ipporthash *) set->data;
++
++      harray_free(map->members);
++      kfree(map);
++
++      set->data = NULL;
++}
++
++static void flush(struct ip_set *set)
++{
++      struct ip_set_ipporthash *map = (struct ip_set_ipporthash *) set->data;
++      harray_flush(map->members, map->hashsize, sizeof(ip_set_ip_t));
++      map->elements = 0;
++}
++
++static void list_header(const struct ip_set *set, void *data)
++{
++      struct ip_set_ipporthash *map = (struct ip_set_ipporthash *) set->data;
++      struct ip_set_req_ipporthash_create *header =
++          (struct ip_set_req_ipporthash_create *) data;
++
++      header->hashsize = map->hashsize;
++      header->probes = map->probes;
++      header->resize = map->resize;
++      header->from = map->first_ip;
++      header->to = map->last_ip;
++}
++
++static int list_members_size(const struct ip_set *set)
++{
++      struct ip_set_ipporthash *map = (struct ip_set_ipporthash *) set->data;
++
++      return (map->hashsize * sizeof(ip_set_ip_t));
++}
++
++static void list_members(const struct ip_set *set, void *data)
++{
++      struct ip_set_ipporthash *map = (struct ip_set_ipporthash *) set->data;
++      ip_set_ip_t i, *elem;
++
++      for (i = 0; i < map->hashsize; i++) {
++              elem = HARRAY_ELEM(map->members, ip_set_ip_t *, i);     
++              ((ip_set_ip_t *)data)[i] = *elem;
++      }
++}
++
++static struct ip_set_type ip_set_ipporthash = {
++      .typename               = SETTYPE_NAME,
++      .features               = IPSET_TYPE_IP | IPSET_TYPE_PORT | IPSET_DATA_DOUBLE,
++      .protocol_version       = IP_SET_PROTOCOL_VERSION,
++      .create                 = &create,
++      .destroy                = &destroy,
++      .flush                  = &flush,
++      .reqsize                = sizeof(struct ip_set_req_ipporthash),
++      .addip                  = &addip,
++      .addip_kernel           = &addip_kernel,
++      .retry                  = &retry,
++      .delip                  = &delip,
++      .delip_kernel           = &delip_kernel,
++      .testip                 = &testip,
++      .testip_kernel          = &testip_kernel,
++      .header_size            = sizeof(struct ip_set_req_ipporthash_create),
++      .list_header            = &list_header,
++      .list_members_size      = &list_members_size,
++      .list_members           = &list_members,
++      .me                     = THIS_MODULE,
++};
++
++MODULE_LICENSE("GPL");
++MODULE_AUTHOR("Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>");
++MODULE_DESCRIPTION("ipporthash type of IP sets");
++module_param(limit, int, 0600);
++MODULE_PARM_DESC(limit, "maximal number of elements stored in the sets");
++
++static int __init ip_set_ipporthash_init(void)
++{
++      return ip_set_register_set_type(&ip_set_ipporthash);
++}
++
++static void __exit ip_set_ipporthash_fini(void)
++{
++      /* FIXME: possible race with ip_set_create() */
++      ip_set_unregister_set_type(&ip_set_ipporthash);
++}
++
++module_init(ip_set_ipporthash_init);
++module_exit(ip_set_ipporthash_fini);
+diff -Nurp linux-2.6.22.10-vs2.3.0.29-pl02/net/ipv4/netfilter/ip_set_iptree.c linux-2.6.22.10-vs2.3.0.29-pl03/net/ipv4/netfilter/ip_set_iptree.c
+--- linux-2.6.22.10-vs2.3.0.29-pl02/net/ipv4/netfilter/ip_set_iptree.c 1969-12-31 19:00:00.000000000 -0500
++++ linux-2.6.22.10-vs2.3.0.29-pl03/net/ipv4/netfilter/ip_set_iptree.c 2007-11-14 14:12:25.000000000 -0500
+@@ -0,0 +1,612 @@
++/* Copyright (C) 2005 Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License version 2 as
++ * published by the Free Software Foundation.  
++ */
++
++/* Kernel module implementing an IP set type: the iptree type */
++
++#include <linux/version.h>
++#include <linux/module.h>
++#include <linux/ip.h>
++#include <linux/skbuff.h>
++#include <linux/slab.h>
++#include <linux/delay.h>
++#include <linux/netfilter_ipv4/ip_tables.h>
++#include <linux/netfilter_ipv4/ip_set.h>
++#include <linux/errno.h>
++#include <asm/uaccess.h>
++#include <asm/bitops.h>
++#include <linux/spinlock.h>
++
++/* Backward compatibility */
++#ifndef __nocast
++#define __nocast
++#endif
++
++#include <linux/netfilter_ipv4/ip_set_iptree.h>
++
++static int limit = MAX_RANGE;
++
++/* Garbage collection interval in seconds: */
++#define IPTREE_GC_TIME                5*60
++/* Sleep so many milliseconds before trying again 
++ * to delete the gc timer at destroying/flushing a set */ 
++#define IPTREE_DESTROY_SLEEP  100
++
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,21)
++static struct kmem_cache *branch_cachep;
++static struct kmem_cache *leaf_cachep;
++#else
++static kmem_cache_t *branch_cachep;
++static kmem_cache_t *leaf_cachep;
++#endif
++
++#if defined(__LITTLE_ENDIAN)
++#define ABCD(a,b,c,d,addrp) do {              \
++      a = ((unsigned char *)addrp)[3];        \
++      b = ((unsigned char *)addrp)[2];        \
++      c = ((unsigned char *)addrp)[1];        \
++      d = ((unsigned char *)addrp)[0];        \
++} while (0)
++#elif defined(__BIG_ENDIAN)
++#define ABCD(a,b,c,d,addrp) do {              \
++      a = ((unsigned char *)addrp)[0];        \
++      b = ((unsigned char *)addrp)[1];        \
++      c = ((unsigned char *)addrp)[2];        \
++      d = ((unsigned char *)addrp)[3];        \
++} while (0)
++#else
++#error "Please fix asm/byteorder.h"
++#endif /* __LITTLE_ENDIAN */
++
++#define TESTIP_WALK(map, elem, branch) do {   \
++      if ((map)->tree[elem]) {                \
++              branch = (map)->tree[elem];     \
++      } else                                  \
++              return 0;                       \
++} while (0)
++
++static inline int
++__testip(struct ip_set *set, ip_set_ip_t ip, ip_set_ip_t *hash_ip)
++{
++      struct ip_set_iptree *map = (struct ip_set_iptree *) set->data;
++      struct ip_set_iptreeb *btree;
++      struct ip_set_iptreec *ctree;
++      struct ip_set_iptreed *dtree;
++      unsigned char a,b,c,d;
++
++      if (!ip)
++              return -ERANGE;
++      
++      *hash_ip = ip;
++      ABCD(a, b, c, d, hash_ip);
++      DP("%u %u %u %u timeout %u", a, b, c, d, map->timeout);
++      TESTIP_WALK(map, a, btree);
++      TESTIP_WALK(btree, b, ctree);
++      TESTIP_WALK(ctree, c, dtree);
++      DP("%lu %lu", dtree->expires[d], jiffies);
++      return dtree->expires[d]
++             && (!map->timeout
++                 || time_after(dtree->expires[d], jiffies));
++}
++
++static int
++testip(struct ip_set *set, const void *data, size_t size,
++       ip_set_ip_t *hash_ip)
++{
++      struct ip_set_req_iptree *req = 
++          (struct ip_set_req_iptree *) data;
++
++      if (size != sizeof(struct ip_set_req_iptree)) {
++              ip_set_printk("data length wrong (want %zu, have %zu)",
++                            sizeof(struct ip_set_req_iptree),
++                            size);
++              return -EINVAL;
++      }
++      return __testip(set, req->ip, hash_ip);
++}
++
++static int
++testip_kernel(struct ip_set *set, 
++            const struct sk_buff *skb,
++            ip_set_ip_t *hash_ip,
++            const u_int32_t *flags,
++            unsigned char index)
++{
++      int res;
++      
++      DP("flag: %s src: %u.%u.%u.%u dst: %u.%u.%u.%u",
++         flags[index] & IPSET_SRC ? "SRC" : "DST",
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22)
++         NIPQUAD(ip_hdr(skb)->saddr),
++         NIPQUAD(ip_hdr(skb)->daddr));
++#else
++         NIPQUAD(skb->nh.iph->saddr),
++         NIPQUAD(skb->nh.iph->daddr));
++#endif
++
++      res =  __testip(set,
++                      ntohl(flags[index] & IPSET_SRC 
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22)
++                              ? ip_hdr(skb)->saddr 
++                              : ip_hdr(skb)->daddr),
++#else
++                              ? skb->nh.iph->saddr 
++                              : skb->nh.iph->daddr),
++#endif
++                      hash_ip);
++      return (res < 0 ? 0 : res);
++}
++
++#define ADDIP_WALK(map, elem, branch, type, cachep) do {      \
++      if ((map)->tree[elem]) {                                \
++              DP("found %u", elem);                           \
++              branch = (map)->tree[elem];                     \
++      } else {                                                \
++              branch = (type *)                               \
++                      kmem_cache_alloc(cachep, GFP_ATOMIC);   \
++              if (branch == NULL)                             \
++                      return -ENOMEM;                         \
++              memset(branch, 0, sizeof(*branch));             \
++              (map)->tree[elem] = branch;                     \
++              DP("alloc %u", elem);                           \
++      }                                                       \
++} while (0)   
++
++static inline int
++__addip(struct ip_set *set, ip_set_ip_t ip, unsigned int timeout,
++      ip_set_ip_t *hash_ip)
++{
++      struct ip_set_iptree *map = (struct ip_set_iptree *) set->data;
++      struct ip_set_iptreeb *btree;
++      struct ip_set_iptreec *ctree;
++      struct ip_set_iptreed *dtree;
++      unsigned char a,b,c,d;
++      int ret = 0;
++      
++      if (!ip || map->elements >= limit)
++              /* We could call the garbage collector
++               * but it's probably overkill */
++              return -ERANGE;
++      
++      *hash_ip = ip;
++      ABCD(a, b, c, d, hash_ip);
++      DP("%u %u %u %u timeout %u", a, b, c, d, timeout);
++      ADDIP_WALK(map, a, btree, struct ip_set_iptreeb, branch_cachep);
++      ADDIP_WALK(btree, b, ctree, struct ip_set_iptreec, branch_cachep);
++      ADDIP_WALK(ctree, c, dtree, struct ip_set_iptreed, leaf_cachep);
++      if (dtree->expires[d]
++          && (!map->timeout || time_after(dtree->expires[d], jiffies)))
++              ret = -EEXIST;
++      dtree->expires[d] = map->timeout ? (timeout * HZ + jiffies) : 1;
++      /* Lottery: I won! */
++      if (dtree->expires[d] == 0)
++              dtree->expires[d] = 1;
++      DP("%u %lu", d, dtree->expires[d]);
++      if (ret == 0)
++              map->elements++;
++      return ret;
++}
++
++static int
++addip(struct ip_set *set, const void *data, size_t size,
++      ip_set_ip_t *hash_ip)
++{
++      struct ip_set_iptree *map = (struct ip_set_iptree *) set->data;
++      struct ip_set_req_iptree *req = 
++              (struct ip_set_req_iptree *) data;
++
++      if (size != sizeof(struct ip_set_req_iptree)) {
++              ip_set_printk("data length wrong (want %zu, have %zu)",
++                            sizeof(struct ip_set_req_iptree),
++                            size);
++              return -EINVAL;
++      }
++      DP("%u.%u.%u.%u %u", HIPQUAD(req->ip), req->timeout);
++      return __addip(set, req->ip,
++                     req->timeout ? req->timeout : map->timeout,
++                     hash_ip);
++}
++
++static int
++addip_kernel(struct ip_set *set, 
++           const struct sk_buff *skb,
++           ip_set_ip_t *hash_ip,
++           const u_int32_t *flags,
++           unsigned char index)
++{
++      struct ip_set_iptree *map = (struct ip_set_iptree *) set->data;
++
++      return __addip(set,
++                     ntohl(flags[index] & IPSET_SRC 
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22)
++                              ? ip_hdr(skb)->saddr 
++                              : ip_hdr(skb)->daddr),
++#else
++                              ? skb->nh.iph->saddr 
++                              : skb->nh.iph->daddr),
++#endif
++                     map->timeout,
++                     hash_ip);
++}
++
++#define DELIP_WALK(map, elem, branch) do {    \
++      if ((map)->tree[elem]) {                \
++              branch = (map)->tree[elem];     \
++      } else                                  \
++              return -EEXIST;                 \
++} while (0)
++
++static inline int 
++__delip(struct ip_set *set, ip_set_ip_t ip, ip_set_ip_t *hash_ip)
++{
++      struct ip_set_iptree *map = (struct ip_set_iptree *) set->data;
++      struct ip_set_iptreeb *btree;
++      struct ip_set_iptreec *ctree;
++      struct ip_set_iptreed *dtree;
++      unsigned char a,b,c,d;
++      
++      if (!ip)
++              return -ERANGE;
++              
++      *hash_ip = ip;
++      ABCD(a, b, c, d, hash_ip);
++      DELIP_WALK(map, a, btree);
++      DELIP_WALK(btree, b, ctree);
++      DELIP_WALK(ctree, c, dtree);
++
++      if (dtree->expires[d]) {
++              dtree->expires[d] = 0;
++              map->elements--;
++              return 0;
++      }
++      return -EEXIST;
++}
++
++static int
++delip(struct ip_set *set, const void *data, size_t size,
++      ip_set_ip_t *hash_ip)
++{
++      struct ip_set_req_iptree *req =
++          (struct ip_set_req_iptree *) data;
++
++      if (size != sizeof(struct ip_set_req_iptree)) {
++              ip_set_printk("data length wrong (want %zu, have %zu)",
++                            sizeof(struct ip_set_req_iptree),
++                            size);
++              return -EINVAL;
++      }
++      return __delip(set, req->ip, hash_ip);
++}
++
++static int
++delip_kernel(struct ip_set *set, 
++           const struct sk_buff *skb,
++           ip_set_ip_t *hash_ip,
++           const u_int32_t *flags,
++           unsigned char index)
++{
++      return __delip(set,
++                     ntohl(flags[index] & IPSET_SRC 
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22)
++                              ? ip_hdr(skb)->saddr 
++                              : ip_hdr(skb)->daddr),
++#else
++                              ? skb->nh.iph->saddr 
++                              : skb->nh.iph->daddr),
++#endif
++                     hash_ip);
++}
++
++#define LOOP_WALK_BEGIN(map, i, branch) \
++      for (i = 0; i < 256; i++) {     \
++              if (!(map)->tree[i])    \
++                      continue;       \
++              branch = (map)->tree[i]
++
++#define LOOP_WALK_END }
++
++static void ip_tree_gc(unsigned long ul_set)
++{
++      struct ip_set *set = (void *) ul_set;
++      struct ip_set_iptree *map = (struct ip_set_iptree *) set->data;
++      struct ip_set_iptreeb *btree;
++      struct ip_set_iptreec *ctree;
++      struct ip_set_iptreed *dtree;
++      unsigned int a,b,c,d;
++      unsigned char i,j,k;
++
++      i = j = k = 0;
++      DP("gc: %s", set->name);
++      write_lock_bh(&set->lock);
++      LOOP_WALK_BEGIN(map, a, btree);
++      LOOP_WALK_BEGIN(btree, b, ctree);
++      LOOP_WALK_BEGIN(ctree, c, dtree);
++      for (d = 0; d < 256; d++) {
++              if (dtree->expires[d]) {
++                      DP("gc: %u %u %u %u: expires %lu jiffies %lu",
++                          a, b, c, d,
++                          dtree->expires[d], jiffies);
++                      if (map->timeout
++                          && time_before(dtree->expires[d], jiffies)) {
++                              dtree->expires[d] = 0;
++                              map->elements--;
++                      } else
++                              k = 1;
++              }
++      }
++      if (k == 0) {
++              DP("gc: %s: leaf %u %u %u empty",
++                  set->name, a, b, c);
++              kmem_cache_free(leaf_cachep, dtree);
++              ctree->tree[c] = NULL;
++      } else {
++              DP("gc: %s: leaf %u %u %u not empty",
++                  set->name, a, b, c);
++              j = 1;
++              k = 0;
++      }
++      LOOP_WALK_END;
++      if (j == 0) {
++              DP("gc: %s: branch %u %u empty",
++                  set->name, a, b);
++              kmem_cache_free(branch_cachep, ctree);
++              btree->tree[b] = NULL;
++      } else {
++              DP("gc: %s: branch %u %u not empty",
++                  set->name, a, b);
++              i = 1;
++              j = k = 0;
++      }
++      LOOP_WALK_END;
++      if (i == 0) {
++              DP("gc: %s: branch %u empty",
++                  set->name, a);
++              kmem_cache_free(branch_cachep, btree);
++              map->tree[a] = NULL;
++      } else {
++              DP("gc: %s: branch %u not empty",
++                  set->name, a);
++              i = j = k = 0;
++      }
++      LOOP_WALK_END;
++      write_unlock_bh(&set->lock);
++      
++      map->gc.expires = jiffies + map->gc_interval * HZ;
++      add_timer(&map->gc);
++}
++
++static inline void init_gc_timer(struct ip_set *set)
++{
++      struct ip_set_iptree *map = (struct ip_set_iptree *) set->data;
++
++      /* Even if there is no timeout for the entries,
++       * we still have to call gc because delete
++       * do not clean up empty branches */
++      map->gc_interval = IPTREE_GC_TIME;
++      init_timer(&map->gc);
++      map->gc.data = (unsigned long) set;
++      map->gc.function = ip_tree_gc;
++      map->gc.expires = jiffies + map->gc_interval * HZ;
++      add_timer(&map->gc);
++}
++
++static int create(struct ip_set *set, const void *data, size_t size)
++{
++      struct ip_set_req_iptree_create *req =
++          (struct ip_set_req_iptree_create *) data;
++      struct ip_set_iptree *map;
++
++      if (size != sizeof(struct ip_set_req_iptree_create)) {
++              ip_set_printk("data length wrong (want %zu, have %zu)",
++                            sizeof(struct ip_set_req_iptree_create),
++                            size);
++              return -EINVAL;
++      }
++
++      map = kmalloc(sizeof(struct ip_set_iptree), GFP_KERNEL);
++      if (!map) {
++              DP("out of memory for %d bytes",
++                 sizeof(struct ip_set_iptree));
++              return -ENOMEM;
++      }
++      memset(map, 0, sizeof(*map));
++      map->timeout = req->timeout;
++      map->elements = 0;
++      set->data = map;
++
++      init_gc_timer(set);
++
++      return 0;
++}
++
++static void __flush(struct ip_set_iptree *map)
++{
++      struct ip_set_iptreeb *btree;
++      struct ip_set_iptreec *ctree;
++      struct ip_set_iptreed *dtree;
++      unsigned int a,b,c;
++
++      LOOP_WALK_BEGIN(map, a, btree);
++      LOOP_WALK_BEGIN(btree, b, ctree);
++      LOOP_WALK_BEGIN(ctree, c, dtree);
++      kmem_cache_free(leaf_cachep, dtree);
++      LOOP_WALK_END;
++      kmem_cache_free(branch_cachep, ctree);
++      LOOP_WALK_END;
++      kmem_cache_free(branch_cachep, btree);
++      LOOP_WALK_END;
++      map->elements = 0;
++}
++
++static void destroy(struct ip_set *set)
++{
++      struct ip_set_iptree *map = (struct ip_set_iptree *) set->data;
++
++      /* gc might be running */
++      while (!del_timer(&map->gc))
++              msleep(IPTREE_DESTROY_SLEEP);
++      __flush(map);
++      kfree(map);
++      set->data = NULL;
++}
++
++static void flush(struct ip_set *set)
++{
++      struct ip_set_iptree *map = (struct ip_set_iptree *) set->data;
++      unsigned int timeout = map->timeout;
++      
++      /* gc might be running */
++      while (!del_timer(&map->gc))
++              msleep(IPTREE_DESTROY_SLEEP);
++      __flush(map);
++      memset(map, 0, sizeof(*map));
++      map->timeout = timeout;
++
++      init_gc_timer(set);
++}
++
++static void list_header(const struct ip_set *set, void *data)
++{
++      struct ip_set_iptree *map = (struct ip_set_iptree *) set->data;
++      struct ip_set_req_iptree_create *header =
++          (struct ip_set_req_iptree_create *) data;
++
++      header->timeout = map->timeout;
++}
++
++static int list_members_size(const struct ip_set *set)
++{
++      struct ip_set_iptree *map = (struct ip_set_iptree *) set->data;
++      struct ip_set_iptreeb *btree;
++      struct ip_set_iptreec *ctree;
++      struct ip_set_iptreed *dtree;
++      unsigned int a,b,c,d;
++      unsigned int count = 0;
++
++      LOOP_WALK_BEGIN(map, a, btree);
++      LOOP_WALK_BEGIN(btree, b, ctree);
++      LOOP_WALK_BEGIN(ctree, c, dtree);
++      for (d = 0; d < 256; d++) {
++              if (dtree->expires[d]
++                  && (!map->timeout || time_after(dtree->expires[d], jiffies)))
++                      count++;
++      }
++      LOOP_WALK_END;
++      LOOP_WALK_END;
++      LOOP_WALK_END;
++
++      DP("members %u", count);
++      return (count * sizeof(struct ip_set_req_iptree));
++}
++
++static void list_members(const struct ip_set *set, void *data)
++{
++      struct ip_set_iptree *map = (struct ip_set_iptree *) set->data;
++      struct ip_set_iptreeb *btree;
++      struct ip_set_iptreec *ctree;
++      struct ip_set_iptreed *dtree;
++      unsigned int a,b,c,d;
++      size_t offset = 0;
++      struct ip_set_req_iptree *entry;
++
++      LOOP_WALK_BEGIN(map, a, btree);
++      LOOP_WALK_BEGIN(btree, b, ctree);
++      LOOP_WALK_BEGIN(ctree, c, dtree);
++      for (d = 0; d < 256; d++) {
++              if (dtree->expires[d]
++                  && (!map->timeout || time_after(dtree->expires[d], jiffies))) {
++                      entry = (struct ip_set_req_iptree *)(data + offset);
++                      entry->ip = ((a << 24) | (b << 16) | (c << 8) | d);
++                      entry->timeout = !map->timeout ? 0 
++                              : (dtree->expires[d] - jiffies)/HZ;
++                      offset += sizeof(struct ip_set_req_iptree);
++              }
++      }
++      LOOP_WALK_END;
++      LOOP_WALK_END;
++      LOOP_WALK_END;
++}
++
++static struct ip_set_type ip_set_iptree = {
++      .typename               = SETTYPE_NAME,
++      .features               = IPSET_TYPE_IP | IPSET_DATA_SINGLE,
++      .protocol_version       = IP_SET_PROTOCOL_VERSION,
++      .create                 = &create,
++      .destroy                = &destroy,
++      .flush                  = &flush,
++      .reqsize                = sizeof(struct ip_set_req_iptree),
++      .addip                  = &addip,
++      .addip_kernel           = &addip_kernel,
++      .delip                  = &delip,
++      .delip_kernel           = &delip_kernel,
++      .testip                 = &testip,
++      .testip_kernel          = &testip_kernel,
++      .header_size            = sizeof(struct ip_set_req_iptree_create),
++      .list_header            = &list_header,
++      .list_members_size      = &list_members_size,
++      .list_members           = &list_members,
++      .me                     = THIS_MODULE,
++};
++
++MODULE_LICENSE("GPL");
++MODULE_AUTHOR("Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>");
++MODULE_DESCRIPTION("iptree type of IP sets");
++module_param(limit, int, 0600);
++MODULE_PARM_DESC(limit, "maximal number of elements stored in the sets");
++
++static int __init ip_set_iptree_init(void)
++{
++      int ret;
++      
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,23)
++      branch_cachep = kmem_cache_create("ip_set_iptreeb",
++                              sizeof(struct ip_set_iptreeb),
++                              0, 0, NULL);
++#else
++      branch_cachep = kmem_cache_create("ip_set_iptreeb",
++                              sizeof(struct ip_set_iptreeb),
++                              0, 0, NULL, NULL);
++#endif
++      if (!branch_cachep) {
++              printk(KERN_ERR "Unable to create ip_set_iptreeb slab cache\n");
++              ret = -ENOMEM;
++              goto out;
++      }
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,23)
++      leaf_cachep = kmem_cache_create("ip_set_iptreed",
++                              sizeof(struct ip_set_iptreed),
++                              0, 0, NULL);
++#else
++      leaf_cachep = kmem_cache_create("ip_set_iptreed",
++                              sizeof(struct ip_set_iptreed),
++                              0, 0, NULL, NULL);
++#endif
++      if (!leaf_cachep) {
++              printk(KERN_ERR "Unable to create ip_set_iptreed slab cache\n");
++              ret = -ENOMEM;
++              goto free_branch;
++      }
++      ret = ip_set_register_set_type(&ip_set_iptree);
++      if (ret == 0)
++              goto out;
++
++      kmem_cache_destroy(leaf_cachep);
++    free_branch:      
++      kmem_cache_destroy(branch_cachep);
++    out:
++      return ret;
++}
++
++static void __exit ip_set_iptree_fini(void)
++{
++      /* FIXME: possible race with ip_set_create() */
++      ip_set_unregister_set_type(&ip_set_iptree);
++      kmem_cache_destroy(leaf_cachep);
++      kmem_cache_destroy(branch_cachep);
++}
++
++module_init(ip_set_iptree_init);
++module_exit(ip_set_iptree_fini);
+diff -Nurp linux-2.6.22.10-vs2.3.0.29-pl02/net/ipv4/netfilter/ip_set_iptreemap.c linux-2.6.22.10-vs2.3.0.29-pl03/net/ipv4/netfilter/ip_set_iptreemap.c
+--- linux-2.6.22.10-vs2.3.0.29-pl02/net/ipv4/netfilter/ip_set_iptreemap.c      1969-12-31 19:00:00.000000000 -0500
++++ linux-2.6.22.10-vs2.3.0.29-pl03/net/ipv4/netfilter/ip_set_iptreemap.c      2007-11-14 14:12:25.000000000 -0500
+@@ -0,0 +1,829 @@
++/* Copyright (C) 2007 Sven Wegener <sven.wegener@stealer.net>
++ *
++ * This program is free software; you can redistribute it and/or modify it
++ * under the terms of the GNU General Public License version 2 as published by
++ * the Free Software Foundation.
++ */
++
++/* This modules implements the iptreemap ipset type. It uses bitmaps to
++ * represent every single IPv4 address as a single bit. The bitmaps are managed
++ * in a tree structure, where the first three octets of an addresses are used
++ * as an index to find the bitmap and the last octet is used as the bit number.
++ */
++
++#include <linux/version.h>
++#include <linux/module.h>
++#include <linux/ip.h>
++#include <linux/skbuff.h>
++#include <linux/slab.h>
++#include <linux/delay.h>
++#include <linux/netfilter_ipv4/ip_tables.h>
++#include <linux/netfilter_ipv4/ip_set.h>
++#include <linux/errno.h>
++#include <asm/uaccess.h>
++#include <asm/bitops.h>
++#include <linux/spinlock.h>
++
++#include <linux/netfilter_ipv4/ip_set_iptreemap.h>
++
++#define IPTREEMAP_DEFAULT_GC_TIME (5 * 60)
++#define IPTREEMAP_DESTROY_SLEEP (100)
++
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,21)
++static struct kmem_cache *cachep_b;
++static struct kmem_cache *cachep_c;
++static struct kmem_cache *cachep_d;
++#else
++static kmem_cache_t *cachep_b;
++static kmem_cache_t *cachep_c;
++static kmem_cache_t *cachep_d;
++#endif
++
++static struct ip_set_iptreemap_d *fullbitmap_d;
++static struct ip_set_iptreemap_c *fullbitmap_c;
++static struct ip_set_iptreemap_b *fullbitmap_b;
++
++#if defined(__LITTLE_ENDIAN)
++#define ABCD(a, b, c, d, addr) \
++      do { \
++              a = ((unsigned char *)addr)[3]; \
++              b = ((unsigned char *)addr)[2]; \
++              c = ((unsigned char *)addr)[1]; \
++              d = ((unsigned char *)addr)[0]; \
++      } while (0)
++#elif defined(__BIG_ENDIAN)
++#define ABCD(a,b,c,d,addrp) do {              \
++      a = ((unsigned char *)addrp)[0];        \
++      b = ((unsigned char *)addrp)[1];        \
++      c = ((unsigned char *)addrp)[2];        \
++      d = ((unsigned char *)addrp)[3];        \
++} while (0)
++#else
++#error "Please fix asm/byteorder.h"
++#endif /* __LITTLE_ENDIAN */
++
++#define TESTIP_WALK(map, elem, branch, full) \
++      do { \
++              branch = (map)->tree[elem]; \
++              if (!branch) \
++                      return 0; \
++              else if (branch == full) \
++                      return 1; \
++      } while (0)
++
++#define ADDIP_WALK(map, elem, branch, type, cachep, full) \
++      do { \
++              branch = (map)->tree[elem]; \
++              if (!branch) { \
++                      branch = (type *) kmem_cache_alloc(cachep, GFP_ATOMIC); \
++                      if (!branch) \
++                              return -ENOMEM; \
++                      memset(branch, 0, sizeof(*branch)); \
++                      (map)->tree[elem] = branch; \
++              } else if (branch == full) { \
++                      return -EEXIST; \
++              } \
++      } while (0)
++
++#define ADDIP_RANGE_LOOP(map, a, a1, a2, hint, branch, full, cachep, free) \
++      for (a = a1; a <= a2; a++) { \
++              branch = (map)->tree[a]; \
++              if (branch != full) { \
++                      if ((a > a1 && a < a2) || (hint)) { \
++                              if (branch) \
++                                      free(branch); \
++                              (map)->tree[a] = full; \
++                              continue; \
++                      } else if (!branch) { \
++                              branch = kmem_cache_alloc(cachep, GFP_ATOMIC); \
++                              if (!branch) \
++                                      return -ENOMEM; \
++                              memset(branch, 0, sizeof(*branch)); \
++                              (map)->tree[a] = branch; \
++                      }
++
++#define ADDIP_RANGE_LOOP_END() \
++              } \
++      }
++
++#define DELIP_WALK(map, elem, branch, cachep, full, flags) \
++      do { \
++              branch = (map)->tree[elem]; \
++              if (!branch) { \
++                      return -EEXIST; \
++              } else if (branch == full) { \
++                      branch = kmem_cache_alloc(cachep, flags); \
++                      if (!branch) \
++                              return -ENOMEM; \
++                      memcpy(branch, full, sizeof(*full)); \
++                      (map)->tree[elem] = branch; \
++              } \
++      } while (0)
++
++#define DELIP_RANGE_LOOP(map, a, a1, a2, hint, branch, full, cachep, free, flags) \
++      for (a = a1; a <= a2; a++) { \
++              branch = (map)->tree[a]; \
++              if (branch) { \
++                      if ((a > a1 && a < a2) || (hint)) { \
++                              if (branch != full) \
++                                      free(branch); \
++                              (map)->tree[a] = NULL; \
++                              continue; \
++                      } else if (branch == full) { \
++                              branch = kmem_cache_alloc(cachep, flags); \
++                              if (!branch) \
++                                      return -ENOMEM; \
++                              memcpy(branch, full, sizeof(*branch)); \
++                              (map)->tree[a] = branch; \
++                      }
++
++#define DELIP_RANGE_LOOP_END() \
++              } \
++      }
++
++#define LOOP_WALK_BEGIN(map, i, branch) \
++      for (i = 0; i < 256; i++) { \
++              branch = (map)->tree[i]; \
++              if (likely(!branch)) \
++                      continue;
++
++#define LOOP_WALK_END() \
++      }
++
++#define LOOP_WALK_BEGIN_GC(map, i, branch, full, cachep, count) \
++      count = -256; \
++      for (i = 0; i < 256; i++) { \
++              branch = (map)->tree[i]; \
++              if (likely(!branch)) \
++                      continue; \
++              count++; \
++              if (branch == full) { \
++                      count++; \
++                      continue; \
++              }
++
++#define LOOP_WALK_END_GC(map, i, branch, full, cachep, count) \
++              if (-256 == count) { \
++                      kmem_cache_free(cachep, branch); \
++                      (map)->tree[i] = NULL; \
++              } else if (256 == count) { \
++                      kmem_cache_free(cachep, branch); \
++                      (map)->tree[i] = full; \
++              } \
++      }
++
++#define LOOP_WALK_BEGIN_COUNT(map, i, branch, inrange, count) \
++      for (i = 0; i < 256; i++) { \
++              if (!(map)->tree[i]) { \
++                      if (inrange) { \
++                              count++; \
++                              inrange = 0; \
++                      } \
++                      continue; \
++              } \
++              branch = (map)->tree[i];
++
++#define LOOP_WALK_END_COUNT() \
++      }
++
++#define MIN(a, b) (a < b ? a : b)
++#define MAX(a, b) (a > b ? a : b)
++
++#define GETVALUE1(a, a1, b1, r) \
++      (a == a1 ? b1 : r)
++
++#define GETVALUE2(a, b, a1, b1, c1, r) \
++      (a == a1 && b == b1 ? c1 : r)
++
++#define GETVALUE3(a, b, c, a1, b1, c1, d1, r) \
++      (a == a1 && b == b1 && c == c1 ? d1 : r)
++
++#define CHECK1(a, a1, a2, b1, b2, c1, c2, d1, d2) \
++      ( \
++              GETVALUE1(a, a1, b1, 0) == 0 \
++              && GETVALUE1(a, a2, b2, 255) == 255 \
++              && c1 == 0 \
++              && c2 == 255 \
++              && d1 == 0 \
++              && d2 == 255 \
++      )
++
++#define CHECK2(a, b, a1, a2, b1, b2, c1, c2, d1, d2) \
++      ( \
++              GETVALUE2(a, b, a1, b1, c1, 0) == 0 \
++              && GETVALUE2(a, b, a2, b2, c2, 255) == 255 \
++              && d1 == 0 \
++              && d2 == 255 \
++      )
++
++#define CHECK3(a, b, c, a1, a2, b1, b2, c1, c2, d1, d2) \
++      ( \
++              GETVALUE3(a, b, c, a1, b1, c1, d1, 0) == 0 \
++              && GETVALUE3(a, b, c, a2, b2, c2, d2, 255) == 255 \
++      )
++
++
++static inline void
++free_d(struct ip_set_iptreemap_d *map)
++{
++      kmem_cache_free(cachep_d, map);
++}
++
++static inline void
++free_c(struct ip_set_iptreemap_c *map)
++{
++      struct ip_set_iptreemap_d *dtree;
++      unsigned int i;
++
++      LOOP_WALK_BEGIN(map, i, dtree) {
++              if (dtree != fullbitmap_d)
++                      free_d(dtree);
++      } LOOP_WALK_END();
++
++      kmem_cache_free(cachep_c, map);
++}
++
++static inline void
++free_b(struct ip_set_iptreemap_b *map)
++{
++      struct ip_set_iptreemap_c *ctree;
++      unsigned int i;
++
++      LOOP_WALK_BEGIN(map, i, ctree) {
++              if (ctree != fullbitmap_c)
++                      free_c(ctree);
++      } LOOP_WALK_END();
++
++      kmem_cache_free(cachep_b, map);
++}
++
++static inline int
++__testip(struct ip_set *set, ip_set_ip_t ip, ip_set_ip_t *hash_ip)
++{
++      struct ip_set_iptreemap *map = (struct ip_set_iptreemap *) set->data;
++      struct ip_set_iptreemap_b *btree;
++      struct ip_set_iptreemap_c *ctree;
++      struct ip_set_iptreemap_d *dtree;
++      unsigned char a, b, c, d;
++
++      *hash_ip = ip;
++
++      ABCD(a, b, c, d, hash_ip);
++
++      TESTIP_WALK(map, a, btree, fullbitmap_b);
++      TESTIP_WALK(btree, b, ctree, fullbitmap_c);
++      TESTIP_WALK(ctree, c, dtree, fullbitmap_d);
++
++      return !!test_bit(d, (void *) dtree->bitmap);
++}
++
++static int
++testip(struct ip_set *set, const void *data, size_t size, ip_set_ip_t *hash_ip)
++{
++      struct ip_set_req_iptreemap *req = (struct ip_set_req_iptreemap *) data;
++
++      if (size != sizeof(struct ip_set_req_iptreemap)) {
++              ip_set_printk("data length wrong (want %zu, have %zu)", sizeof(struct ip_set_req_iptreemap), size);
++              return -EINVAL;
++      }
++
++      return __testip(set, req->start, hash_ip);
++}
++
++static int
++testip_kernel(struct ip_set *set, const struct sk_buff *skb, ip_set_ip_t *hash_ip, const u_int32_t *flags, unsigned char index)
++{
++      int res;
++
++      res = __testip(set, 
++                     ntohl(flags[index] & IPSET_SRC 
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22)
++                              ? ip_hdr(skb)->saddr 
++                              : ip_hdr(skb)->daddr),
++#else
++                              ? skb->nh.iph->saddr 
++                              : skb->nh.iph->daddr),
++#endif
++                     hash_ip);
++
++      return (res < 0 ? 0 : res);
++}
++
++static inline int
++__addip_single(struct ip_set *set, ip_set_ip_t ip, ip_set_ip_t *hash_ip)
++{
++      struct ip_set_iptreemap *map = (struct ip_set_iptreemap *) set->data;
++      struct ip_set_iptreemap_b *btree;
++      struct ip_set_iptreemap_c *ctree;
++      struct ip_set_iptreemap_d *dtree;
++      unsigned char a, b, c, d;
++
++      *hash_ip = ip;
++
++      ABCD(a, b, c, d, hash_ip);
++
++      ADDIP_WALK(map, a, btree, struct ip_set_iptreemap_b, cachep_b, fullbitmap_b);
++      ADDIP_WALK(btree, b, ctree, struct ip_set_iptreemap_c, cachep_c, fullbitmap_c);
++      ADDIP_WALK(ctree, c, dtree, struct ip_set_iptreemap_d, cachep_d, fullbitmap_d);
++
++      if (test_and_set_bit(d, (void *) dtree->bitmap))
++              return -EEXIST;
++
++      set_bit(b, (void *) btree->dirty);
++
++      return 0;
++}
++
++static inline int
++__addip_range(struct ip_set *set, ip_set_ip_t start, ip_set_ip_t end, ip_set_ip_t *hash_ip)
++{
++      struct ip_set_iptreemap *map = (struct ip_set_iptreemap *) set->data;
++      struct ip_set_iptreemap_b *btree;
++      struct ip_set_iptreemap_c *ctree;
++      struct ip_set_iptreemap_d *dtree;
++      unsigned int a, b, c, d;
++      unsigned char a1, b1, c1, d1;
++      unsigned char a2, b2, c2, d2;
++
++      if (start == end)
++              return __addip_single(set, start, hash_ip);
++
++      *hash_ip = start;
++
++      ABCD(a1, b1, c1, d1, &start);
++      ABCD(a2, b2, c2, d2, &end);
++
++      /* This is sooo ugly... */
++      ADDIP_RANGE_LOOP(map, a, a1, a2, CHECK1(a, a1, a2, b1, b2, c1, c2, d1, d2), btree, fullbitmap_b, cachep_b, free_b) {
++              ADDIP_RANGE_LOOP(btree, b, GETVALUE1(a, a1, b1, 0), GETVALUE1(a, a2, b2, 255), CHECK2(a, b, a1, a2, b1, b2, c1, c2, d1, d2), ctree, fullbitmap_c, cachep_c, free_c) {
++                      ADDIP_RANGE_LOOP(ctree, c, GETVALUE2(a, b, a1, b1, c1, 0), GETVALUE2(a, b, a2, b2, c2, 255), CHECK3(a, b, c, a1, a2, b1, b2, c1, c2, d1, d2), dtree, fullbitmap_d, cachep_d, free_d) {
++                              for (d = GETVALUE3(a, b, c, a1, b1, c1, d1, 0); d <= GETVALUE3(a, b, c, a2, b2, c2, d2, 255); d++)
++                                      set_bit(d, (void *) dtree->bitmap);
++                              set_bit(b, (void *) btree->dirty);
++                      } ADDIP_RANGE_LOOP_END();
++              } ADDIP_RANGE_LOOP_END();
++      } ADDIP_RANGE_LOOP_END();
++
++      return 0;
++}
++
++static int
++addip(struct ip_set *set, const void *data, size_t size, ip_set_ip_t *hash_ip)
++{
++      struct ip_set_req_iptreemap *req = (struct ip_set_req_iptreemap *) data;
++
++      if (size != sizeof(struct ip_set_req_iptreemap)) {
++              ip_set_printk("data length wrong (want %zu, have %zu)", sizeof(struct ip_set_req_iptreemap), size);
++              return -EINVAL;
++      }
++
++      return __addip_range(set, MIN(req->start, req->end), MAX(req->start, req->end), hash_ip);
++}
++
++static int
++addip_kernel(struct ip_set *set, const struct sk_buff *skb, ip_set_ip_t *hash_ip, const u_int32_t *flags, unsigned char index)
++{
++
++      return __addip_single(set,
++                      ntohl(flags[index] & IPSET_SRC 
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22)
++                              ? ip_hdr(skb)->saddr 
++                              : ip_hdr(skb)->daddr),
++#else
++                              ? skb->nh.iph->saddr 
++                              : skb->nh.iph->daddr),
++#endif
++                      hash_ip);
++}
++
++static inline int
++__delip_single(struct ip_set *set, ip_set_ip_t ip, ip_set_ip_t *hash_ip, unsigned int __nocast flags)
++{
++      struct ip_set_iptreemap *map = (struct ip_set_iptreemap *) set->data;
++      struct ip_set_iptreemap_b *btree;
++      struct ip_set_iptreemap_c *ctree;
++      struct ip_set_iptreemap_d *dtree;
++      unsigned char a,b,c,d;
++
++      *hash_ip = ip;
++
++      ABCD(a, b, c, d, hash_ip);
++
++      DELIP_WALK(map, a, btree, cachep_b, fullbitmap_b, flags);
++      DELIP_WALK(btree, b, ctree, cachep_c, fullbitmap_c, flags);
++      DELIP_WALK(ctree, c, dtree, cachep_d, fullbitmap_d, flags);
++
++      if (!test_and_clear_bit(d, (void *) dtree->bitmap))
++              return -EEXIST;
++
++      set_bit(b, (void *) btree->dirty);
++
++      return 0;
++}
++
++static inline int
++__delip_range(struct ip_set *set, ip_set_ip_t start, ip_set_ip_t end, ip_set_ip_t *hash_ip, unsigned int __nocast flags)
++{
++      struct ip_set_iptreemap *map = (struct ip_set_iptreemap *) set->data;
++      struct ip_set_iptreemap_b *btree;
++      struct ip_set_iptreemap_c *ctree;
++      struct ip_set_iptreemap_d *dtree;
++      unsigned int a, b, c, d;
++      unsigned char a1, b1, c1, d1;
++      unsigned char a2, b2, c2, d2;
++
++      if (start == end)
++              return __delip_single(set, start, hash_ip, flags);
++
++      *hash_ip = start;
++
++      ABCD(a1, b1, c1, d1, &start);
++      ABCD(a2, b2, c2, d2, &end);
++
++      /* This is sooo ugly... */
++      DELIP_RANGE_LOOP(map, a, a1, a2, CHECK1(a, a1, a2, b1, b2, c1, c2, d1, d2), btree, fullbitmap_b, cachep_b, free_b, flags) {
++              DELIP_RANGE_LOOP(btree, b, GETVALUE1(a, a1, b1, 0), GETVALUE1(a, a2, b2, 255), CHECK2(a, b, a1, a2, b1, b2, c1, c2, d1, d2), ctree, fullbitmap_c, cachep_c, free_c, flags) {
++                      DELIP_RANGE_LOOP(ctree, c, GETVALUE2(a, b, a1, b1, c1, 0), GETVALUE2(a, b, a2, b2, c2, 255), CHECK3(a, b, c, a1, a2, b1, b2, c1, c2, d1, d2), dtree, fullbitmap_d, cachep_d, free_d, flags) {
++                              for (d = GETVALUE3(a, b, c, a1, b1, c1, d1, 0); d <= GETVALUE3(a, b, c, a2, b2, c2, d2, 255); d++)
++                                      clear_bit(d, (void *) dtree->bitmap);
++                              set_bit(b, (void *) btree->dirty);
++                      } DELIP_RANGE_LOOP_END();
++              } DELIP_RANGE_LOOP_END();
++      } DELIP_RANGE_LOOP_END();
++
++      return 0;
++}
++
++static int
++delip(struct ip_set *set, const void *data, size_t size, ip_set_ip_t *hash_ip)
++{
++      struct ip_set_req_iptreemap *req = (struct ip_set_req_iptreemap *) data;
++
++      if (size != sizeof(struct ip_set_req_iptreemap)) {
++              ip_set_printk("data length wrong (want %zu, have %zu)", sizeof(struct ip_set_req_iptreemap), size);
++              return -EINVAL;
++      }
++
++      return __delip_range(set, MIN(req->start, req->end), MAX(req->start, req->end), hash_ip, GFP_KERNEL);
++}
++
++static int
++delip_kernel(struct ip_set *set, const struct sk_buff *skb, ip_set_ip_t *hash_ip, const u_int32_t *flags, unsigned char index)
++{
++      return __delip_single(set, 
++                      ntohl(flags[index] & IPSET_SRC 
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22)
++                              ? ip_hdr(skb)->saddr 
++                              : ip_hdr(skb)->daddr),
++#else
++                              ? skb->nh.iph->saddr 
++                              : skb->nh.iph->daddr),
++#endif
++                      hash_ip,
++                      GFP_ATOMIC);
++}
++
++/* Check the status of the bitmap
++ * -1 == all bits cleared
++ *  1 == all bits set
++ *  0 == anything else
++ */
++static inline int
++bitmap_status(struct ip_set_iptreemap_d *dtree)
++{
++      unsigned char first = dtree->bitmap[0];
++      int a;
++
++      for (a = 1; a < 32; a++)
++              if (dtree->bitmap[a] != first)
++                      return 0;
++
++      return (first == 0 ? -1 : (first == 255 ? 1 : 0));
++}
++
++static void
++gc(unsigned long addr)
++{
++      struct ip_set *set = (struct ip_set *) addr;
++      struct ip_set_iptreemap *map = (struct ip_set_iptreemap *) set->data;
++      struct ip_set_iptreemap_b *btree;
++      struct ip_set_iptreemap_c *ctree;
++      struct ip_set_iptreemap_d *dtree;
++      unsigned int a, b, c;
++      int i, j, k;
++
++      write_lock_bh(&set->lock);
++
++      LOOP_WALK_BEGIN_GC(map, a, btree, fullbitmap_b, cachep_b, i) {
++              LOOP_WALK_BEGIN_GC(btree, b, ctree, fullbitmap_c, cachep_c, j) {
++                      if (!test_and_clear_bit(b, (void *) btree->dirty))
++                              continue;
++                      LOOP_WALK_BEGIN_GC(ctree, c, dtree, fullbitmap_d, cachep_d, k) {
++                              switch (bitmap_status(dtree)) {
++                                      case -1:
++                                              kmem_cache_free(cachep_d, dtree);
++                                              ctree->tree[c] = NULL;
++                                              k--;
++                                      break;
++                                      case 1:
++                                              kmem_cache_free(cachep_d, dtree);
++                                              ctree->tree[c] = fullbitmap_d;
++                                              k++;
++                                      break;
++                              }
++                      } LOOP_WALK_END();
++              } LOOP_WALK_END_GC(btree, b, ctree, fullbitmap_c, cachep_c, k);
++      } LOOP_WALK_END_GC(map, a, btree, fullbitmap_b, cachep_b, j);
++
++      write_unlock_bh(&set->lock);
++
++      map->gc.expires = jiffies + map->gc_interval * HZ;
++      add_timer(&map->gc);
++}
++
++static inline void
++init_gc_timer(struct ip_set *set)
++{
++      struct ip_set_iptreemap *map = (struct ip_set_iptreemap *) set->data;
++
++      init_timer(&map->gc);
++      map->gc.data = (unsigned long) set;
++      map->gc.function = gc;
++      map->gc.expires = jiffies + map->gc_interval * HZ;
++      add_timer(&map->gc);
++}
++
++static int create(struct ip_set *set, const void *data, size_t size)
++{
++      struct ip_set_req_iptreemap_create *req = (struct ip_set_req_iptreemap_create *) data;
++      struct ip_set_iptreemap *map;
++
++      if (size != sizeof(struct ip_set_req_iptreemap_create)) {
++              ip_set_printk("data length wrong (want %zu, have %zu)", sizeof(struct ip_set_req_iptreemap_create), size);
++              return -EINVAL;
++      }
++
++      map = kzalloc(sizeof(*map), GFP_KERNEL);
++      if (!map)
++              return -ENOMEM;
++
++      map->gc_interval = req->gc_interval ? req->gc_interval : IPTREEMAP_DEFAULT_GC_TIME;
++      set->data = map;
++
++      init_gc_timer(set);
++
++      return 0;
++}
++
++static inline void __flush(struct ip_set_iptreemap *map)
++{
++      struct ip_set_iptreemap_b *btree;
++      unsigned int a;
++
++      LOOP_WALK_BEGIN(map, a, btree);
++              if (btree != fullbitmap_b)
++                      free_b(btree);
++      LOOP_WALK_END();
++}
++
++static void destroy(struct ip_set *set)
++{
++      struct ip_set_iptreemap *map = (struct ip_set_iptreemap *) set->data;
++
++      while (!del_timer(&map->gc))
++              msleep(IPTREEMAP_DESTROY_SLEEP);
++
++      __flush(map);
++      kfree(map);
++
++      set->data = NULL;
++}
++
++static void flush(struct ip_set *set)
++{
++      struct ip_set_iptreemap *map = (struct ip_set_iptreemap *) set->data;
++
++      while (!del_timer(&map->gc))
++              msleep(IPTREEMAP_DESTROY_SLEEP);
++
++      __flush(map);
++
++      memset(map, 0, sizeof(*map));
++
++      init_gc_timer(set);
++}
++
++static void list_header(const struct ip_set *set, void *data)
++{
++      struct ip_set_iptreemap *map = (struct ip_set_iptreemap *) set->data;
++      struct ip_set_req_iptreemap_create *header = (struct ip_set_req_iptreemap_create *) data;
++
++      header->gc_interval = map->gc_interval;
++}
++
++static int list_members_size(const struct ip_set *set)
++{
++      struct ip_set_iptreemap *map = (struct ip_set_iptreemap *) set->data;
++      struct ip_set_iptreemap_b *btree;
++      struct ip_set_iptreemap_c *ctree;
++      struct ip_set_iptreemap_d *dtree;
++      unsigned int a, b, c, d, inrange = 0, count = 0;
++
++      LOOP_WALK_BEGIN_COUNT(map, a, btree, inrange, count) {
++              LOOP_WALK_BEGIN_COUNT(btree, b, ctree, inrange, count) {
++                      LOOP_WALK_BEGIN_COUNT(ctree, c, dtree, inrange, count) {
++                              for (d = 0; d < 256; d++) {
++                                      if (test_bit(d, (void *) dtree->bitmap)) {
++                                              inrange = 1;
++                                      } else if (inrange) {
++                                              count++;
++                                              inrange = 0;
++                                      }
++                              }
++                      } LOOP_WALK_END_COUNT();
++              } LOOP_WALK_END_COUNT();
++      } LOOP_WALK_END_COUNT();
++
++      if (inrange)
++              count++;
++
++      return (count * sizeof(struct ip_set_req_iptreemap));
++}
++
++static inline size_t add_member(void *data, size_t offset, ip_set_ip_t start, ip_set_ip_t end)
++{
++      struct ip_set_req_iptreemap *entry = (struct ip_set_req_iptreemap *) (data + offset);
++
++      entry->start = start;
++      entry->end = end;
++
++      return sizeof(*entry);
++}
++
++static void list_members(const struct ip_set *set, void *data)
++{
++      struct ip_set_iptreemap *map = (struct ip_set_iptreemap *) set->data;
++      struct ip_set_iptreemap_b *btree;
++      struct ip_set_iptreemap_c *ctree;
++      struct ip_set_iptreemap_d *dtree;
++      unsigned int a, b, c, d, inrange = 0;
++      size_t offset = 0;
++      ip_set_ip_t start = 0, end = 0, ip;
++
++      LOOP_WALK_BEGIN(map, a, btree) {
++              LOOP_WALK_BEGIN(btree, b, ctree) {
++                      LOOP_WALK_BEGIN(ctree, c, dtree) {
++                              for (d = 0; d < 256; d++) {
++                                      if (test_bit(d, (void *) dtree->bitmap)) {
++                                              ip = ((a << 24) | (b << 16) | (c << 8) | d);
++                                              if (!inrange) {
++                                                      inrange = 1;
++                                                      start = ip;
++                                              } else if (end < ip - 1) {
++                                                      offset += add_member(data, offset, start, end);
++                                                      start = ip;
++                                              }
++                                              end = ip;
++                                      } else if (inrange) {
++                                              offset += add_member(data, offset, start, end);
++                                              inrange = 0;
++                                      }
++                              }
++                      } LOOP_WALK_END();
++              } LOOP_WALK_END();
++      } LOOP_WALK_END();
++
++      if (inrange)
++              add_member(data, offset, start, end);
++}
++
++static struct ip_set_type ip_set_iptreemap = {
++      .typename               = SETTYPE_NAME,
++      .features               = IPSET_TYPE_IP | IPSET_DATA_SINGLE,
++      .protocol_version       = IP_SET_PROTOCOL_VERSION,
++      .create                 = create,
++      .destroy                = destroy,
++      .flush                  = flush,
++      .reqsize                = sizeof(struct ip_set_req_iptreemap),
++      .addip                  = addip,
++      .addip_kernel           = addip_kernel,
++      .delip                  = delip,
++      .delip_kernel           = delip_kernel,
++      .testip                 = testip,
++      .testip_kernel          = testip_kernel,
++      .header_size            = sizeof(struct ip_set_req_iptreemap_create),
++      .list_header            = list_header,
++      .list_members_size      = list_members_size,
++      .list_members           = list_members,
++      .me                     = THIS_MODULE,
++};
++
++MODULE_LICENSE("GPL");
++MODULE_AUTHOR("Sven Wegener <sven.wegener@stealer.net>");
++MODULE_DESCRIPTION("iptreemap type of IP sets");
++
++static int __init ip_set_iptreemap_init(void)
++{
++      int ret = -ENOMEM;
++      int a;
++
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,23)
++      cachep_b = kmem_cache_create("ip_set_iptreemap_b", 
++                                   sizeof(struct ip_set_iptreemap_b), 
++                                   0, 0, NULL);
++#else
++      cachep_b = kmem_cache_create("ip_set_iptreemap_b", 
++                                   sizeof(struct ip_set_iptreemap_b), 
++                                   0, 0, NULL, NULL);
++#endif
++      if (!cachep_b) {
++              ip_set_printk("Unable to create ip_set_iptreemap_b slab cache");
++              goto out;
++      }
++
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,23)
++      cachep_c = kmem_cache_create("ip_set_iptreemap_c", 
++                                   sizeof(struct ip_set_iptreemap_c),
++                                   0, 0, NULL);
++#else
++      cachep_c = kmem_cache_create("ip_set_iptreemap_c", 
++                                   sizeof(struct ip_set_iptreemap_c),
++                                   0, 0, NULL, NULL);
++#endif
++      if (!cachep_c) {
++              ip_set_printk("Unable to create ip_set_iptreemap_c slab cache");
++              goto outb;
++      }
++
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,23)
++      cachep_d = kmem_cache_create("ip_set_iptreemap_d",
++                                   sizeof(struct ip_set_iptreemap_d),
++                                   0, 0, NULL);
++#else
++      cachep_d = kmem_cache_create("ip_set_iptreemap_d",
++                                   sizeof(struct ip_set_iptreemap_d),
++                                   0, 0, NULL, NULL);
++#endif
++      if (!cachep_d) {
++              ip_set_printk("Unable to create ip_set_iptreemap_d slab cache");
++              goto outc;
++      }
++
++      fullbitmap_d = kmem_cache_alloc(cachep_d, GFP_KERNEL);
++      if (!fullbitmap_d)
++              goto outd;
++
++      fullbitmap_c = kmem_cache_alloc(cachep_c, GFP_KERNEL);
++      if (!fullbitmap_c)
++              goto outbitmapd;
++
++      fullbitmap_b = kmem_cache_alloc(cachep_b, GFP_KERNEL);
++      if (!fullbitmap_b)
++              goto outbitmapc;
++
++      ret = ip_set_register_set_type(&ip_set_iptreemap);
++      if (0 > ret)
++              goto outbitmapb;
++
++      /* Now init our global bitmaps */
++      memset(fullbitmap_d->bitmap, 0xff, sizeof(fullbitmap_d->bitmap));
++
++      for (a = 0; a < 256; a++)
++              fullbitmap_c->tree[a] = fullbitmap_d;
++
++      for (a = 0; a < 256; a++)
++              fullbitmap_b->tree[a] = fullbitmap_c;
++      memset(fullbitmap_b->dirty, 0, sizeof(fullbitmap_b->dirty));
++
++      return 0;
++
++outbitmapb:
++      kmem_cache_free(cachep_b, fullbitmap_b);
++outbitmapc:
++      kmem_cache_free(cachep_c, fullbitmap_c);
++outbitmapd:
++      kmem_cache_free(cachep_d, fullbitmap_d);
++outd:
++      kmem_cache_destroy(cachep_d);
++outc:
++      kmem_cache_destroy(cachep_c);
++outb:
++      kmem_cache_destroy(cachep_b);
++out:
++
++      return ret;
++}
++
++static void __exit ip_set_iptreemap_fini(void)
++{
++      ip_set_unregister_set_type(&ip_set_iptreemap);
++      kmem_cache_free(cachep_d, fullbitmap_d);
++      kmem_cache_free(cachep_c, fullbitmap_c);
++      kmem_cache_free(cachep_b, fullbitmap_b);
++      kmem_cache_destroy(cachep_d);
++      kmem_cache_destroy(cachep_c);
++      kmem_cache_destroy(cachep_b);
++}
++
++module_init(ip_set_iptreemap_init);
++module_exit(ip_set_iptreemap_fini);
+diff -Nurp linux-2.6.22.10-vs2.3.0.29-pl02/net/ipv4/netfilter/ip_set_macipmap.c linux-2.6.22.10-vs2.3.0.29-pl03/net/ipv4/netfilter/ip_set_macipmap.c
+--- linux-2.6.22.10-vs2.3.0.29-pl02/net/ipv4/netfilter/ip_set_macipmap.c       1969-12-31 19:00:00.000000000 -0500
++++ linux-2.6.22.10-vs2.3.0.29-pl03/net/ipv4/netfilter/ip_set_macipmap.c       2007-11-14 14:12:25.000000000 -0500
+@@ -0,0 +1,375 @@
++/* Copyright (C) 2000-2002 Joakim Axelsson <gozem@linux.nu>
++ *                         Patrick Schaaf <bof@bof.de>
++ *                         Martin Josefsson <gandalf@wlug.westbo.se>
++ * Copyright (C) 2003-2004 Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License version 2 as
++ * published by the Free Software Foundation.  
++ */
++
++/* Kernel module implementing an IP set type: the macipmap type */
++
++#include <linux/module.h>
++#include <linux/ip.h>
++#include <linux/skbuff.h>
++#include <linux/version.h>
++#include <linux/netfilter_ipv4/ip_tables.h>
++#include <linux/netfilter_ipv4/ip_set.h>
++#include <linux/errno.h>
++#include <asm/uaccess.h>
++#include <asm/bitops.h>
++#include <linux/spinlock.h>
++#include <linux/if_ether.h>
++#include <linux/vmalloc.h>
++
++#include <linux/netfilter_ipv4/ip_set_malloc.h>
++#include <linux/netfilter_ipv4/ip_set_macipmap.h>
++
++static int
++testip(struct ip_set *set, const void *data, size_t size, ip_set_ip_t *hash_ip)
++{
++      struct ip_set_macipmap *map = (struct ip_set_macipmap *) set->data;
++      struct ip_set_macip *table = (struct ip_set_macip *) map->members;      
++      struct ip_set_req_macipmap *req = (struct ip_set_req_macipmap *) data;
++
++      if (size != sizeof(struct ip_set_req_macipmap)) {
++              ip_set_printk("data length wrong (want %zu, have %zu)",
++                            sizeof(struct ip_set_req_macipmap),
++                            size);
++              return -EINVAL;
++      }
++
++      if (req->ip < map->first_ip || req->ip > map->last_ip)
++              return -ERANGE;
++
++      *hash_ip = req->ip;
++      DP("set: %s, ip:%u.%u.%u.%u, %u.%u.%u.%u",
++         set->name, HIPQUAD(req->ip), HIPQUAD(*hash_ip));             
++      if (test_bit(IPSET_MACIP_ISSET,
++                   (void *) &table[req->ip - map->first_ip].flags)) {
++              return (memcmp(req->ethernet,
++                             &table[req->ip - map->first_ip].ethernet,
++                             ETH_ALEN) == 0);
++      } else {
++              return (map->flags & IPSET_MACIP_MATCHUNSET ? 1 : 0);
++      }
++}
++
++static int
++testip_kernel(struct ip_set *set, 
++            const struct sk_buff *skb,
++            ip_set_ip_t *hash_ip,
++            const u_int32_t *flags,
++            unsigned char index)
++{
++      struct ip_set_macipmap *map =
++          (struct ip_set_macipmap *) set->data;
++      struct ip_set_macip *table =
++          (struct ip_set_macip *) map->members;
++      ip_set_ip_t ip;
++      
++      ip = ntohl(flags[index] & IPSET_SRC
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22)
++                      ? ip_hdr(skb)->saddr 
++                      : ip_hdr(skb)->daddr);
++#else
++                      ? skb->nh.iph->saddr
++                      : skb->nh.iph->daddr);
++#endif
++
++      if (ip < map->first_ip || ip > map->last_ip)
++              return 0;
++
++      *hash_ip = ip;  
++      DP("set: %s, ip:%u.%u.%u.%u, %u.%u.%u.%u",
++         set->name, HIPQUAD(ip), HIPQUAD(*hash_ip));          
++      if (test_bit(IPSET_MACIP_ISSET,
++          (void *) &table[ip - map->first_ip].flags)) {
++              /* Is mac pointer valid?
++               * If so, compare... */
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22)
++              return (skb_mac_header(skb) >= skb->head
++                      && (skb_mac_header(skb) + ETH_HLEN) <= skb->data
++#else
++              return (skb->mac.raw >= skb->head
++                      && (skb->mac.raw + ETH_HLEN) <= skb->data
++#endif
++                      && (memcmp(eth_hdr(skb)->h_source,
++                                 &table[ip - map->first_ip].ethernet,
++                                 ETH_ALEN) == 0));
++      } else {
++              return (map->flags & IPSET_MACIP_MATCHUNSET ? 1 : 0);
++      }
++}
++
++/* returns 0 on success */
++static inline int
++__addip(struct ip_set *set, 
++      ip_set_ip_t ip, unsigned char *ethernet, ip_set_ip_t *hash_ip)
++{
++      struct ip_set_macipmap *map =
++          (struct ip_set_macipmap *) set->data;
++      struct ip_set_macip *table =
++          (struct ip_set_macip *) map->members;
++
++      if (ip < map->first_ip || ip > map->last_ip)
++              return -ERANGE;
++      if (test_and_set_bit(IPSET_MACIP_ISSET, 
++                           (void *) &table[ip - map->first_ip].flags))
++              return -EEXIST;
++
++      *hash_ip = ip;
++      DP("%u.%u.%u.%u, %u.%u.%u.%u", HIPQUAD(ip), HIPQUAD(*hash_ip));
++      memcpy(&table[ip - map->first_ip].ethernet, ethernet, ETH_ALEN);
++      return 0;
++}
++
++static int
++addip(struct ip_set *set, const void *data, size_t size,
++      ip_set_ip_t *hash_ip)
++{
++      struct ip_set_req_macipmap *req =
++          (struct ip_set_req_macipmap *) data;
++
++      if (size != sizeof(struct ip_set_req_macipmap)) {
++              ip_set_printk("data length wrong (want %zu, have %zu)",
++                            sizeof(struct ip_set_req_macipmap),
++                            size);
++              return -EINVAL;
++      }
++      return __addip(set, req->ip, req->ethernet, hash_ip);
++}
++
++static int
++addip_kernel(struct ip_set *set, 
++           const struct sk_buff *skb,
++           ip_set_ip_t *hash_ip,
++           const u_int32_t *flags,
++           unsigned char index)
++{
++      ip_set_ip_t ip;
++      
++      ip = ntohl(flags[index] & IPSET_SRC
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22)
++                      ? ip_hdr(skb)->saddr 
++                      : ip_hdr(skb)->daddr);
++#else
++                      ? skb->nh.iph->saddr
++                      : skb->nh.iph->daddr);
++#endif
++
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22)
++      if (!(skb_mac_header(skb) >= skb->head
++            && (skb_mac_header(skb) + ETH_HLEN) <= skb->data))
++#else
++      if (!(skb->mac.raw >= skb->head
++            && (skb->mac.raw + ETH_HLEN) <= skb->data))
++#endif
++              return -EINVAL;
++
++      return __addip(set, ip, eth_hdr(skb)->h_source, hash_ip);
++}
++
++static inline int
++__delip(struct ip_set *set, ip_set_ip_t ip, ip_set_ip_t *hash_ip)
++{
++      struct ip_set_macipmap *map =
++          (struct ip_set_macipmap *) set->data;
++      struct ip_set_macip *table =
++          (struct ip_set_macip *) map->members;
++
++      if (ip < map->first_ip || ip > map->last_ip)
++              return -ERANGE;
++      if (!test_and_clear_bit(IPSET_MACIP_ISSET, 
++                              (void *)&table[ip - map->first_ip].flags))
++              return -EEXIST;
++
++      *hash_ip = ip;
++      DP("%u.%u.%u.%u, %u.%u.%u.%u", HIPQUAD(ip), HIPQUAD(*hash_ip));
++      return 0;
++}
++
++static int
++delip(struct ip_set *set, const void *data, size_t size,
++     ip_set_ip_t *hash_ip)
++{
++      struct ip_set_req_macipmap *req =
++          (struct ip_set_req_macipmap *) data;
++
++      if (size != sizeof(struct ip_set_req_macipmap)) {
++              ip_set_printk("data length wrong (want %zu, have %zu)",
++                            sizeof(struct ip_set_req_macipmap),
++                            size);
++              return -EINVAL;
++      }
++      return __delip(set, req->ip, hash_ip);
++}
++
++static int
++delip_kernel(struct ip_set *set,
++           const struct sk_buff *skb,
++           ip_set_ip_t *hash_ip,
++           const u_int32_t *flags,
++           unsigned char index)
++{
++      return __delip(set,
++                     ntohl(flags[index] & IPSET_SRC 
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22)
++                              ? ip_hdr(skb)->saddr 
++                              : ip_hdr(skb)->daddr),
++#else
++                              ? skb->nh.iph->saddr 
++                              : skb->nh.iph->daddr),
++#endif
++                     hash_ip);
++}
++
++static inline size_t members_size(ip_set_id_t from, ip_set_id_t to)
++{
++      return (size_t)((to - from + 1) * sizeof(struct ip_set_macip));
++}
++
++static int create(struct ip_set *set, const void *data, size_t size)
++{
++      int newbytes;
++      struct ip_set_req_macipmap_create *req =
++          (struct ip_set_req_macipmap_create *) data;
++      struct ip_set_macipmap *map;
++
++      if (size != sizeof(struct ip_set_req_macipmap_create)) {
++              ip_set_printk("data length wrong (want %zu, have %zu)",
++                            sizeof(struct ip_set_req_macipmap_create),
++                            size);
++              return -EINVAL;
++      }
++
++      DP("from %u.%u.%u.%u to %u.%u.%u.%u",
++         HIPQUAD(req->from), HIPQUAD(req->to));
++
++      if (req->from > req->to) {
++              DP("bad ip range");
++              return -ENOEXEC;
++      }
++
++      if (req->to - req->from > MAX_RANGE) {
++              ip_set_printk("range too big (max %d addresses)",
++                             MAX_RANGE+1);
++              return -ENOEXEC;
++      }
++
++      map = kmalloc(sizeof(struct ip_set_macipmap), GFP_KERNEL);
++      if (!map) {
++              DP("out of memory for %d bytes",
++                 sizeof(struct ip_set_macipmap));
++              return -ENOMEM;
++      }
++      map->flags = req->flags;
++      map->first_ip = req->from;
++      map->last_ip = req->to;
++      newbytes = members_size(map->first_ip, map->last_ip);
++      map->members = ip_set_malloc(newbytes);
++      DP("members: %u %p", newbytes, map->members);
++      if (!map->members) {
++              DP("out of memory for %d bytes", newbytes);
++              kfree(map);
++              return -ENOMEM;
++      }
++      memset(map->members, 0, newbytes);
++      
++      set->data = map;
++      return 0;
++}
++
++static void destroy(struct ip_set *set)
++{
++      struct ip_set_macipmap *map =
++          (struct ip_set_macipmap *) set->data;
++
++      ip_set_free(map->members, members_size(map->first_ip, map->last_ip));
++      kfree(map);
++
++      set->data = NULL;
++}
++
++static void flush(struct ip_set *set)
++{
++      struct ip_set_macipmap *map =
++          (struct ip_set_macipmap *) set->data;
++      memset(map->members, 0, members_size(map->first_ip, map->last_ip));
++}
++
++static void list_header(const struct ip_set *set, void *data)
++{
++      struct ip_set_macipmap *map =
++          (struct ip_set_macipmap *) set->data;
++      struct ip_set_req_macipmap_create *header =
++          (struct ip_set_req_macipmap_create *) data;
++
++      DP("list_header %x %x %u", map->first_ip, map->last_ip,
++         map->flags);
++
++      header->from = map->first_ip;
++      header->to = map->last_ip;
++      header->flags = map->flags;
++}
++
++static int list_members_size(const struct ip_set *set)
++{
++      struct ip_set_macipmap *map =
++          (struct ip_set_macipmap *) set->data;
++
++      DP("%u", members_size(map->first_ip, map->last_ip));
++      return members_size(map->first_ip, map->last_ip);
++}
++
++static void list_members(const struct ip_set *set, void *data)
++{
++      struct ip_set_macipmap *map =
++          (struct ip_set_macipmap *) set->data;
++
++      int bytes = members_size(map->first_ip, map->last_ip);
++
++      DP("members: %u %p", bytes, map->members);
++      memcpy(data, map->members, bytes);
++}
++
++static struct ip_set_type ip_set_macipmap = {
++      .typename               = SETTYPE_NAME,
++      .features               = IPSET_TYPE_IP | IPSET_DATA_SINGLE,
++      .protocol_version       = IP_SET_PROTOCOL_VERSION,
++      .create                 = &create,
++      .destroy                = &destroy,
++      .flush                  = &flush,
++      .reqsize                = sizeof(struct ip_set_req_macipmap),
++      .addip                  = &addip,
++      .addip_kernel           = &addip_kernel,
++      .delip                  = &delip,
++      .delip_kernel           = &delip_kernel,
++      .testip                 = &testip,
++      .testip_kernel          = &testip_kernel,
++      .header_size            = sizeof(struct ip_set_req_macipmap_create),
++      .list_header            = &list_header,
++      .list_members_size      = &list_members_size,
++      .list_members           = &list_members,
++      .me                     = THIS_MODULE,
++};
++
++MODULE_LICENSE("GPL");
++MODULE_AUTHOR("Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>");
++MODULE_DESCRIPTION("macipmap type of IP sets");
++
++static int __init ip_set_macipmap_init(void)
++{
++      init_max_malloc_size();
++      return ip_set_register_set_type(&ip_set_macipmap);
++}
++
++static void __exit ip_set_macipmap_fini(void)
++{
++      /* FIXME: possible race with ip_set_create() */
++      ip_set_unregister_set_type(&ip_set_macipmap);
++}
++
++module_init(ip_set_macipmap_init);
++module_exit(ip_set_macipmap_fini);
+diff -Nurp linux-2.6.22.10-vs2.3.0.29-pl02/net/ipv4/netfilter/ip_set_nethash.c linux-2.6.22.10-vs2.3.0.29-pl03/net/ipv4/netfilter/ip_set_nethash.c
+--- linux-2.6.22.10-vs2.3.0.29-pl02/net/ipv4/netfilter/ip_set_nethash.c        1969-12-31 19:00:00.000000000 -0500
++++ linux-2.6.22.10-vs2.3.0.29-pl03/net/ipv4/netfilter/ip_set_nethash.c        2007-11-14 14:12:25.000000000 -0500
+@@ -0,0 +1,497 @@
++/* Copyright (C) 2003-2004 Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License version 2 as
++ * published by the Free Software Foundation.  
++ */
++
++/* Kernel module implementing a cidr nethash set */
++
++#include <linux/module.h>
++#include <linux/ip.h>
++#include <linux/skbuff.h>
++#include <linux/version.h>
++#include <linux/jhash.h>
++#include <linux/netfilter_ipv4/ip_tables.h>
++#include <linux/netfilter_ipv4/ip_set.h>
++#include <linux/errno.h>
++#include <asm/uaccess.h>
++#include <asm/bitops.h>
++#include <linux/spinlock.h>
++#include <linux/vmalloc.h>
++#include <linux/random.h>
++
++#include <net/ip.h>
++
++#include <linux/netfilter_ipv4/ip_set_malloc.h>
++#include <linux/netfilter_ipv4/ip_set_nethash.h>
++
++static int limit = MAX_RANGE;
++
++static inline __u32
++jhash_ip(const struct ip_set_nethash *map, uint16_t i, ip_set_ip_t ip)
++{
++      return jhash_1word(ip, *(((uint32_t *) map->initval) + i));
++}
++
++static inline __u32
++hash_id_cidr(struct ip_set_nethash *map,
++           ip_set_ip_t ip,
++           unsigned char cidr,
++           ip_set_ip_t *hash_ip)
++{
++      __u32 id;
++      u_int16_t i;
++      ip_set_ip_t *elem;
++
++      *hash_ip = pack(ip, cidr);
++      
++      for (i = 0; i < map->probes; i++) {
++              id = jhash_ip(map, i, *hash_ip) % map->hashsize;
++              DP("hash key: %u", id);
++              elem = HARRAY_ELEM(map->members, ip_set_ip_t *, id);
++              if (*elem == *hash_ip)
++                      return id;
++      }
++      return UINT_MAX;
++}
++
++static inline __u32
++hash_id(struct ip_set *set, ip_set_ip_t ip, ip_set_ip_t *hash_ip)
++{
++      struct ip_set_nethash *map = (struct ip_set_nethash *) set->data;
++      __u32 id = UINT_MAX;
++      int i;
++
++      for (i = 0; i < 30 && map->cidr[i]; i++) {
++              id = hash_id_cidr(map, ip, map->cidr[i], hash_ip);
++              if (id != UINT_MAX)
++                      break;
++      }
++      return id;
++}
++
++static inline int
++__testip_cidr(struct ip_set *set, ip_set_ip_t ip, unsigned char cidr,
++            ip_set_ip_t *hash_ip)
++{
++      struct ip_set_nethash *map = (struct ip_set_nethash *) set->data;
++
++      return (ip && hash_id_cidr(map, ip, cidr, hash_ip) != UINT_MAX);
++}
++
++static inline int
++__testip(struct ip_set *set, ip_set_ip_t ip, ip_set_ip_t *hash_ip)
++{
++      return (ip && hash_id(set, ip, hash_ip) != UINT_MAX);
++}
++
++static int
++testip(struct ip_set *set, const void *data, size_t size,
++       ip_set_ip_t *hash_ip)
++{
++      struct ip_set_req_nethash *req = 
++          (struct ip_set_req_nethash *) data;
++
++      if (size != sizeof(struct ip_set_req_nethash)) {
++              ip_set_printk("data length wrong (want %zu, have %zu)",
++                            sizeof(struct ip_set_req_nethash),
++                            size);
++              return -EINVAL;
++      }
++      return (req->cidr == 32 ? __testip(set, req->ip, hash_ip)
++              : __testip_cidr(set, req->ip, req->cidr, hash_ip));
++}
++
++static int
++testip_kernel(struct ip_set *set, 
++            const struct sk_buff *skb,
++            ip_set_ip_t *hash_ip,
++            const u_int32_t *flags,
++            unsigned char index)
++{
++      return __testip(set,
++                      ntohl(flags[index] & IPSET_SRC 
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22)
++                              ? ip_hdr(skb)->saddr 
++                              : ip_hdr(skb)->daddr),
++#else
++                              ? skb->nh.iph->saddr 
++                              : skb->nh.iph->daddr),
++#endif
++                      hash_ip);
++}
++
++static inline int
++__addip_base(struct ip_set_nethash *map, ip_set_ip_t ip)
++{
++      __u32 probe;
++      u_int16_t i;
++      ip_set_ip_t *elem;
++      
++      for (i = 0; i < map->probes; i++) {
++              probe = jhash_ip(map, i, ip) % map->hashsize;
++              elem = HARRAY_ELEM(map->members, ip_set_ip_t *, probe);
++              if (*elem == ip)
++                      return -EEXIST;
++              if (!*elem) {
++                      *elem = ip;
++                      map->elements++;
++                      return 0;
++              }
++      }
++      /* Trigger rehashing */
++      return -EAGAIN;
++}
++
++static inline int
++__addip(struct ip_set_nethash *map, ip_set_ip_t ip, unsigned char cidr,
++      ip_set_ip_t *hash_ip)
++{
++      if (!ip || map->elements >= limit)
++              return -ERANGE;
++      
++      *hash_ip = pack(ip, cidr);
++      DP("%u.%u.%u.%u/%u, %u.%u.%u.%u", HIPQUAD(ip), cidr, HIPQUAD(*hash_ip));
++      
++      return __addip_base(map, *hash_ip);
++}
++
++static void
++update_cidr_sizes(struct ip_set_nethash *map, unsigned char cidr)
++{
++      unsigned char next;
++      int i;
++      
++      for (i = 0; i < 30 && map->cidr[i]; i++) {
++              if (map->cidr[i] == cidr) {
++                      return;
++              } else if (map->cidr[i] < cidr) {
++                      next = map->cidr[i];
++                      map->cidr[i] = cidr;
++                      cidr = next;
++              }
++      }
++      if (i < 30)
++              map->cidr[i] = cidr;
++}
++
++static int
++addip(struct ip_set *set, const void *data, size_t size,
++        ip_set_ip_t *hash_ip)
++{
++      struct ip_set_req_nethash *req = 
++          (struct ip_set_req_nethash *) data;
++      int ret;
++
++      if (size != sizeof(struct ip_set_req_nethash)) {
++              ip_set_printk("data length wrong (want %zu, have %zu)",
++                            sizeof(struct ip_set_req_nethash),
++                            size);
++              return -EINVAL;
++      }
++      ret = __addip((struct ip_set_nethash *) set->data, 
++                    req->ip, req->cidr, hash_ip);
++      
++      if (ret == 0)
++              update_cidr_sizes((struct ip_set_nethash *) set->data,
++                                req->cidr);
++      
++      return ret;
++}
++
++static int
++addip_kernel(struct ip_set *set, 
++           const struct sk_buff *skb,
++           ip_set_ip_t *hash_ip,
++           const u_int32_t *flags,
++           unsigned char index)
++{
++      struct ip_set_nethash *map = (struct ip_set_nethash *) set->data;
++      int ret = -ERANGE;
++      ip_set_ip_t ip = ntohl(flags[index] & IPSET_SRC 
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22)
++                                      ? ip_hdr(skb)->saddr 
++                                      : ip_hdr(skb)->daddr);
++#else
++                                      ? skb->nh.iph->saddr
++                                      : skb->nh.iph->daddr);
++#endif
++      
++      if (map->cidr[0])
++              ret = __addip(map, ip, map->cidr[0], hash_ip);
++              
++      return ret;
++}
++
++static int retry(struct ip_set *set)
++{
++      struct ip_set_nethash *map = (struct ip_set_nethash *) set->data;
++      ip_set_ip_t *elem;
++      void *members;
++      u_int32_t i, hashsize = map->hashsize;
++      int res;
++      struct ip_set_nethash *tmp;
++      
++      if (map->resize == 0)
++              return -ERANGE;
++
++    again:
++      res = 0;
++      
++      /* Calculate new parameters */
++      hashsize += (hashsize * map->resize)/100;
++      if (hashsize == map->hashsize)
++              hashsize++;
++      
++      ip_set_printk("rehashing of set %s triggered: "
++                    "hashsize grows from %u to %u",
++                    set->name, map->hashsize, hashsize);
++
++      tmp = kmalloc(sizeof(struct ip_set_nethash) 
++                    + map->probes * sizeof(uint32_t), GFP_ATOMIC);
++      if (!tmp) {
++              DP("out of memory for %d bytes",
++                 sizeof(struct ip_set_nethash)
++                 + map->probes * sizeof(uint32_t));
++              return -ENOMEM;
++      }
++      tmp->members = harray_malloc(hashsize, sizeof(ip_set_ip_t), GFP_ATOMIC);
++      if (!tmp->members) {
++              DP("out of memory for %d bytes", hashsize * sizeof(ip_set_ip_t));
++              kfree(tmp);
++              return -ENOMEM;
++      }
++      tmp->hashsize = hashsize;
++      tmp->elements = 0;
++      tmp->probes = map->probes;
++      tmp->resize = map->resize;
++      memcpy(tmp->initval, map->initval, map->probes * sizeof(uint32_t));
++      memcpy(tmp->cidr, map->cidr, 30 * sizeof(unsigned char));
++      
++      write_lock_bh(&set->lock);
++      map = (struct ip_set_nethash *) set->data; /* Play safe */
++      for (i = 0; i < map->hashsize && res == 0; i++) {
++              elem = HARRAY_ELEM(map->members, ip_set_ip_t *, i);     
++              if (*elem)
++                      res = __addip_base(tmp, *elem);
++      }
++      if (res) {
++              /* Failure, try again */
++              write_unlock_bh(&set->lock);
++              harray_free(tmp->members);
++              kfree(tmp);
++              goto again;
++      }
++      
++      /* Success at resizing! */
++      members = map->members;
++      
++      map->hashsize = tmp->hashsize;
++      map->members = tmp->members;
++      write_unlock_bh(&set->lock);
++
++      harray_free(members);
++      kfree(tmp);
++
++      return 0;
++}
++
++static inline int
++__delip(struct ip_set_nethash *map, ip_set_ip_t ip, unsigned char cidr,
++      ip_set_ip_t *hash_ip)
++{
++      ip_set_ip_t id, *elem;
++
++      if (!ip)
++              return -ERANGE;
++      
++      id = hash_id_cidr(map, ip, cidr, hash_ip);
++      if (id == UINT_MAX)
++              return -EEXIST;
++              
++      elem = HARRAY_ELEM(map->members, ip_set_ip_t *, id);
++      *elem = 0;
++      map->elements--;
++      return 0;
++}
++
++static int
++delip(struct ip_set *set, const void *data, size_t size,
++        ip_set_ip_t *hash_ip)
++{
++      struct ip_set_req_nethash *req =
++          (struct ip_set_req_nethash *) data;
++
++      if (size != sizeof(struct ip_set_req_nethash)) {
++              ip_set_printk("data length wrong (want %zu, have %zu)",
++                            sizeof(struct ip_set_req_nethash),
++                            size);
++              return -EINVAL;
++      }
++      /* TODO: no garbage collection in map->cidr */          
++      return __delip((struct ip_set_nethash *) set->data, 
++                     req->ip, req->cidr, hash_ip);
++}
++
++static int
++delip_kernel(struct ip_set *set, 
++           const struct sk_buff *skb,
++           ip_set_ip_t *hash_ip,
++           const u_int32_t *flags,
++           unsigned char index)
++{
++      struct ip_set_nethash *map = (struct ip_set_nethash *) set->data;
++      int ret = -ERANGE;
++      ip_set_ip_t ip = ntohl(flags[index] & IPSET_SRC 
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22)
++                                      ? ip_hdr(skb)->saddr 
++                                      : ip_hdr(skb)->daddr);
++#else
++                                      ? skb->nh.iph->saddr
++                                      : skb->nh.iph->daddr);
++#endif
++      
++      if (map->cidr[0])
++              ret = __delip(map, ip, map->cidr[0], hash_ip);
++      
++      return ret;
++}
++
++static int create(struct ip_set *set, const void *data, size_t size)
++{
++      struct ip_set_req_nethash_create *req =
++          (struct ip_set_req_nethash_create *) data;
++      struct ip_set_nethash *map;
++      uint16_t i;
++
++      if (size != sizeof(struct ip_set_req_nethash_create)) {
++              ip_set_printk("data length wrong (want %zu, have %zu)",
++                             sizeof(struct ip_set_req_nethash_create),
++                             size);
++              return -EINVAL;
++      }
++
++      if (req->hashsize < 1) {
++              ip_set_printk("hashsize too small");
++              return -ENOEXEC;
++      }
++      if (req->probes < 1) {
++              ip_set_printk("probes too small");
++              return -ENOEXEC;
++      }
++
++      map = kmalloc(sizeof(struct ip_set_nethash)
++                    + req->probes * sizeof(uint32_t), GFP_KERNEL);
++      if (!map) {
++              DP("out of memory for %d bytes",
++                 sizeof(struct ip_set_nethash)
++                 + req->probes * sizeof(uint32_t));
++              return -ENOMEM;
++      }
++      for (i = 0; i < req->probes; i++)
++              get_random_bytes(((uint32_t *) map->initval)+i, 4);
++      map->elements = 0;
++      map->hashsize = req->hashsize;
++      map->probes = req->probes;
++      map->resize = req->resize;
++      memset(map->cidr, 0, 30 * sizeof(unsigned char));
++      map->members = harray_malloc(map->hashsize, sizeof(ip_set_ip_t), GFP_KERNEL);
++      if (!map->members) {
++              DP("out of memory for %d bytes", map->hashsize * sizeof(ip_set_ip_t));
++              kfree(map);
++              return -ENOMEM;
++      }
++      
++      set->data = map;
++      return 0;
++}
++
++static void destroy(struct ip_set *set)
++{
++      struct ip_set_nethash *map = (struct ip_set_nethash *) set->data;
++
++      harray_free(map->members);
++      kfree(map);
++
++      set->data = NULL;
++}
++
++static void flush(struct ip_set *set)
++{
++      struct ip_set_nethash *map = (struct ip_set_nethash *) set->data;
++      harray_flush(map->members, map->hashsize, sizeof(ip_set_ip_t));
++      memset(map->cidr, 0, 30 * sizeof(unsigned char));
++      map->elements = 0;
++}
++
++static void list_header(const struct ip_set *set, void *data)
++{
++      struct ip_set_nethash *map = (struct ip_set_nethash *) set->data;
++      struct ip_set_req_nethash_create *header =
++          (struct ip_set_req_nethash_create *) data;
++
++      header->hashsize = map->hashsize;
++      header->probes = map->probes;
++      header->resize = map->resize;
++}
++
++static int list_members_size(const struct ip_set *set)
++{
++      struct ip_set_nethash *map = (struct ip_set_nethash *) set->data;
++
++      return (map->hashsize * sizeof(ip_set_ip_t));
++}
++
++static void list_members(const struct ip_set *set, void *data)
++{
++      struct ip_set_nethash *map = (struct ip_set_nethash *) set->data;
++      ip_set_ip_t i, *elem;
++
++      for (i = 0; i < map->hashsize; i++) {
++              elem = HARRAY_ELEM(map->members, ip_set_ip_t *, i);     
++              ((ip_set_ip_t *)data)[i] = *elem;
++      }
++}
++
++static struct ip_set_type ip_set_nethash = {
++      .typename               = SETTYPE_NAME,
++      .features               = IPSET_TYPE_IP | IPSET_DATA_SINGLE,
++      .protocol_version       = IP_SET_PROTOCOL_VERSION,
++      .create                 = &create,
++      .destroy                = &destroy,
++      .flush                  = &flush,
++      .reqsize                = sizeof(struct ip_set_req_nethash),
++      .addip                  = &addip,
++      .addip_kernel           = &addip_kernel,
++      .retry                  = &retry,
++      .delip                  = &delip,
++      .delip_kernel           = &delip_kernel,
++      .testip                 = &testip,
++      .testip_kernel          = &testip_kernel,
++      .header_size            = sizeof(struct ip_set_req_nethash_create),
++      .list_header            = &list_header,
++      .list_members_size      = &list_members_size,
++      .list_members           = &list_members,
++      .me                     = THIS_MODULE,
++};
++
++MODULE_LICENSE("GPL");
++MODULE_AUTHOR("Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>");
++MODULE_DESCRIPTION("nethash type of IP sets");
++module_param(limit, int, 0600);
++MODULE_PARM_DESC(limit, "maximal number of elements stored in the sets");
++
++static int __init ip_set_nethash_init(void)
++{
++      return ip_set_register_set_type(&ip_set_nethash);
++}
++
++static void __exit ip_set_nethash_fini(void)
++{
++      /* FIXME: possible race with ip_set_create() */
++      ip_set_unregister_set_type(&ip_set_nethash);
++}
++
++module_init(ip_set_nethash_init);
++module_exit(ip_set_nethash_fini);
+diff -Nurp linux-2.6.22.10-vs2.3.0.29-pl02/net/ipv4/netfilter/ip_set_portmap.c linux-2.6.22.10-vs2.3.0.29-pl03/net/ipv4/netfilter/ip_set_portmap.c
+--- linux-2.6.22.10-vs2.3.0.29-pl02/net/ipv4/netfilter/ip_set_portmap.c        1969-12-31 19:00:00.000000000 -0500
++++ linux-2.6.22.10-vs2.3.0.29-pl03/net/ipv4/netfilter/ip_set_portmap.c        2007-11-14 14:12:25.000000000 -0500
+@@ -0,0 +1,346 @@
++/* Copyright (C) 2003-2004 Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License version 2 as
++ * published by the Free Software Foundation.  
++ */
++
++/* Kernel module implementing a port set type as a bitmap */
++
++#include <linux/module.h>
++#include <linux/ip.h>
++#include <linux/tcp.h>
++#include <linux/udp.h>
++#include <linux/skbuff.h>
++#include <linux/version.h>
++#include <linux/netfilter_ipv4/ip_tables.h>
++#include <linux/netfilter_ipv4/ip_set.h>
++#include <linux/errno.h>
++#include <asm/uaccess.h>
++#include <asm/bitops.h>
++#include <linux/spinlock.h>
++
++#include <net/ip.h>
++
++#include <linux/netfilter_ipv4/ip_set_portmap.h>
++
++/* We must handle non-linear skbs */
++static inline ip_set_ip_t
++get_port(const struct sk_buff *skb, u_int32_t flags)
++{
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22)
++      struct iphdr *iph = ip_hdr(skb);
++#else
++      struct iphdr *iph = skb->nh.iph;
++#endif
++      u_int16_t offset = ntohs(iph->frag_off) & IP_OFFSET;
++      switch (iph->protocol) {
++      case IPPROTO_TCP: {
++              struct tcphdr tcph;
++              
++              /* See comments at tcp_match in ip_tables.c */
++              if (offset)
++                      return INVALID_PORT;
++
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22)
++              if (skb_copy_bits(skb, ip_hdr(skb)->ihl*4, &tcph, sizeof(tcph)) < 0)
++#else
++              if (skb_copy_bits(skb, skb->nh.iph->ihl*4, &tcph, sizeof(tcph)) < 0)
++#endif
++                      /* No choice either */
++                      return INVALID_PORT;
++              
++              return ntohs(flags & IPSET_SRC ?
++                           tcph.source : tcph.dest);
++          }
++      case IPPROTO_UDP: {
++              struct udphdr udph;
++
++              if (offset)
++                      return INVALID_PORT;
++
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22)
++              if (skb_copy_bits(skb, ip_hdr(skb)->ihl*4, &udph, sizeof(udph)) < 0)
++#else
++              if (skb_copy_bits(skb, skb->nh.iph->ihl*4, &udph, sizeof(udph)) < 0)
++#endif
++                      /* No choice either */
++                      return INVALID_PORT;
++              
++              return ntohs(flags & IPSET_SRC ?
++                           udph.source : udph.dest);
++          }
++      default:
++              return INVALID_PORT;
++      }
++}
++
++static inline int
++__testport(struct ip_set *set, ip_set_ip_t port, ip_set_ip_t *hash_port)
++{
++      struct ip_set_portmap *map = (struct ip_set_portmap *) set->data;
++
++      if (port < map->first_port || port > map->last_port)
++              return -ERANGE;
++              
++      *hash_port = port;
++      DP("set: %s, port:%u, %u", set->name, port, *hash_port);
++      return !!test_bit(port - map->first_port, map->members);
++}
++
++static int
++testport(struct ip_set *set, const void *data, size_t size,
++         ip_set_ip_t *hash_port)
++{
++      struct ip_set_req_portmap *req = 
++          (struct ip_set_req_portmap *) data;
++
++      if (size != sizeof(struct ip_set_req_portmap)) {
++              ip_set_printk("data length wrong (want %zu, have %zu)",
++                            sizeof(struct ip_set_req_portmap),
++                            size);
++              return -EINVAL;
++      }
++      return __testport(set, req->port, hash_port);
++}
++
++static int
++testport_kernel(struct ip_set *set, 
++              const struct sk_buff *skb,
++              ip_set_ip_t *hash_port,
++              const u_int32_t *flags,
++              unsigned char index)
++{
++      int res;
++      ip_set_ip_t port = get_port(skb, flags[index]);
++
++      DP("flag %s port %u", flags[index] & IPSET_SRC ? "SRC" : "DST", port);  
++      if (port == INVALID_PORT)
++              return 0;       
++
++      res =  __testport(set, port, hash_port);
++      
++      return (res < 0 ? 0 : res);
++}
++
++static inline int
++__addport(struct ip_set *set, ip_set_ip_t port, ip_set_ip_t *hash_port)
++{
++      struct ip_set_portmap *map = (struct ip_set_portmap *) set->data;
++
++      if (port < map->first_port || port > map->last_port)
++              return -ERANGE;
++      if (test_and_set_bit(port - map->first_port, map->members))
++              return -EEXIST;
++              
++      *hash_port = port;
++      DP("port %u", port);
++      return 0;
++}
++
++static int
++addport(struct ip_set *set, const void *data, size_t size,
++        ip_set_ip_t *hash_port)
++{
++      struct ip_set_req_portmap *req = 
++          (struct ip_set_req_portmap *) data;
++
++      if (size != sizeof(struct ip_set_req_portmap)) {
++              ip_set_printk("data length wrong (want %zu, have %zu)",
++                            sizeof(struct ip_set_req_portmap),
++                            size);
++              return -EINVAL;
++      }
++      return __addport(set, req->port, hash_port);
++}
++
++static int
++addport_kernel(struct ip_set *set, 
++             const struct sk_buff *skb,
++             ip_set_ip_t *hash_port,
++             const u_int32_t *flags,
++             unsigned char index)
++{
++      ip_set_ip_t port = get_port(skb, flags[index]);
++      
++      if (port == INVALID_PORT)
++              return -EINVAL;
++
++      return __addport(set, port, hash_port);
++}
++
++static inline int
++__delport(struct ip_set *set, ip_set_ip_t port, ip_set_ip_t *hash_port)
++{
++      struct ip_set_portmap *map = (struct ip_set_portmap *) set->data;
++
++      if (port < map->first_port || port > map->last_port)
++              return -ERANGE;
++      if (!test_and_clear_bit(port - map->first_port, map->members))
++              return -EEXIST;
++              
++      *hash_port = port;
++      DP("port %u", port);
++      return 0;
++}
++
++static int
++delport(struct ip_set *set, const void *data, size_t size,
++        ip_set_ip_t *hash_port)
++{
++      struct ip_set_req_portmap *req =
++          (struct ip_set_req_portmap *) data;
++
++      if (size != sizeof(struct ip_set_req_portmap)) {
++              ip_set_printk("data length wrong (want %zu, have %zu)",
++                            sizeof(struct ip_set_req_portmap),
++                            size);
++              return -EINVAL;
++      }
++      return __delport(set, req->port, hash_port);
++}
++
++static int
++delport_kernel(struct ip_set *set, 
++             const struct sk_buff *skb,
++             ip_set_ip_t *hash_port,
++             const u_int32_t *flags,
++             unsigned char index)
++{
++      ip_set_ip_t port = get_port(skb, flags[index]);
++      
++      if (port == INVALID_PORT)
++              return -EINVAL;
++
++      return __delport(set, port, hash_port);
++}
++
++static int create(struct ip_set *set, const void *data, size_t size)
++{
++      int newbytes;
++      struct ip_set_req_portmap_create *req =
++          (struct ip_set_req_portmap_create *) data;
++      struct ip_set_portmap *map;
++
++      if (size != sizeof(struct ip_set_req_portmap_create)) {
++              ip_set_printk("data length wrong (want %zu, have %zu)",
++                             sizeof(struct ip_set_req_portmap_create),
++                             size);
++              return -EINVAL;
++      }
++
++      DP("from %u to %u", req->from, req->to);
++
++      if (req->from > req->to) {
++              DP("bad port range");
++              return -ENOEXEC;
++      }
++
++      if (req->to - req->from > MAX_RANGE) {
++              ip_set_printk("range too big (max %d ports)",
++                             MAX_RANGE+1);
++              return -ENOEXEC;
++      }
++
++      map = kmalloc(sizeof(struct ip_set_portmap), GFP_KERNEL);
++      if (!map) {
++              DP("out of memory for %d bytes",
++                 sizeof(struct ip_set_portmap));
++              return -ENOMEM;
++      }
++      map->first_port = req->from;
++      map->last_port = req->to;
++      newbytes = bitmap_bytes(req->from, req->to);
++      map->members = kmalloc(newbytes, GFP_KERNEL);
++      if (!map->members) {
++              DP("out of memory for %d bytes", newbytes);
++              kfree(map);
++              return -ENOMEM;
++      }
++      memset(map->members, 0, newbytes);
++
++      set->data = map;
++      return 0;
++}
++
++static void destroy(struct ip_set *set)
++{
++      struct ip_set_portmap *map = (struct ip_set_portmap *) set->data;
++
++      kfree(map->members);
++      kfree(map);
++
++      set->data = NULL;
++}
++
++static void flush(struct ip_set *set)
++{
++      struct ip_set_portmap *map = (struct ip_set_portmap *) set->data;
++      memset(map->members, 0, bitmap_bytes(map->first_port, map->last_port));
++}
++
++static void list_header(const struct ip_set *set, void *data)
++{
++      struct ip_set_portmap *map = (struct ip_set_portmap *) set->data;
++      struct ip_set_req_portmap_create *header =
++          (struct ip_set_req_portmap_create *) data;
++
++      DP("list_header %u %u", map->first_port, map->last_port);
++
++      header->from = map->first_port;
++      header->to = map->last_port;
++}
++
++static int list_members_size(const struct ip_set *set)
++{
++      struct ip_set_portmap *map = (struct ip_set_portmap *) set->data;
++
++      return bitmap_bytes(map->first_port, map->last_port);
++}
++
++static void list_members(const struct ip_set *set, void *data)
++{
++      struct ip_set_portmap *map = (struct ip_set_portmap *) set->data;
++      int bytes = bitmap_bytes(map->first_port, map->last_port);
++
++      memcpy(data, map->members, bytes);
++}
++
++static struct ip_set_type ip_set_portmap = {
++      .typename               = SETTYPE_NAME,
++      .features               = IPSET_TYPE_PORT | IPSET_DATA_SINGLE,
++      .protocol_version       = IP_SET_PROTOCOL_VERSION,
++      .create                 = &create,
++      .destroy                = &destroy,
++      .flush                  = &flush,
++      .reqsize                = sizeof(struct ip_set_req_portmap),
++      .addip                  = &addport,
++      .addip_kernel           = &addport_kernel,
++      .delip                  = &delport,
++      .delip_kernel           = &delport_kernel,
++      .testip                 = &testport,
++      .testip_kernel          = &testport_kernel,
++      .header_size            = sizeof(struct ip_set_req_portmap_create),
++      .list_header            = &list_header,
++      .list_members_size      = &list_members_size,
++      .list_members           = &list_members,
++      .me                     = THIS_MODULE,
++};
++
++MODULE_LICENSE("GPL");
++MODULE_AUTHOR("Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>");
++MODULE_DESCRIPTION("portmap type of IP sets");
++
++static int __init ip_set_portmap_init(void)
++{
++      return ip_set_register_set_type(&ip_set_portmap);
++}
++
++static void __exit ip_set_portmap_fini(void)
++{
++      /* FIXME: possible race with ip_set_create() */
++      ip_set_unregister_set_type(&ip_set_portmap);
++}
++
++module_init(ip_set_portmap_init);
++module_exit(ip_set_portmap_fini);
+diff -Nurp linux-2.6.22.10-vs2.3.0.29-pl02/net/ipv4/netfilter/ipt_set.c linux-2.6.22.10-vs2.3.0.29-pl03/net/ipv4/netfilter/ipt_set.c
+--- linux-2.6.22.10-vs2.3.0.29-pl02/net/ipv4/netfilter/ipt_set.c       1969-12-31 19:00:00.000000000 -0500
++++ linux-2.6.22.10-vs2.3.0.29-pl03/net/ipv4/netfilter/ipt_set.c       2007-11-14 14:12:25.000000000 -0500
+@@ -0,0 +1,160 @@
++/* Copyright (C) 2000-2002 Joakim Axelsson <gozem@linux.nu>
++ *                         Patrick Schaaf <bof@bof.de>
++ *                         Martin Josefsson <gandalf@wlug.westbo.se>
++ * Copyright (C) 2003-2004 Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License version 2 as
++ * published by the Free Software Foundation.  
++ */
++
++/* Kernel module to match an IP set. */
++
++#include <linux/module.h>
++#include <linux/ip.h>
++#include <linux/skbuff.h>
++#include <linux/version.h>
++
++#include <linux/netfilter_ipv4/ip_tables.h>
++#include <linux/netfilter_ipv4/ip_set.h>
++#include <linux/netfilter_ipv4/ipt_set.h>
++
++static inline int
++match_set(const struct ipt_set_info *info,
++        const struct sk_buff *skb,
++        int inv)
++{     
++      if (ip_set_testip_kernel(info->index, skb, info->flags))
++              inv = !inv;
++      return inv;
++}
++
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,23)
++static bool
++#else
++static int
++#endif
++match(const struct sk_buff *skb,
++      const struct net_device *in,
++      const struct net_device *out,
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,17)
++      const struct xt_match *match,
++#endif
++      const void *matchinfo,
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,23)
++      int offset, unsigned int protoff, bool *hotdrop)
++#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,16)
++      int offset, unsigned int protoff, int *hotdrop)
++#else
++      int offset, int *hotdrop)
++#endif
++{
++      const struct ipt_set_info_match *info = matchinfo;
++              
++      return match_set(&info->match_set,
++                       skb,
++                       info->match_set.flags[0] & IPSET_MATCH_INV);
++}
++
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,23)
++bool
++#else
++static int
++#endif
++checkentry(const char *tablename,
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,16)
++         const void *inf,
++#else
++         const struct ipt_ip *ip,
++#endif
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,17)
++         const struct xt_match *match,
++#endif
++         void *matchinfo,
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,19)
++         unsigned int matchsize,
++#endif
++         unsigned int hook_mask)
++{
++      struct ipt_set_info_match *info = 
++              (struct ipt_set_info_match *) matchinfo;
++      ip_set_id_t index;
++
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,19)
++      if (matchsize != IPT_ALIGN(sizeof(struct ipt_set_info_match))) {
++              ip_set_printk("invalid matchsize %d", matchsize);
++              return 0;
++      }
++#endif
++
++      index = ip_set_get_byindex(info->match_set.index);
++              
++      if (index == IP_SET_INVALID_ID) {
++              ip_set_printk("Cannot find set indentified by id %u to match",
++                            info->match_set.index);
++              return 0;       /* error */
++      }
++      if (info->match_set.flags[IP_SET_MAX_BINDINGS] != 0) {
++              ip_set_printk("That's nasty!");
++              return 0;       /* error */
++      }
++
++      return 1;
++}
++
++static void destroy(
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,17)
++                  const struct xt_match *match,
++#endif
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,19)
++                  void *matchinfo, unsigned int matchsize)
++#else
++                  void *matchinfo)
++#endif
++{
++      struct ipt_set_info_match *info = matchinfo;
++
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,19)
++      if (matchsize != IPT_ALIGN(sizeof(struct ipt_set_info_match))) {
++              ip_set_printk("invalid matchsize %d", matchsize);
++              return;
++      }
++#endif
++      ip_set_put(info->match_set.index);
++}
++
++static struct ipt_match set_match = {
++      .name           = "set",
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,21)
++      .family         = AF_INET,
++#endif
++      .match          = &match,
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,17)
++      .matchsize      = sizeof(struct ipt_set_info_match),
++#endif
++      .checkentry     = &checkentry,
++      .destroy        = &destroy,
++      .me             = THIS_MODULE
++};
++
++MODULE_LICENSE("GPL");
++MODULE_AUTHOR("Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>");
++MODULE_DESCRIPTION("iptables IP set match module");
++
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,21)
++#define ipt_register_match    xt_register_match
++#define ipt_unregister_match  xt_unregister_match
++#endif
++
++static int __init ipt_ipset_init(void)
++{
++      return ipt_register_match(&set_match);
++}
++
++static void __exit ipt_ipset_fini(void)
++{
++      ipt_unregister_match(&set_match);
++}
++
++module_init(ipt_ipset_init);
++module_exit(ipt_ipset_fini);
+diff -Nurp linux-2.6.22.10-vs2.3.0.29-pl02/net/ipv4/netfilter/ipt_SET.c linux-2.6.22.10-vs2.3.0.29-pl03/net/ipv4/netfilter/ipt_SET.c
+--- linux-2.6.22.10-vs2.3.0.29-pl02/net/ipv4/netfilter/ipt_SET.c       1969-12-31 19:00:00.000000000 -0500
++++ linux-2.6.22.10-vs2.3.0.29-pl03/net/ipv4/netfilter/ipt_SET.c       2007-11-14 14:12:25.000000000 -0500
+@@ -0,0 +1,172 @@
++/* Copyright (C) 2000-2002 Joakim Axelsson <gozem@linux.nu>
++ *                         Patrick Schaaf <bof@bof.de>
++ *                         Martin Josefsson <gandalf@wlug.westbo.se>
++ * Copyright (C) 2003-2004 Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License version 2 as
++ * published by the Free Software Foundation.  
++ */
++
++/* ipt_SET.c - netfilter target to manipulate IP sets */
++
++#include <linux/types.h>
++#include <linux/ip.h>
++#include <linux/timer.h>
++#include <linux/module.h>
++#include <linux/netfilter.h>
++#include <linux/netdevice.h>
++#include <linux/if.h>
++#include <linux/inetdevice.h>
++#include <linux/version.h>
++#include <net/protocol.h>
++#include <net/checksum.h>
++#include <linux/netfilter_ipv4.h>
++#include <linux/netfilter_ipv4/ip_tables.h>
++#include <linux/netfilter_ipv4/ipt_set.h>
++
++static unsigned int
++target(struct sk_buff **pskb,
++       const struct net_device *in,
++       const struct net_device *out,
++       unsigned int hooknum,
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,17)
++       const struct xt_target *target,
++#endif
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,19)
++       const void *targinfo,
++       void *userinfo)
++#else
++       const void *targinfo)
++#endif
++{
++      const struct ipt_set_info_target *info = targinfo;
++      
++      if (info->add_set.index != IP_SET_INVALID_ID)
++              ip_set_addip_kernel(info->add_set.index,
++                                  *pskb,
++                                  info->add_set.flags);
++      if (info->del_set.index != IP_SET_INVALID_ID)
++              ip_set_delip_kernel(info->del_set.index,
++                                  *pskb,
++                                  info->del_set.flags);
++
++      return IPT_CONTINUE;
++}
++
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,23)
++static bool
++#else
++static int
++#endif
++checkentry(const char *tablename,
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,16)
++         const void *e,
++#else
++         const struct ipt_entry *e,
++#endif
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,17)
++         const struct xt_target *target,
++#endif
++         void *targinfo,
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,19)
++         unsigned int targinfosize, 
++#endif
++         unsigned int hook_mask)
++{
++      struct ipt_set_info_target *info = 
++              (struct ipt_set_info_target *) targinfo;
++      ip_set_id_t index;
++
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,19)
++      if (targinfosize != IPT_ALIGN(sizeof(*info))) {
++              DP("bad target info size %u", targinfosize);
++              return 0;
++      }
++#endif
++
++      if (info->add_set.index != IP_SET_INVALID_ID) {
++              index = ip_set_get_byindex(info->add_set.index);
++              if (index == IP_SET_INVALID_ID) {
++                      ip_set_printk("cannot find add_set index %u as target",
++                                    info->add_set.index);
++                      return 0;       /* error */
++              }
++      }
++
++      if (info->del_set.index != IP_SET_INVALID_ID) {
++              index = ip_set_get_byindex(info->del_set.index);
++              if (index == IP_SET_INVALID_ID) {
++                      ip_set_printk("cannot find del_set index %u as target",
++                                    info->del_set.index);
++                      return 0;       /* error */
++              }
++      }
++      if (info->add_set.flags[IP_SET_MAX_BINDINGS] != 0
++          || info->del_set.flags[IP_SET_MAX_BINDINGS] != 0) {
++              ip_set_printk("That's nasty!");
++              return 0;       /* error */
++      }
++
++      return 1;
++}
++
++static void destroy(
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,17)
++                  const struct xt_target *target,
++#endif
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,19)
++                  void *targetinfo, unsigned int targetsize)
++#else
++                  void *targetinfo)
++#endif
++{
++      struct ipt_set_info_target *info = targetinfo;
++
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,19)
++      if (targetsize != IPT_ALIGN(sizeof(struct ipt_set_info_target))) {
++              ip_set_printk("invalid targetsize %d", targetsize);
++              return;
++      }
++#endif
++      if (info->add_set.index != IP_SET_INVALID_ID)
++              ip_set_put(info->add_set.index);
++      if (info->del_set.index != IP_SET_INVALID_ID)
++              ip_set_put(info->del_set.index);
++}
++
++static struct ipt_target SET_target = {
++      .name           = "SET",
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,21)
++      .family         = AF_INET,
++#endif
++      .target         = target,
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,17)
++      .targetsize     = sizeof(struct ipt_set_info_target),
++#endif
++      .checkentry     = checkentry,
++      .destroy        = destroy,
++      .me             = THIS_MODULE
++};
++
++MODULE_LICENSE("GPL");
++MODULE_AUTHOR("Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>");
++MODULE_DESCRIPTION("iptables IP set target module");
++
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,21)
++#define ipt_register_target      xt_register_target
++#define ipt_unregister_target    xt_unregister_target
++#endif
++
++static int __init ipt_SET_init(void)
++{
++      return ipt_register_target(&SET_target);
++}
++
++static void __exit ipt_SET_fini(void)
++{
++      ipt_unregister_target(&SET_target);
++}
++
++module_init(ipt_SET_init);
++module_exit(ipt_SET_fini);
+diff -Nurp linux-2.6.22.10-vs2.3.0.29-pl02/net/ipv4/netfilter/Kconfig linux-2.6.22.10-vs2.3.0.29-pl03/net/ipv4/netfilter/Kconfig
+--- linux-2.6.22.10-vs2.3.0.29-pl02/net/ipv4/netfilter/Kconfig 2007-07-21 18:00:25.000000000 -0400
++++ linux-2.6.22.10-vs2.3.0.29-pl03/net/ipv4/netfilter/Kconfig 2007-11-14 14:12:25.000000000 -0500
+@@ -402,5 +402,122 @@ config IP_NF_ARP_MANGLE
+         Allows altering the ARP packet payload: source and destination
+         hardware and network addresses.
++config IP_NF_SET
++      tristate "IP set support"
++      depends on INET && NETFILTER
++      help
++        This option adds IP set support to the kernel.
++        In order to define and use sets, you need the userspace utility
++        ipset(8).
++
++        To compile it as a module, choose M here.  If unsure, say N.
++
++config IP_NF_SET_MAX
++      int "Maximum number of IP sets"
++      default 256
++      range 2 65534
++      depends on IP_NF_SET
++      help
++        You can define here default value of the maximum number 
++        of IP sets for the kernel.
++
++        The value can be overriden by the 'max_sets' module
++        parameter of the 'ip_set' module.
++
++config IP_NF_SET_HASHSIZE
++      int "Hash size for bindings of IP sets"
++      default 1024
++      depends on IP_NF_SET
++      help
++        You can define here default value of the hash size for
++        bindings of IP sets.
++
++        The value can be overriden by the 'hash_size' module
++        parameter of the 'ip_set' module.
++
++config IP_NF_SET_IPMAP
++      tristate "ipmap set support"
++      depends on IP_NF_SET
++      help
++        This option adds the ipmap set type support.
++
++        To compile it as a module, choose M here.  If unsure, say N.
++
++config IP_NF_SET_MACIPMAP
++      tristate "macipmap set support"
++      depends on IP_NF_SET
++      help
++        This option adds the macipmap set type support.
++
++        To compile it as a module, choose M here.  If unsure, say N.
++
++config IP_NF_SET_PORTMAP
++      tristate "portmap set support"
++      depends on IP_NF_SET
++      help
++        This option adds the portmap set type support.
++
++        To compile it as a module, choose M here.  If unsure, say N.
++
++config IP_NF_SET_IPHASH
++      tristate "iphash set support"
++      depends on IP_NF_SET
++      help
++        This option adds the iphash set type support.
++
++        To compile it as a module, choose M here.  If unsure, say N.
++
++config IP_NF_SET_NETHASH
++      tristate "nethash set support"
++      depends on IP_NF_SET
++      help
++        This option adds the nethash set type support.
++
++        To compile it as a module, choose M here.  If unsure, say N.
++
++config IP_NF_SET_IPPORTHASH
++      tristate "ipporthash set support"
++      depends on IP_NF_SET
++      help
++        This option adds the ipporthash set type support.
++
++        To compile it as a module, choose M here.  If unsure, say N.
++
++config IP_NF_SET_IPTREE
++      tristate "iptree set support"
++      depends on IP_NF_SET
++      help
++        This option adds the iptree set type support.
++
++        To compile it as a module, choose M here.  If unsure, say N.
++
++config IP_NF_SET_IPTREEMAP
++      tristate "iptreemap set support"
++      depends on IP_NF_SET
++      help
++        This option adds the iptreemap set type support.
++
++        To compile it as a module, choose M here.  If unsure, say N.
++
++config IP_NF_MATCH_SET
++      tristate "set match support"
++      depends on IP_NF_SET
++      help
++        Set matching matches against given IP sets.
++        You need the ipset utility to create and set up the sets.
++
++        To compile it as a module, choose M here.  If unsure, say N.
++
++config IP_NF_TARGET_SET
++      tristate "SET target support"
++      depends on IP_NF_SET
++      help
++        The SET target makes possible to add/delete entries
++        in IP sets.
++        You need the ipset utility to create and set up the sets.
++
++        To compile it as a module, choose M here.  If unsure, say N.
++
++
+ endmenu
+diff -Nurp linux-2.6.22.10-vs2.3.0.29-pl02/net/ipv4/netfilter/Makefile linux-2.6.22.10-vs2.3.0.29-pl03/net/ipv4/netfilter/Makefile
+--- linux-2.6.22.10-vs2.3.0.29-pl02/net/ipv4/netfilter/Makefile        2007-07-21 18:00:25.000000000 -0400
++++ linux-2.6.22.10-vs2.3.0.29-pl03/net/ipv4/netfilter/Makefile        2007-11-14 14:12:25.000000000 -0500
+@@ -48,6 +48,7 @@ obj-$(CONFIG_IP_NF_MATCH_RECENT) += ipt_
+ obj-$(CONFIG_IP_NF_MATCH_ECN) += ipt_ecn.o
+ obj-$(CONFIG_IP_NF_MATCH_AH) += ipt_ah.o
+ obj-$(CONFIG_IP_NF_MATCH_TTL) += ipt_ttl.o
++obj-$(CONFIG_IP_NF_MATCH_SET) += ipt_set.o
+ obj-$(CONFIG_IP_NF_MATCH_ADDRTYPE) += ipt_addrtype.o
+ # targets
+@@ -62,6 +63,18 @@ obj-$(CONFIG_IP_NF_TARGET_LOG) += ipt_LO
+ obj-$(CONFIG_IP_NF_TARGET_ULOG) += ipt_ULOG.o
+ obj-$(CONFIG_IP_NF_TARGET_CLUSTERIP) += ipt_CLUSTERIP.o
+ obj-$(CONFIG_IP_NF_TARGET_TTL) += ipt_TTL.o
++obj-$(CONFIG_IP_NF_TARGET_SET) += ipt_SET.o
++
++# sets
++obj-$(CONFIG_IP_NF_SET) += ip_set.o
++obj-$(CONFIG_IP_NF_SET_IPMAP) += ip_set_ipmap.o
++obj-$(CONFIG_IP_NF_SET_PORTMAP) += ip_set_portmap.o
++obj-$(CONFIG_IP_NF_SET_MACIPMAP) += ip_set_macipmap.o
++obj-$(CONFIG_IP_NF_SET_IPHASH) += ip_set_iphash.o
++obj-$(CONFIG_IP_NF_SET_NETHASH) += ip_set_nethash.o
++obj-$(CONFIG_IP_NF_SET_IPPORTHASH) += ip_set_ipporthash.o
++obj-$(CONFIG_IP_NF_SET_IPTREE) += ip_set_iptree.o
++obj-$(CONFIG_IP_NF_SET_IPTREEMAP) += ip_set_iptreemap.o
+ # generic ARP tables
+ obj-$(CONFIG_IP_NF_ARPTABLES) += arp_tables.o
diff --git a/linux-2.6-500-vserver-filesharing.patch b/linux-2.6-500-vserver-filesharing.patch
new file mode 100644 (file)
index 0000000..bd853e3
--- /dev/null
@@ -0,0 +1,32 @@
+diff -Nurp linux-2.6.22.10-vs2.3.0.29.orig/kernel/vserver/inode.c linux-2.6.22.10-vs2.3.0.29-pl01/kernel/vserver/inode.c
+--- linux-2.6.22.10-vs2.3.0.29.orig/kernel/vserver/inode.c     2007-10-29 21:23:59.000000000 -0400
++++ linux-2.6.22.10-vs2.3.0.29-pl01/kernel/vserver/inode.c     2007-11-14 13:56:04.000000000 -0500
+@@ -368,6 +368,9 @@ int __dx_parse_tag(char *string, tag_t *
+ int dx_parse_tag(char *string, tag_t *tag, int remove)
+ {
+       int retval, flags = 0;
++#ifdef CONFIG_VSERVER_FILESHARING
++      flags |= MNT_NOTAGCHECK;
++#endif
+       while ((retval = __dx_parse_tag(string, tag, remove)))
+               flags |= retval;
+diff -Nurp linux-2.6.22.10-vs2.3.0.29.orig/kernel/vserver/Kconfig linux-2.6.22.10-vs2.3.0.29-pl01/kernel/vserver/Kconfig
+--- linux-2.6.22.10-vs2.3.0.29.orig/kernel/vserver/Kconfig     2007-10-29 21:23:59.000000000 -0400
++++ linux-2.6.22.10-vs2.3.0.29-pl01/kernel/vserver/Kconfig     2007-11-14 13:55:33.000000000 -0500
+@@ -4,6 +4,15 @@
+ menu "Linux VServer"
++config VSERVER_FILESHARING
++      bool    "(PLANETLAB) Disable Hidden File Module"
++      default y
++      help
++        This retains the module that when a vserver can
++        see a file, it can also stat and read it.  The
++        assumption is that chroot() works and vservers
++        are contained that way.
++
+ config        VSERVER_AUTO_LBACK
+       bool    "Automatically Assign Loopback IP"
+       default y
diff --git a/linux-2.6-510-ipod.patch b/linux-2.6-510-ipod.patch
new file mode 100644 (file)
index 0000000..ca91ff1
--- /dev/null
@@ -0,0 +1,287 @@
+diff -Nurp linux-2.6.22.10-vs2.3.0.29-pl01/include/linux/sysctl.h linux-2.6.22.10-vs2.3.0.29-pl02/include/linux/sysctl.h
+--- linux-2.6.22.10-vs2.3.0.29-pl01/include/linux/sysctl.h     2007-10-29 21:23:59.000000000 -0400
++++ linux-2.6.22.10-vs2.3.0.29-pl02/include/linux/sysctl.h     2007-11-14 13:58:15.000000000 -0500
+@@ -442,6 +442,13 @@ enum
+       NET_TCP_ALLOWED_CONG_CONTROL=123,
+       NET_TCP_MAX_SSTHRESH=124,
+       NET_TCP_FRTO_RESPONSE=125,
++#ifdef CONFIG_ICMP_IPOD
++      NET_IPV4_ICMP_IPOD_VERSION,
++      NET_IPV4_ICMP_IPOD_ENABLED,
++      NET_IPV4_ICMP_IPOD_HOST,
++      NET_IPV4_ICMP_IPOD_MASK,
++      NET_IPV4_ICMP_IPOD_KEY
++#endif
+ };
+ enum {
+diff -Nurp linux-2.6.22.10-vs2.3.0.29-pl01/include/net/icmp.h linux-2.6.22.10-vs2.3.0.29-pl02/include/net/icmp.h
+--- linux-2.6.22.10-vs2.3.0.29-pl01/include/net/icmp.h 2007-05-04 09:57:44.000000000 -0400
++++ linux-2.6.22.10-vs2.3.0.29-pl02/include/net/icmp.h 2007-11-14 13:57:27.000000000 -0500
+@@ -64,4 +64,12 @@ extern int sysctl_icmp_errors_use_inboun
+ extern int sysctl_icmp_ratelimit;
+ extern int sysctl_icmp_ratemask;
++#ifdef CONFIG_ICMP_IPOD
++extern int sysctl_icmp_ipod_version;
++extern int sysctl_icmp_ipod_enabled;
++extern u32 sysctl_icmp_ipod_host;
++extern u32 sysctl_icmp_ipod_mask;
++extern char sysctl_icmp_ipod_key[32+1];
++#endif
++
+ #endif        /* _ICMP_H */
+diff -Nurp linux-2.6.22.10-vs2.3.0.29-pl01/net/ipv4/icmp.c linux-2.6.22.10-vs2.3.0.29-pl02/net/ipv4/icmp.c
+--- linux-2.6.22.10-vs2.3.0.29-pl01/net/ipv4/icmp.c    2007-07-21 18:00:25.000000000 -0400
++++ linux-2.6.22.10-vs2.3.0.29-pl02/net/ipv4/icmp.c    2007-11-14 14:00:56.000000000 -0500
+@@ -922,6 +922,67 @@ static void icmp_address_reply(struct sk
+ out:;
+ }
++#ifdef CONFIG_ICMP_IPOD
++#include <linux/reboot.h>
++
++int sysctl_icmp_ipod_version = 2;
++int sysctl_icmp_ipod_enabled = 0;
++u32 sysctl_icmp_ipod_host = 0xffffffff;
++u32 sysctl_icmp_ipod_mask = 0xffffffff;
++char sysctl_icmp_ipod_key[32+1] = { "SETMETOSOMETHINGTHIRTYTWOBYTES!!" };
++#define IPOD_CHECK_KEY \
++      (sysctl_icmp_ipod_key[0] != 0)
++#define IPOD_VALID_KEY(d) \
++      (strncmp(sysctl_icmp_ipod_key, (char *)(d), strlen(sysctl_icmp_ipod_key)) == 0)
++
++static void icmp_ping_of_death(struct sk_buff *skb)
++{
++      struct icmphdr *icmph = skb->h.icmph;
++      struct iphdr *iph = skb->nh.iph;
++      int doit = 0;
++
++#if 0
++      printk(KERN_INFO "IPOD: got type=6, code=%d, host=%u.%u.%u.%u\n", icmph->code, ntohs(iph->tot_len), NIPQUAD(iph->saddr));
++#endif
++
++      /*
++       * If IPOD not enabled or wrong ICMP code, ignore.
++       */
++      if (!sysctl_icmp_ipod_enabled || icmph->code != 6)
++              return;
++
++      /*
++       * First check the source address info.
++       * If host not set, ignore.
++       */
++      if (sysctl_icmp_ipod_host != 0xffffffff &&
++          (ntohl(iph->saddr) & sysctl_icmp_ipod_mask) == sysctl_icmp_ipod_host) {
++              /*
++               * Now check the key if enabled.
++               * If packet doesn't contain enough data or key
++               * is otherwise invalid, ignore.
++               */
++              if (IPOD_CHECK_KEY) {
++                      if (pskb_may_pull(skb, sizeof(sysctl_icmp_ipod_key)-1) &&
++                          IPOD_VALID_KEY(skb->data))
++                              doit = 1;
++              } else {
++                      doit = 1;
++              }
++      }
++
++      if (doit) {
++              sysctl_icmp_ipod_enabled = 0;
++              printk(KERN_CRIT "IPOD: reboot forced by %u.%u.%u.%u...\n",
++                     NIPQUAD(iph->saddr));
++              machine_restart(NULL);
++      } else {
++              printk(KERN_WARNING "IPOD: from %u.%u.%u.%u rejected\n",
++                     NIPQUAD(iph->saddr));
++      }
++}
++#endif
++
+ static void icmp_discard(struct sk_buff *skb)
+ {
+ }
+@@ -1036,12 +1097,21 @@ static const struct icmp_control icmp_po
+               .handler = icmp_redirect,
+               .error = 1,
+       },
++#ifdef CONFIG_ICMP_IPOD
++      [6] = {
++              .output_entry = ICMP_MIB_DUMMY,
++              .input_entry = ICMP_MIB_DUMMY,
++              .handler = icmp_ping_of_death,
++              .error = 1,
++      },
++#else
+       [6] = {
+               .output_entry = ICMP_MIB_DUMMY,
+               .input_entry = ICMP_MIB_INERRORS,
+               .handler = icmp_discard,
+               .error = 1,
+       },
++#endif
+       [7] = {
+               .output_entry = ICMP_MIB_DUMMY,
+               .input_entry = ICMP_MIB_INERRORS,
+diff -Nurp linux-2.6.22.10-vs2.3.0.29-pl01/net/ipv4/Kconfig linux-2.6.22.10-vs2.3.0.29-pl02/net/ipv4/Kconfig
+--- linux-2.6.22.10-vs2.3.0.29-pl01/net/ipv4/Kconfig   2007-07-21 18:00:25.000000000 -0400
++++ linux-2.6.22.10-vs2.3.0.29-pl02/net/ipv4/Kconfig   2007-11-14 14:00:36.000000000 -0500
+@@ -660,3 +660,14 @@ config TCP_MD5SIG
+ source "net/ipv4/ipvs/Kconfig"
++#
++# Emulab special
++#
++
++config ICMP_IPOD
++      bool "ICMP: ICMP Ping-of-Death (Emulab)"
++      depends on INET && SYSCTL
++      ---help---
++          Support immediately rebooting upon receiving a specially
++        formed ICMP type 6 packet whose payload matches a string
++        configured by the administrator.
+diff -Nurp linux-2.6.22.10-vs2.3.0.29-pl01/net/ipv4/sysctl_net_ipv4.c linux-2.6.22.10-vs2.3.0.29-pl02/net/ipv4/sysctl_net_ipv4.c
+--- linux-2.6.22.10-vs2.3.0.29-pl01/net/ipv4/sysctl_net_ipv4.c 2007-07-21 18:00:27.000000000 -0400
++++ linux-2.6.22.10-vs2.3.0.29-pl02/net/ipv4/sysctl_net_ipv4.c 2007-11-14 14:00:36.000000000 -0500
+@@ -456,6 +456,49 @@ ctl_table ipv4_table[] = {
+               .mode           = 0644,
+               .proc_handler   = &proc_dointvec
+       },
++#ifdef CONFIG_ICMP_IPOD
++      {
++              .ctl_name       = NET_IPV4_ICMP_IPOD_VERSION,
++              .procname       = "icmp_ipod_version",
++              .data           = &sysctl_icmp_ipod_version,
++              .maxlen         = sizeof(sysctl_icmp_ipod_version),
++              .mode           = 0444,
++              .proc_handler   = &proc_dointvec
++      },
++      {
++              .ctl_name       = NET_IPV4_ICMP_IPOD_ENABLED,
++              .procname       = "icmp_ipod_enabled",
++              .data           = &sysctl_icmp_ipod_enabled,
++              .maxlen         = sizeof(sysctl_icmp_ipod_enabled),
++              .mode           = 0644,
++              .proc_handler   = &proc_dointvec
++      },
++      {
++              .ctl_name       = NET_IPV4_ICMP_IPOD_HOST,
++              .procname       = "icmp_ipod_host",
++              .data           = &sysctl_icmp_ipod_host,
++              .maxlen         = sizeof(sysctl_icmp_ipod_host),
++              .mode           = 0644,
++              .proc_handler   = &proc_dointvec
++      },
++      {
++              .ctl_name       = NET_IPV4_ICMP_IPOD_MASK,
++              .procname       = "icmp_ipod_mask",
++              .data           = &sysctl_icmp_ipod_mask,
++              .maxlen         = sizeof(sysctl_icmp_ipod_mask),
++              .mode           = 0644,
++              .proc_handler   = &proc_dointvec
++      },
++      {
++              .ctl_name       = NET_IPV4_ICMP_IPOD_KEY,
++              .procname       = "icmp_ipod_key",
++              .data           = &sysctl_icmp_ipod_key,
++              .maxlen         = sizeof(sysctl_icmp_ipod_key),
++              .mode           = 0600,
++              .proc_handler   = &proc_dostring,
++              .strategy       = &sysctl_string
++      },
++#endif
+       {
+               .ctl_name       = NET_IPV4_ICMP_ERRORS_USE_INBOUND_IFADDR,
+               .procname       = "icmp_errors_use_inbound_ifaddr",
+diff -Nurp linux-2.6.22.10-vs2.3.0.29-pl01/net/ipv4/udp.c linux-2.6.22.10-vs2.3.0.29-pl02/net/ipv4/udp.c
+--- linux-2.6.22.10-vs2.3.0.29-pl01/net/ipv4/udp.c     2007-10-29 21:23:59.000000000 -0400
++++ linux-2.6.22.10-vs2.3.0.29-pl02/net/ipv4/udp.c     2007-11-14 14:00:36.000000000 -0500
+@@ -1212,6 +1212,75 @@ static inline int udp4_csum_init(struct 
+       return 0;
+ }
++/* XXX (mef) need to generalize the IPOD stuff.  Right now I am borrowing 
++   from the ICMP infrastructure. */
++#ifdef CONFIG_ICMP_IPOD
++#include <linux/reboot.h>
++
++extern int sysctl_icmp_ipod_version;
++extern int sysctl_icmp_ipod_enabled;
++extern u32 sysctl_icmp_ipod_host;
++extern u32 sysctl_icmp_ipod_mask;
++extern char sysctl_icmp_ipod_key[32+1];
++#define IPOD_CHECK_KEY \
++      (sysctl_icmp_ipod_key[0] != 0)
++#define IPOD_VALID_KEY(d) \
++      (strncmp(sysctl_icmp_ipod_key, (char *)(d), strlen(sysctl_icmp_ipod_key)) == 0)
++
++static void udp_ping_of_death(struct sk_buff *skb, struct udphdr *uh, u32 saddr)
++{
++      int doit = 0;
++
++      /*
++       * If IPOD not enabled or wrong UDP IPOD port, ignore.
++       */
++      if (!sysctl_icmp_ipod_enabled || (ntohs(uh->dest) != 664))
++              return;
++
++#if 0
++      printk(KERN_INFO "IPOD: got udp pod request, host=%u.%u.%u.%u\n", NIPQUAD(saddr));
++#endif
++
++
++      /*
++       * First check the source address info.
++       * If host not set, ignore.
++       */
++      if (sysctl_icmp_ipod_host != 0xffffffff &&
++          (ntohl(saddr) & sysctl_icmp_ipod_mask) == sysctl_icmp_ipod_host) {
++              /*
++               * Now check the key if enabled.
++               * If packet doesn't contain enough data or key
++               * is otherwise invalid, ignore.
++               */
++              if (IPOD_CHECK_KEY) {
++                      if (pskb_may_pull(skb, sizeof(sysctl_icmp_ipod_key)+sizeof(struct udphdr)-1)){
++#if 0
++                          int i;
++                          for (i=0;i<32+1;i++){
++                              printk("%c",((char*)skb->data)[i+sizeof(struct udphdr)]);
++                          }   
++                          printk("\n");
++#endif
++                          if (IPOD_VALID_KEY(skb->data+sizeof(struct udphdr)))
++                              doit = 1;
++                      }
++              } else {
++                      doit = 1;
++              }
++      }
++      if (doit) {
++              sysctl_icmp_ipod_enabled = 0;
++              printk(KERN_CRIT "IPOD: reboot forced by %u.%u.%u.%u...\n",
++                     NIPQUAD(saddr));
++              machine_restart(NULL);
++      } else {
++              printk(KERN_WARNING "IPOD: from %u.%u.%u.%u rejected\n",
++                     NIPQUAD(saddr));
++      }
++}
++#endif
++
+ /*
+  *    All we need to do is get the socket, and then do a checksum.
+  */
+@@ -1249,6 +1318,10 @@ int __udp4_lib_rcv(struct sk_buff *skb, 
+       if (rt->rt_flags & (RTCF_BROADCAST|RTCF_MULTICAST))
+               return __udp4_lib_mcast_deliver(skb, uh, saddr, daddr, udptable);
++#ifdef CONFIG_ICMP_IPOD
++      udp_ping_of_death(skb, uh, saddr);
++#endif
++
+       sk = __udp4_lib_lookup(saddr, uh->source, daddr, uh->dest,
+                              skb->dev->ifindex, udptable        );
diff --git a/linux-2.6-520-vnet+.patch b/linux-2.6-520-vnet+.patch
new file mode 100644 (file)
index 0000000..d33dd31
--- /dev/null
@@ -0,0 +1,615 @@
+diff -Nurp linux-2.6.22.10-vs2.3.0.29-pl03/include/linux/netfilter/xt_MARK.h linux-2.6.22.10-vs2.3.0.29-pl04/include/linux/netfilter/xt_MARK.h
+--- linux-2.6.22.10-vs2.3.0.29-pl03/include/linux/netfilter/xt_MARK.h  2006-06-17 21:49:35.000000000 -0400
++++ linux-2.6.22.10-vs2.3.0.29-pl04/include/linux/netfilter/xt_MARK.h  2007-11-14 16:04:04.000000000 -0500
+@@ -11,6 +11,7 @@ enum {
+       XT_MARK_SET=0,
+       XT_MARK_AND,
+       XT_MARK_OR,
++      XT_MARK_COPYXID,
+ };
+ struct xt_mark_target_info_v1 {
+diff -Nurp linux-2.6.22.10-vs2.3.0.29-pl03/include/linux/netfilter/xt_SETXID.h linux-2.6.22.10-vs2.3.0.29-pl04/include/linux/netfilter/xt_SETXID.h
+--- linux-2.6.22.10-vs2.3.0.29-pl03/include/linux/netfilter/xt_SETXID.h        1969-12-31 19:00:00.000000000 -0500
++++ linux-2.6.22.10-vs2.3.0.29-pl04/include/linux/netfilter/xt_SETXID.h        2007-11-14 16:05:44.000000000 -0500
+@@ -0,0 +1,14 @@
++#ifndef _XT_SETXID_H_target
++#define _XT_SETXID_H_target
++
++/* Version 1 */
++enum {
++      XT_SET_PACKET_XID=0
++};
++
++struct xt_setxid_target_info_v1 {
++      unsigned long mark;
++      u_int8_t mode;
++};
++
++#endif /*_XT_SETXID_H_target*/
+diff -Nurp linux-2.6.22.10-vs2.3.0.29-pl03/include/linux/netfilter_ipv4/ipt_MARK.h linux-2.6.22.10-vs2.3.0.29-pl04/include/linux/netfilter_ipv4/ipt_MARK.h
+--- linux-2.6.22.10-vs2.3.0.29-pl03/include/linux/netfilter_ipv4/ipt_MARK.h    2006-06-17 21:49:35.000000000 -0400
++++ linux-2.6.22.10-vs2.3.0.29-pl04/include/linux/netfilter_ipv4/ipt_MARK.h    2007-11-14 16:03:44.000000000 -0500
+@@ -9,9 +9,10 @@
+ #define ipt_mark_target_info xt_mark_target_info
+ /* Version 1 */
+-#define IPT_MARK_SET  XT_MARK_SET
+-#define IPT_MARK_AND  XT_MARK_AND
+-#define       IPT_MARK_OR     XT_MARK_OR
++#define IPT_MARK_SET          XT_MARK_SET
++#define IPT_MARK_AND          XT_MARK_AND
++#define       IPT_MARK_OR             XT_MARK_OR
++#define IPT_MARK_COPYXID      XT_MARK_COPYXID
+ #define ipt_mark_target_info_v1 xt_mark_target_info_v1
+diff -Nurp linux-2.6.22.10-vs2.3.0.29-pl03/include/linux/netfilter_ipv4/ipt_SETXID.h linux-2.6.22.10-vs2.3.0.29-pl04/include/linux/netfilter_ipv4/ipt_SETXID.h
+--- linux-2.6.22.10-vs2.3.0.29-pl03/include/linux/netfilter_ipv4/ipt_SETXID.h  1969-12-31 19:00:00.000000000 -0500
++++ linux-2.6.22.10-vs2.3.0.29-pl04/include/linux/netfilter_ipv4/ipt_SETXID.h  2007-11-14 16:05:44.000000000 -0500
+@@ -0,0 +1,13 @@
++#ifndef _IPT_SETXID_H_target
++#define _IPT_SETXID_H_target
++
++/* Backwards compatibility for old userspace */
++
++#include <linux/netfilter/xt_SETXID.h>
++
++/* Version 1 */
++#define IPT_SET_PACKET_XID    XT_SET_PACKET_XID
++
++#define ipt_setxid_target_info_v1 xt_setxid_target_info_v1
++
++#endif /*_IPT_SETXID_H_target*/
+diff -Nurp linux-2.6.22.10-vs2.3.0.29-pl03/include/linux/skbuff.h linux-2.6.22.10-vs2.3.0.29-pl04/include/linux/skbuff.h
+--- linux-2.6.22.10-vs2.3.0.29-pl03/include/linux/skbuff.h     2007-07-21 18:00:24.000000000 -0400
++++ linux-2.6.22.10-vs2.3.0.29-pl04/include/linux/skbuff.h     2007-11-15 13:57:04.000000000 -0500
+@@ -299,6 +299,9 @@ struct sk_buff {
+ #endif
+ #ifdef CONFIG_NETWORK_SECMARK
+       __u32                   secmark;
++#  define skb_tag             secmark
++#else
++#  define skb_tag             mark
+ #endif
+       __u32                   mark;
+diff -Nurp linux-2.6.22.10-vs2.3.0.29-pl03/include/linux/socket.h linux-2.6.22.10-vs2.3.0.29-pl04/include/linux/socket.h
+--- linux-2.6.22.10-vs2.3.0.29-pl03/include/linux/socket.h     2007-07-21 18:00:24.000000000 -0400
++++ linux-2.6.22.10-vs2.3.0.29-pl04/include/linux/socket.h     2007-11-14 14:24:36.000000000 -0500
+@@ -288,6 +288,8 @@ struct ucred {
+ #define SOL_TIPC      271
+ #define SOL_RXRPC     272
++#define SO_SETXID     SO_PEERCRED
++
+ /* IPX options */
+ #define IPX_TYPE      1
+diff -Nurp linux-2.6.22.10-vs2.3.0.29-pl03/include/linux/vserver/network.h linux-2.6.22.10-vs2.3.0.29-pl04/include/linux/vserver/network.h
+--- linux-2.6.22.10-vs2.3.0.29-pl03/include/linux/vserver/network.h    2007-10-29 21:23:59.000000000 -0400
++++ linux-2.6.22.10-vs2.3.0.29-pl04/include/linux/vserver/network.h    2007-11-14 14:23:54.000000000 -0500
+@@ -44,6 +44,8 @@ static inline uint64_t __nxf_init_set(vo
+ /* network caps */
+ #define NXC_RAW_ICMP          0x00000100
++#define NXC_RAW_SOCKET                0x00000200
++#define NXC_RAW_SEND          0x00000400
+ /* address types */
+diff -Nurp linux-2.6.22.10-vs2.3.0.29-pl03/include/net/netfilter/nf_conntrack.h linux-2.6.22.10-vs2.3.0.29-pl04/include/net/netfilter/nf_conntrack.h
+--- linux-2.6.22.10-vs2.3.0.29-pl03/include/net/netfilter/nf_conntrack.h       2007-07-21 18:00:24.000000000 -0400
++++ linux-2.6.22.10-vs2.3.0.29-pl04/include/net/netfilter/nf_conntrack.h       2007-11-14 16:35:42.000000000 -0500
+@@ -131,6 +131,9 @@ struct nf_conn
+       /* Storage reserved for other modules: */
+       union nf_conntrack_proto proto;
++      /* PLANETLAB. VNET-specific */
++      xid_t xid[IP_CT_DIR_MAX];
++
+       /* features dynamically at the end: helper, nat (both optional) */
+       char data[0];
+ };
+diff -Nurp linux-2.6.22.10-vs2.3.0.29-pl03/include/net/raw.h linux-2.6.22.10-vs2.3.0.29-pl04/include/net/raw.h
+--- linux-2.6.22.10-vs2.3.0.29-pl03/include/net/raw.h  2007-05-04 09:55:46.000000000 -0400
++++ linux-2.6.22.10-vs2.3.0.29-pl04/include/net/raw.h  2007-11-14 14:22:49.000000000 -0500
+@@ -36,7 +36,7 @@ extern rwlock_t raw_v4_lock;
+ extern struct sock *__raw_v4_lookup(struct sock *sk, unsigned short num,
+                                   __be32 raddr, __be32 laddr,
+-                                  int dif);
++                                  int dif, int tag);
+ extern int raw_v4_input(struct sk_buff *skb, struct iphdr *iph, int hash);
+diff -Nurp linux-2.6.22.10-vs2.3.0.29-pl03/net/core/skbuff.c linux-2.6.22.10-vs2.3.0.29-pl04/net/core/skbuff.c
+--- linux-2.6.22.10-vs2.3.0.29-pl03/net/core/skbuff.c  2007-07-21 18:00:25.000000000 -0400
++++ linux-2.6.22.10-vs2.3.0.29-pl04/net/core/skbuff.c  2007-11-14 15:12:52.000000000 -0500
+@@ -56,6 +56,7 @@
+ #include <linux/rtnetlink.h>
+ #include <linux/init.h>
+ #include <linux/scatterlist.h>
++#include <linux/vs_network.h>
+ #include <net/protocol.h>
+ #include <net/dst.h>
+@@ -174,6 +175,7 @@ struct sk_buff *__alloc_skb(unsigned int
+       skb->data = data;
+       skb_reset_tail_pointer(skb);
+       skb->end = skb->tail + size;
++      skb->skb_tag = nx_current_nid();
+       /* make sure we initialize shinfo sequentially */
+       shinfo = skb_shinfo(skb);
+       atomic_set(&shinfo->dataref, 1);
+@@ -443,6 +445,8 @@ struct sk_buff *skb_clone(struct sk_buff
+       C(tail);
+       C(end);
++      /* Sapan: Cloned skbs aren't owned by anyone. Let the cloner decide who it belongs to. */
++
+       atomic_inc(&(skb_shinfo(skb)->dataref));
+       skb->cloned = 1;
+@@ -492,6 +496,7 @@ static void copy_skb_header(struct sk_bu
+       new->tc_index   = old->tc_index;
+ #endif
+       skb_copy_secmark(new, old);
++      new->skb_tag = old->skb_tag;
+       atomic_set(&new->users, 1);
+       skb_shinfo(new)->gso_size = skb_shinfo(old)->gso_size;
+       skb_shinfo(new)->gso_segs = skb_shinfo(old)->gso_segs;
+diff -Nurp linux-2.6.22.10-vs2.3.0.29-pl03/net/core/sock.c linux-2.6.22.10-vs2.3.0.29-pl04/net/core/sock.c
+--- linux-2.6.22.10-vs2.3.0.29-pl03/net/core/sock.c    2007-10-29 21:23:59.000000000 -0400
++++ linux-2.6.22.10-vs2.3.0.29-pl04/net/core/sock.c    2007-11-14 14:36:36.000000000 -0500
+@@ -444,6 +444,19 @@ set_sndbuf:
+               }
+               goto set_sndbuf;
++      case SO_SETXID:
++              if (current_vx_info()) {
++                      ret = -EPERM;
++                      break;
++              }
++              if (val < 0 || val > MAX_S_CONTEXT) {
++                      ret = -EINVAL;
++                      break;
++              }
++              sk->sk_xid = val;
++              sk->sk_nid = val;
++              break;
++
+       case SO_RCVBUF:
+               /* Don't error on this BSD doesn't and if you think
+                  about it this is right. Otherwise apps have to
+@@ -573,7 +586,7 @@ set_rcvbuf:
+               char devname[IFNAMSIZ];
+               /* Sorry... */
+-              if (!capable(CAP_NET_RAW)) {
++              if (!nx_capable(CAP_NET_RAW, NXC_RAW_SOCKET)) {
+                       ret = -EPERM;
+                       break;
+               }
+diff -Nurp linux-2.6.22.10-vs2.3.0.29-pl03/net/ipv4/af_inet.c linux-2.6.22.10-vs2.3.0.29-pl04/net/ipv4/af_inet.c
+--- linux-2.6.22.10-vs2.3.0.29-pl03/net/ipv4/af_inet.c 2007-10-29 21:23:59.000000000 -0400
++++ linux-2.6.22.10-vs2.3.0.29-pl04/net/ipv4/af_inet.c 2007-11-14 16:40:54.000000000 -0500
+@@ -178,6 +178,8 @@ static int inet_autobind(struct sock *sk
+                       return -EAGAIN;
+               }
+               inet->sport = htons(inet->num);
++              sk->sk_xid = vx_current_xid();
++              sk->sk_nid = nx_current_nid();
+       }
+       release_sock(sk);
+       return 0;
+diff -Nurp linux-2.6.22.10-vs2.3.0.29-pl03/net/ipv4/icmp.c linux-2.6.22.10-vs2.3.0.29-pl04/net/ipv4/icmp.c
+--- linux-2.6.22.10-vs2.3.0.29-pl03/net/ipv4/icmp.c    2007-11-14 14:00:56.000000000 -0500
++++ linux-2.6.22.10-vs2.3.0.29-pl04/net/ipv4/icmp.c    2007-11-15 13:57:04.000000000 -0500
+@@ -709,7 +709,7 @@ static void icmp_unreach(struct sk_buff 
+       if ((raw_sk = sk_head(&raw_v4_htable[hash])) != NULL) {
+               while ((raw_sk = __raw_v4_lookup(raw_sk, protocol, iph->daddr,
+                                                iph->saddr,
+-                                               skb->dev->ifindex)) != NULL) {
++                                               skb->dev->ifindex, skb->skb_tag)) != NULL) {
+                       raw_err(raw_sk, skb, info);
+                       raw_sk = sk_next(raw_sk);
+                       iph = (struct iphdr *)skb->data;
+@@ -937,8 +937,8 @@ char sysctl_icmp_ipod_key[32+1] = { "SET
+ static void icmp_ping_of_death(struct sk_buff *skb)
+ {
+-      struct icmphdr *icmph = skb->h.icmph;
+-      struct iphdr *iph = skb->nh.iph;
++      struct icmphdr *icmph = skb_transport_header(skb);
++      struct iphdr *iph = skb_network_header(skb);
+       int doit = 0;
+ #if 0
+diff -Nurp linux-2.6.22.10-vs2.3.0.29-pl03/net/ipv4/ip_options.c linux-2.6.22.10-vs2.3.0.29-pl04/net/ipv4/ip_options.c
+--- linux-2.6.22.10-vs2.3.0.29-pl03/net/ipv4/ip_options.c      2007-07-21 18:00:25.000000000 -0400
++++ linux-2.6.22.10-vs2.3.0.29-pl04/net/ipv4/ip_options.c      2007-11-14 17:03:19.000000000 -0500
+@@ -409,7 +409,7 @@ int ip_options_compile(struct ip_options
+                                       optptr[2] += 8;
+                                       break;
+                                     default:
+-                                      if (!skb && !capable(CAP_NET_RAW)) {
++                                      if (!skb && !nx_capable(CAP_NET_RAW, NXC_RAW_SOCKET)) {
+                                               pp_ptr = optptr + 3;
+                                               goto error;
+                                       }
+@@ -445,7 +445,7 @@ int ip_options_compile(struct ip_options
+                               opt->router_alert = optptr - iph;
+                       break;
+                     case IPOPT_CIPSO:
+-                      if ((!skb && !capable(CAP_NET_RAW)) || opt->cipso) {
++                      if ((!skb && !nx_capable(CAP_NET_RAW, NXC_RAW_SOCKET)) || opt->cipso) {
+                               pp_ptr = optptr;
+                               goto error;
+                       }
+@@ -458,7 +458,7 @@ int ip_options_compile(struct ip_options
+                     case IPOPT_SEC:
+                     case IPOPT_SID:
+                     default:
+-                      if (!skb && !capable(CAP_NET_RAW)) {
++                      if (!skb && !nx_capable(CAP_NET_RAW, NXC_RAW_SOCKET)) {
+                               pp_ptr = optptr;
+                               goto error;
+                       }
+diff -Nurp linux-2.6.22.10-vs2.3.0.29-pl03/net/ipv4/netfilter/ipt_LOG.c linux-2.6.22.10-vs2.3.0.29-pl04/net/ipv4/netfilter/ipt_LOG.c
+--- linux-2.6.22.10-vs2.3.0.29-pl03/net/ipv4/netfilter/ipt_LOG.c       2007-08-11 21:54:37.000000000 -0400
++++ linux-2.6.22.10-vs2.3.0.29-pl04/net/ipv4/netfilter/ipt_LOG.c       2007-11-14 16:00:55.000000000 -0500
+@@ -49,6 +49,8 @@ static void dump_packet(const struct nf_
+       else
+               logflags = NF_LOG_MASK;
++      printk("TAG=%d ", skb->skb_tag);
++
+       ih = skb_header_pointer(skb, iphoff, sizeof(_iph), &_iph);
+       if (ih == NULL) {
+               printk("TRUNCATED");
+diff -Nurp linux-2.6.22.10-vs2.3.0.29-pl03/net/ipv4/raw.c linux-2.6.22.10-vs2.3.0.29-pl04/net/ipv4/raw.c
+--- linux-2.6.22.10-vs2.3.0.29-pl03/net/ipv4/raw.c     2007-10-29 21:23:59.000000000 -0400
++++ linux-2.6.22.10-vs2.3.0.29-pl04/net/ipv4/raw.c     2007-11-14 17:02:08.000000000 -0500
+@@ -103,7 +103,7 @@ static void raw_v4_unhash(struct sock *s
+ struct sock *__raw_v4_lookup(struct sock *sk, unsigned short num,
+                            __be32 raddr, __be32 laddr,
+-                           int dif)
++                           int dif, int tag)
+ {
+       struct hlist_node *node;
+@@ -112,6 +112,7 @@ struct sock *__raw_v4_lookup(struct sock
+               if (inet->num == num                                    &&
+                   !(inet->daddr && inet->daddr != raddr)              &&
++                  (!sk->sk_nx_info || tag == 1 || sk->sk_nid == tag)  &&
+                   v4_sock_addr_match(sk->sk_nx_info, inet, laddr)     &&
+                   !(sk->sk_bound_dev_if && sk->sk_bound_dev_if != dif))
+                       goto found; /* gotcha */
+@@ -161,7 +162,7 @@ int raw_v4_input(struct sk_buff *skb, st
+               goto out;
+       sk = __raw_v4_lookup(__sk_head(head), iph->protocol,
+                            iph->saddr, iph->daddr,
+-                           skb->dev->ifindex);
++                           skb->dev->ifindex, skb->skb_tag);
+       while (sk) {
+               delivered = 1;
+@@ -174,7 +175,7 @@ int raw_v4_input(struct sk_buff *skb, st
+               }
+               sk = __raw_v4_lookup(sk_next(sk), iph->protocol,
+                                    iph->saddr, iph->daddr,
+-                                   skb->dev->ifindex);
++                                   skb->dev->ifindex, skb->skb_tag);
+       }
+ out:
+       read_unlock(&raw_v4_lock);
+@@ -315,7 +316,7 @@ static int raw_send_hdrinc(struct sock *
+       }
+       err = -EPERM;
+-      if (!nx_check(0, VS_ADMIN) && !capable(CAP_NET_RAW) &&
++      if (!nx_check(0, VS_ADMIN) && !nx_capable(CAP_NET_RAW, NXC_RAW_SOCKET) &&
+               sk->sk_nx_info &&
+               !v4_addr_in_nx_info(sk->sk_nx_info, iph->saddr, NXA_MASK_BIND))
+               goto error_free;
+diff -Nurp linux-2.6.22.10-vs2.3.0.29-pl03/net/netfilter/Kconfig linux-2.6.22.10-vs2.3.0.29-pl04/net/netfilter/Kconfig
+--- linux-2.6.22.10-vs2.3.0.29-pl03/net/netfilter/Kconfig      2007-07-21 18:00:27.000000000 -0400
++++ linux-2.6.22.10-vs2.3.0.29-pl04/net/netfilter/Kconfig      2007-11-14 15:27:12.000000000 -0500
+@@ -389,6 +389,13 @@ config NETFILTER_XT_TARGET_TCPMSS
+         To compile it as a module, choose M here.  If unsure, say N.
++config NETFILTER_XT_TARGET_SETXID
++      tristate '"SETXID" target support'
++      depends on NETFILTER_XTABLES
++      help
++        This option adds a `SETXID' target, which allows you to alter the
++        xid of a socket.
++
+ config NETFILTER_XT_MATCH_COMMENT
+       tristate  '"comment" match support'
+       depends on NETFILTER_XTABLES
+diff -Nurp linux-2.6.22.10-vs2.3.0.29-pl03/net/netfilter/Makefile linux-2.6.22.10-vs2.3.0.29-pl04/net/netfilter/Makefile
+--- linux-2.6.22.10-vs2.3.0.29-pl03/net/netfilter/Makefile     2007-07-21 17:58:59.000000000 -0400
++++ linux-2.6.22.10-vs2.3.0.29-pl04/net/netfilter/Makefile     2007-11-14 15:25:53.000000000 -0500
+@@ -37,6 +37,7 @@ obj-$(CONFIG_NF_CONNTRACK_TFTP) += nf_co
+ obj-$(CONFIG_NETFILTER_XTABLES) += x_tables.o xt_tcpudp.o
+ # targets
++obj-$(CONFIG_NETFILTER_XT_TARGET_SETXID) += xt_SETXID.o
+ obj-$(CONFIG_NETFILTER_XT_TARGET_CLASSIFY) += xt_CLASSIFY.o
+ obj-$(CONFIG_NETFILTER_XT_TARGET_CONNMARK) += xt_CONNMARK.o
+ obj-$(CONFIG_NETFILTER_XT_TARGET_DSCP) += xt_DSCP.o
+diff -Nurp linux-2.6.22.10-vs2.3.0.29-pl03/net/netfilter/nf_conntrack_core.c linux-2.6.22.10-vs2.3.0.29-pl04/net/netfilter/nf_conntrack_core.c
+--- linux-2.6.22.10-vs2.3.0.29-pl03/net/netfilter/nf_conntrack_core.c  2007-07-21 18:00:27.000000000 -0400
++++ linux-2.6.22.10-vs2.3.0.29-pl04/net/netfilter/nf_conntrack_core.c  2007-11-14 16:39:09.000000000 -0500
+@@ -726,6 +726,8 @@ init_conntrack(const struct nf_conntrack
+       /* Overload tuple linked list to put us in unconfirmed list. */
+       list_add(&conntrack->tuplehash[IP_CT_DIR_ORIGINAL].list, &unconfirmed);
++      conntrack->xid[IP_CT_DIR_ORIGINAL] = -1;
++      conntrack->xid[IP_CT_DIR_REPLY] = -1;
+       write_unlock_bh(&nf_conntrack_lock);
+diff -Nurp linux-2.6.22.10-vs2.3.0.29-pl03/net/netfilter/xt_MARK.c linux-2.6.22.10-vs2.3.0.29-pl04/net/netfilter/xt_MARK.c
+--- linux-2.6.22.10-vs2.3.0.29-pl03/net/netfilter/xt_MARK.c    2007-07-21 17:59:00.000000000 -0400
++++ linux-2.6.22.10-vs2.3.0.29-pl04/net/netfilter/xt_MARK.c    2007-11-15 13:57:04.000000000 -0500
+@@ -5,13 +5,18 @@
+  * This program is free software; you can redistribute it and/or modify
+  * it under the terms of the GNU General Public License version 2 as
+  * published by the Free Software Foundation.
++ *
+  */
+ #include <linux/module.h>
++#include <linux/version.h>
+ #include <linux/skbuff.h>
+ #include <linux/ip.h>
+ #include <net/checksum.h>
++#include <net/route.h>
++#include <net/inet_hashtables.h>
++#include <net/netfilter/nf_conntrack.h>
+ #include <linux/netfilter/x_tables.h>
+ #include <linux/netfilter/xt_MARK.h>
+@@ -21,6 +26,48 @@ MODULE_DESCRIPTION("ip[6]tables MARK mod
+ MODULE_ALIAS("ipt_MARK");
+ MODULE_ALIAS("ip6t_MARK");
++static inline u_int16_t
++get_dst_port(struct nf_conntrack_tuple *tuple)
++{
++      switch (tuple->dst.protonum) {
++      case IPPROTO_GRE:
++              /* XXX Truncate 32-bit GRE key to 16 bits */
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,11)
++              return tuple->dst.u.gre.key;
++#else
++              return htons(ntohl(tuple->dst.u.gre.key));
++#endif  
++      case IPPROTO_ICMP:
++              /* Bind on ICMP echo ID */
++              return tuple->src.u.icmp.id;
++      case IPPROTO_TCP:
++              return tuple->dst.u.tcp.port;
++      case IPPROTO_UDP:
++              return tuple->dst.u.udp.port;
++      default:
++              return tuple->dst.u.all;
++      }
++}
++
++static inline u_int16_t
++get_src_port(struct nf_conntrack_tuple *tuple)
++{
++      switch (tuple->dst.protonum) {
++      case IPPROTO_GRE:
++              /* XXX Truncate 32-bit GRE key to 16 bits */
++              return htons(ntohl(tuple->src.u.gre.key));
++      case IPPROTO_ICMP:
++              /* Bind on ICMP echo ID */
++              return tuple->src.u.icmp.id;
++      case IPPROTO_TCP:
++              return tuple->src.u.tcp.port;
++      case IPPROTO_UDP:
++              return tuple->src.u.udp.port;
++      default:
++              return tuple->src.u.all;
++      }
++}
++
+ static unsigned int
+ target_v0(struct sk_buff **pskb,
+         const struct net_device *in,
+@@ -44,7 +91,7 @@ target_v1(struct sk_buff **pskb,
+         const void *targinfo)
+ {
+       const struct xt_mark_target_info_v1 *markinfo = targinfo;
+-      int mark = 0;
++      int mark = -1;
+       switch (markinfo->mode) {
+       case XT_MARK_SET:
+@@ -58,9 +105,52 @@ target_v1(struct sk_buff **pskb,
+       case XT_MARK_OR:
+               mark = (*pskb)->mark | markinfo->mark;
+               break;
++
++      case XT_MARK_COPYXID: {
++              enum ip_conntrack_info ctinfo;
++              struct sock *connection_sk;
++              int dif;
++
++              struct nf_conn *ct = nf_ct_get((*pskb), &ctinfo);
++              extern struct inet_hashinfo tcp_hashinfo;
++              enum ip_conntrack_dir dir;
++
++              if (!ct) 
++                      break;
++              dir = CTINFO2DIR(ctinfo);
++              u_int32_t src_ip = ct->tuplehash[dir].tuple.src.u3.ip;
++              u_int16_t src_port = get_src_port(&ct->tuplehash[dir].tuple);
++
++              u_int32_t ip;
++              u_int16_t port;
++
++              dif = ((struct rtable *)(*pskb)->dst)->rt_iif;
++              ip = ct->tuplehash[dir].tuple.dst.u3.ip;
++              port = get_dst_port(&ct->tuplehash[dir].tuple);
++
++              if ((*pskb)->sk) 
++                      connection_sk = (*pskb)->sk;
++              else {
++                      connection_sk = inet_lookup(&tcp_hashinfo, src_ip, src_port, ip, port, dif);
++              }
++
++              if (connection_sk) {
++#ifdef REQUIRESFIXFROMSAPAN
++                      connection_sk->sk_peercred.gid = connection_sk->sk_peercred.uid = ct->xid[dir];
++                      ct->xid[!dir]=connection_sk->sk_xid;
++                      /*connection_sk->sk_peercred.gid = connection_sk->sk_peercred.uid = connection_sk->sk_xid;*/
++                      if (connection_sk->sk_xid != 0) 
++                              mark = connection_sk->sk_xid;
++#endif
++                      if (connection_sk != (*pskb)->sk)
++                              sock_put(connection_sk);
++              }
++              break;
++              }
+       }
+-      (*pskb)->mark = mark;
++      if (mark != -1)
++              (*pskb)->mark = mark;
+       return XT_CONTINUE;
+ }
+@@ -92,7 +182,8 @@ checkentry_v1(const char *tablename,
+       if (markinfo->mode != XT_MARK_SET
+           && markinfo->mode != XT_MARK_AND
+-          && markinfo->mode != XT_MARK_OR) {
++          && markinfo->mode != XT_MARK_OR
++          && markinfo->mode != XT_MARK_COPYXID) {
+               printk(KERN_WARNING "MARK: unknown mode %u\n",
+                      markinfo->mode);
+               return 0;
+diff -Nurp linux-2.6.22.10-vs2.3.0.29-pl03/net/netfilter/xt_SETXID.c linux-2.6.22.10-vs2.3.0.29-pl04/net/netfilter/xt_SETXID.c
+--- linux-2.6.22.10-vs2.3.0.29-pl03/net/netfilter/xt_SETXID.c  1969-12-31 19:00:00.000000000 -0500
++++ linux-2.6.22.10-vs2.3.0.29-pl04/net/netfilter/xt_SETXID.c  2007-11-14 16:20:02.000000000 -0500
+@@ -0,0 +1,79 @@
++#include <linux/module.h>
++#include <linux/skbuff.h>
++#include <linux/ip.h>
++#include <net/checksum.h>
++#include <linux/vs_network.h>
++
++#include <linux/netfilter/x_tables.h>
++#include <linux/netfilter/xt_SETXID.h>
++
++MODULE_LICENSE("GPL");
++MODULE_AUTHOR("");
++MODULE_DESCRIPTION("");
++MODULE_ALIAS("ipt_SETXID");
++
++static unsigned int
++target_v1(struct sk_buff **pskb,
++        const struct net_device *in,
++        const struct net_device *out,
++        unsigned int hooknum,
++        const struct xt_target *target,
++        const void *targinfo)
++{
++      const struct xt_setxid_target_info_v1 *setxidinfo = targinfo;
++
++      switch (setxidinfo->mode) {
++      case XT_SET_PACKET_XID:
++               (*pskb)->skb_tag = setxidinfo->mark;
++              break;
++      }
++      return XT_CONTINUE;
++}
++
++
++static int
++checkentry_v1(const char *tablename,
++            const void *entry,
++            const struct xt_target *target,
++            void *targinfo,
++            unsigned int hook_mask)
++{
++      struct xt_setxid_target_info_v1 *setxidinfo = targinfo;
++
++      if (setxidinfo->mode != XT_SET_PACKET_XID) {
++              printk(KERN_WARNING "SETXID: unknown mode %u\n",
++                     setxidinfo->mode);
++              return 0;
++      }
++
++      return 1;
++}
++
++static struct xt_target xt_setxid_target[] = {
++      {
++              .name           = "SETXID",
++              .family         = AF_INET,
++              .revision       = 1,
++              .checkentry     = checkentry_v1,
++              .target         = target_v1,
++              .targetsize     = sizeof(struct xt_setxid_target_info_v1),
++              .table          = "mangle",
++              .me             = THIS_MODULE,
++      }
++};
++
++static int __init init(void)
++{
++      int err;
++
++      err = xt_register_targets(xt_setxid_target, ARRAY_SIZE(xt_setxid_target));
++      return err;
++}
++
++static void __exit fini(void)
++{
++      xt_unregister_targets(xt_setxid_target, ARRAY_SIZE(xt_setxid_target));
++}
++
++module_init(init);
++module_exit(fini);
+diff -Nurp linux-2.6.22.10-vs2.3.0.29-pl03/net/packet/af_packet.c linux-2.6.22.10-vs2.3.0.29-pl04/net/packet/af_packet.c
+--- linux-2.6.22.10-vs2.3.0.29-pl03/net/packet/af_packet.c     2007-07-21 18:00:27.000000000 -0400
++++ linux-2.6.22.10-vs2.3.0.29-pl04/net/packet/af_packet.c     2007-11-15 13:57:04.000000000 -0500
+@@ -78,6 +78,7 @@
+ #include <linux/poll.h>
+ #include <linux/module.h>
+ #include <linux/init.h>
++#include <linux/vs_network.h>
+ #ifdef CONFIG_INET
+ #include <net/inet_common.h>
+@@ -420,6 +421,10 @@ static inline unsigned int run_filter(st
+                                     unsigned int res)
+ {
+       struct sk_filter *filter;
++      int tag = skb->skb_tag;
++
++      if (sk->sk_nx_info && !(tag == 1 || sk->sk_nid == tag))
++              return 0;
+       rcu_read_lock_bh();
+       filter = rcu_dereference(sk->sk_filter);
+@@ -984,7 +989,7 @@ static int packet_create(struct socket *
+       __be16 proto = (__force __be16)protocol; /* weird, but documented */
+       int err;
+-      if (!capable(CAP_NET_RAW))
++      if (!nx_capable(CAP_NET_RAW, NXC_RAW_SEND))
+               return -EPERM;
+       if (sock->type != SOCK_DGRAM && sock->type != SOCK_RAW &&
+           sock->type != SOCK_PACKET)
diff --git a/linux-2.6-530-built-by-support.patch b/linux-2.6-530-built-by-support.patch
new file mode 100644 (file)
index 0000000..727419a
--- /dev/null
@@ -0,0 +1,14 @@
+diff -Nurp linux-2.6.22.10-vs2.3.0.29-pl04/scripts/mkcompile_h linux-2.6.22.10-vs2.3.0.29-pl05/scripts/mkcompile_h
+--- linux-2.6.22.10-vs2.3.0.29-pl04/scripts/mkcompile_h        2007-07-21 18:00:28.000000000 -0400
++++ linux-2.6.22.10-vs2.3.0.29-pl05/scripts/mkcompile_h        2007-11-14 17:08:09.000000000 -0500
+@@ -60,8 +60,8 @@ UTS_TRUNCATE="sed -e s/\(.\{1,$UTS_LEN\}
+   echo \#define UTS_VERSION \"`echo $UTS_VERSION | $UTS_TRUNCATE`\"
+   echo \#define LINUX_COMPILE_TIME \"`date +%T`\"
+-  echo \#define LINUX_COMPILE_BY \"`whoami`\"
+-  echo \#define LINUX_COMPILE_HOST \"`hostname | $UTS_TRUNCATE`\"
++  echo \#define LINUX_COMPILE_BY \"support\"
++  echo \#define LINUX_COMPILE_HOST \"planet-lab.org\"
+   if [ -x /bin/dnsdomainname ]; then
+     echo \#define LINUX_COMPILE_DOMAIN \"`dnsdomainname | $UTS_TRUNCATE`\"
diff --git a/linux-2.6-540-oom-kill.patch b/linux-2.6-540-oom-kill.patch
new file mode 100644 (file)
index 0000000..1efba8c
--- /dev/null
@@ -0,0 +1,135 @@
+diff -Nurp linux-2.6.22.10-vs2.3.0.29-pl05/init/Kconfig linux-2.6.22.10-vs2.3.0.29-pl06/init/Kconfig
+--- linux-2.6.22.10-vs2.3.0.29-pl05/init/Kconfig       2007-09-29 08:11:49.000000000 -0400
++++ linux-2.6.22.10-vs2.3.0.29-pl06/init/Kconfig       2007-11-14 17:09:01.000000000 -0500
+@@ -281,6 +281,23 @@ config LOG_BUF_SHIFT
+                    13 =>  8 KB
+                    12 =>  4 KB
++config OOM_PANIC
++      bool "OOM Panic"
++      default y
++      ---help---
++        This option enables panic() to be called when a system is out of
++        memory. This feature along with /proc/sys/kernel/panic allows a
++        different behavior on out-of-memory conditions when the standard
++        behavior (killing processes in an attempt to recover) does not
++        make sense.
++
++        If unsure, say N.
++
++config OOM_KILL
++      bool
++      depends on !OOM_PANIC
++      default y
++
+ config CPUSETS
+       bool "Cpuset support"
+       depends on SMP
+diff -Nurp linux-2.6.22.10-vs2.3.0.29-pl05/mm/oom_kill.c linux-2.6.22.10-vs2.3.0.29-pl06/mm/oom_kill.c
+--- linux-2.6.22.10-vs2.3.0.29-pl05/mm/oom_kill.c      2007-10-29 21:23:59.000000000 -0400
++++ linux-2.6.22.10-vs2.3.0.29-pl06/mm/oom_kill.c      2007-11-14 17:09:01.000000000 -0500
+@@ -169,6 +169,11 @@ unsigned long badness(struct task_struct
+       return points;
+ }
++#if defined(CONFIG_OOM_PANIC) && defined(CONFIG_OOM_KILLER)
++#warning Only define OOM_PANIC or OOM_KILLER; not both
++#endif
++
++#ifdef CONFIG_OOM_KILLER
+ /*
+  * Types of limitations to the nodes from which allocations may occur
+  */
+@@ -481,3 +486,37 @@ out:
+       if (!test_thread_flag(TIF_MEMDIE))
+               schedule_timeout_uninterruptible(1);
+ }
++#endif /* CONFIG_OOM_KILLER */
++
++#ifdef CONFIG_OOM_PANIC
++/**
++ * out_of_memory - panic if the system out of memory?
++ */
++void out_of_memory(struct zonelist *zonelist, gfp_t gfp_mask, int order)
++{
++      /*
++       * oom_lock protects out_of_memory()'s static variables.
++       * It's a global lock; this is not performance-critical.
++       */
++      static spinlock_t oom_lock = SPIN_LOCK_UNLOCKED;
++      static unsigned long count;
++
++      spin_lock(&oom_lock);
++
++      /*
++       * If we have gotten only a few failures,
++       * we're not really oom. 
++       */
++      if (++count >= 10) {
++              /*
++               * Ok, really out of memory. Panic.
++               */
++
++              printk("oom-killer: gfp_mask=0x%x\n", gfp_mask);
++              show_free_areas();
++
++              panic("Out Of Memory");
++      }
++      spin_unlock(&oom_lock);
++}
++#endif /*  CONFIG_OOM_PANIC */
+diff -Nurp linux-2.6.22.10-vs2.3.0.29-pl05/mm/oom_panic.c linux-2.6.22.10-vs2.3.0.29-pl06/mm/oom_panic.c
+--- linux-2.6.22.10-vs2.3.0.29-pl05/mm/oom_panic.c     1969-12-31 19:00:00.000000000 -0500
++++ linux-2.6.22.10-vs2.3.0.29-pl06/mm/oom_panic.c     2007-11-14 17:09:01.000000000 -0500
+@@ -0,0 +1,51 @@
++/* 
++ * Just panic() instead of the default behavior of selecting processes
++ * for death.
++ *
++ * Based on
++ * Modular OOM handlers for 2.6.4 (C) 2003,2004 Tvrtko A. Ursulin
++ * and
++ * linux/mm/oom_kill.c (C) 1998,2000 Rik van Riel.
++ *
++ * Mark Huang <mlhuang@cs.princeton.edu>
++ *
++ * $Id: oom_panic.c,v 1.1 2004/10/01 17:54:48 mlhuang Exp $
++ */
++
++#include <linux/mm.h>
++#include <linux/sched.h>
++#include <linux/swap.h>
++
++/**
++ * out_of_memory - is the system out of memory?
++ */
++void out_of_memory(int gfp_mask)
++{
++      /*
++       * oom_lock protects out_of_memory()'s static variables.
++       * It's a global lock; this is not performance-critical.
++       */
++      static spinlock_t oom_lock = SPIN_LOCK_UNLOCKED;
++      static unsigned long count;
++
++      spin_lock(&oom_lock);
++
++      /*
++       * If we have gotten only a few failures,
++       * we're not really oom. 
++       */
++      if (++count < 10)
++              goto out_unlock;
++
++      /*
++       * Ok, really out of memory. Panic.
++       */
++
++      printk("oom-killer: gfp_mask=0x%x\n", gfp_mask);
++      show_free_areas();
++
++      panic("Out Of Memory");
++
++out_unlock:
++      spin_unlock(&oom_lock);
++}
diff --git a/linux-2.6-550-raise-default-nfile-ulimit.patch b/linux-2.6-550-raise-default-nfile-ulimit.patch
new file mode 100644 (file)
index 0000000..554acaa
--- /dev/null
@@ -0,0 +1,12 @@
+diff -Nurp linux-2.6.22.10-vs2.3.0.29-pl06/include/linux/fs.h linux-2.6.22.10-vs2.3.0.29-pl07/include/linux/fs.h
+--- linux-2.6.22.10-vs2.3.0.29-pl06/include/linux/fs.h 2007-10-29 21:23:59.000000000 -0400
++++ linux-2.6.22.10-vs2.3.0.29-pl07/include/linux/fs.h 2007-11-15 09:56:54.000000000 -0500
+@@ -22,7 +22,7 @@
+ /* Fixed constants first: */
+ #undef NR_OPEN
+ #define NR_OPEN (1024*1024)   /* Absolute upper limit on fd num */
+-#define INR_OPEN 1024         /* Initial setting for nfile rlimits */
++#define INR_OPEN 4096         /* Initial setting for nfile rlimits */
+ #define BLOCK_SIZE_BITS 10
+ #define BLOCK_SIZE (1<<BLOCK_SIZE_BITS)
diff --git a/sources b/sources
new file mode 100644 (file)
index 0000000..bf74d56
--- /dev/null
+++ b/sources
@@ -0,0 +1,3 @@
+e9ed05031b612413f9992206eeed5862  http://ftp.kernel.org/pub/linux/kernel/v2.6/linux-2.6.22.tar.bz2
+9e31d7d04172ea4b413c089d1e53c7a2  http://ftp.kernel.org/pub/linux/kernel/v2.6/patch-2.6.22.12.bz2
+ad172ebc44d504a96b495c28c01f30f3  http://ftp.linux-vserver.org/pub/kernel/vs2.3/testing/patch-2.6.22.10-vs2.3.0.29.diff