18 Oct, 2007
40 commits
-
For IPv4 we were using the bottom route's peer instead of the top one.
This is wrong because the peer is only used by TCP to keep track of
information about the TCP destination address which certainly does not
live in the bottom route.This patch fixes that which allows us to get rid of the family check
since the bottom route could be IPv6 while the top one must always
be IPv4.I've also changed the other fields which are IPv4-specific to get the
info from the top route instead of potentially bogus data from the
bottom route.Signed-off-by: Herbert Xu
Signed-off-by: David S. Miller -
It is convenient to have a pointer from xfrm_state to address-specific
functions such as the output function for a family. Currently the
address-specific policy code calls out to the xfrm state code to get
those pointers when we could get it in an easier way via the state
itself.This patch adds an xfrm_state_afinfo to xfrm_mode (since they're
address-specific) and changes the policy code to use it. I've also
added an owner field to do reference counting on the module providing
the afinfo even though it isn't strictly necessary today since IPv6
can't be unloaded yet.Signed-off-by: Herbert Xu
Signed-off-by: David S. Miller -
Currently BEET mode does not reinject the packet back into the stack
like tunnel mode does. Since BEET should behave just like tunnel mode
this is incorrect.This patch fixes this by introducing a flags field to xfrm_mode that
tells the IPsec code whether it should terminate and reinject the packet
back into the stack.It then sets the flag for BEET and tunnel mode.
I've also added a number of missing BEET checks elsewhere where we check
whether a given mode is a tunnel or not.Signed-off-by: Herbert Xu
Signed-off-by: David S. Miller -
The type and mode maps are only used by SAs, not policies. So it makes
sense to move them from xfrm_policy.c into xfrm_state.c. This also allows
us to mark xfrm_get_type/xfrm_put_type/xfrm_get_mode/xfrm_put_mode as
static.The only other change I've made in the move is to get rid of the casts
on the request_module call for types. They're unnecessary because C
will promote them to ints anyway.Signed-off-by: Herbert Xu
Signed-off-by: David S. Miller -
Currently xfrm_parse_spi requires there to be 16 bytes for AH and ESP.
In contrived cases there may not actually be 16 bytes there since the
respective header sizes are less than that (8 and 12 currently).This patch changes the test to use the actual header length instead of 16.
Signed-off-by: Herbert Xu
Signed-off-by: David S. Miller -
Not every transform needs to zap ip_summed. For example, a pure tunnel
mode encapsulation does not affect the hardware checksum at all. In fact,
every algorithm (that needs this) other than AH6 already does its own
ip_summed zapping.This patch moves the zapping into AH6 which is in line with what IPv4 does.
Possible future optimisation: Checksum the data as we copy them in IPComp.
Signed-off-by: Herbert Xu
Signed-off-by: David S. Miller -
Currently xfrm6_rcv_spi gets the nexthdr value itself from the packet.
This means that we need to fix up the value in case we have a 4-on-6
tunnel. Moving this logic into the caller simplifies things and allows
us to merge the code with IPv4.Signed-off-by: Herbert Xu
Signed-off-by: David S. Miller -
This patch moves the tunnel parsing for IPv4 out of xfrm4_input and into
xfrm4_tunnel. This change is in line with what IPv6 does and will allow
us to merge the two input functions.Signed-off-by: Herbert Xu
Signed-off-by: David S. Miller -
I noticed that my recent patch broke 6-on-4 pure IPsec tunnels (the ones
that are only used for incompressible IPsec packets). Subsequent reviews
show that I broke 6-on-6 pure tunnels more than three years ago and nobody
ever noticed. I suppose every must be testing 6-on-6 IPComp with large
pings which are very compressible :)This patch fixes both cases.
Signed-off-by: Herbert Xu
Signed-off-by: David S. Miller -
This functions is never called with NULL or not setup argument,
so the checks inside are redundant.Also, the return value is always -ENOMEM, so no need in
additional variable for this.Signed-off-by: Pavel Emelyanov
Signed-off-by: David S. Miller -
This call is essentially void.
Signed-off-by: Pavel Emelyanov
Signed-off-by: David S. Miller -
The proposed fix is to delay the reference counter decrement
until the quiescent state pass. This will give sk_clone() a
chance to get the reference on the cloned filter.Regular sk_filter_uncharge can happen from the sk_free() only
and there's no need in delaying the put - the socket is dead
anyway and is to be release itself.Signed-off-by: Pavel Emelyanov
Signed-off-by: David S. Miller -
The sk_filter_uncharge is called for error handling and
for releasing the former filter, but this will have to
be done in a bit different manner, so cleanup the error
path a bit.Signed-off-by: Pavel Emelyanov
Signed-off-by: David S. Miller -
This is done merely as a preparation for the fix.
The sk_filter_uncharge() unaccounts the filter memory and calls
the sk_filter_release(), which in turn decrements the refcount
anf frees the filter.The latter function will be required separately.
Signed-off-by: Pavel Emelyanov
Signed-off-by: David S. Miller -
Filter is attached in a separate function, so do the
same for filter detaching.This also removes one variable sock_setsockopt().
Signed-off-by: Pavel Emelyanov
Signed-off-by: David S. Miller -
The previous IW_SCAN_THIS_ESSID patch left a hole allowing scan
requests on interfaces in inappropriate modes.Signed-off-by: John W. Linville
Signed-off-by: David S. Miller -
Since we now allocate the queues in inet_fragment.c, we
can safely free it in the same place. The ->destructor
callback thus becomes optional for inet_frags.Signed-off-by: Pavel Emelyanov
Signed-off-by: David S. Miller -
Since this callback is used to check for conflicts in
hashtable when inserting a newly created frag queue, we can
do the same by checking for matching the queue with the
argument, used to create one.Signed-off-by: Pavel Emelyanov
Signed-off-by: David S. Miller -
Here we need another callback ->match to check whether the
entry found in hash matches the key passed. The key used
is the same as the creation argument for inet_frag_create.Yet again, this ->match is the same for netfilter and ipv6.
Running a frew steps forward - this callback will later
replace the ->equal one.Since the inet_frag_find() uses the already consolidated
inet_frag_create() remove the xxx_frag_create from protocol
codes.Signed-off-by: Pavel Emelyanov
Signed-off-by: David S. Miller -
This one uses the xxx_frag_intern() and xxx_frag_alloc()
routines, which are already consolidated, so remove them
from protocol code (as promised).The ->constructor callback is used to init the rest of
the frag queue and it is the same for netfilter and ipv6.Signed-off-by: Pavel Emelyanov
Signed-off-by: David S. Miller -
Just perform the kzalloc() allocation and setup common
fields in the inet_frag_queue(). Then return the result
to the caller to initialize the rest.The inet_frag_alloc() may return NULL, so check the
return value before doing the container_of(). This looks
ugly, but the xxx_frag_alloc() will be removed soon.The xxx_expire() timer callbacks are patches,
because the argument is now the inet_frag_queue, not
the protocol specific queue.Signed-off-by: Pavel Emelyanov
Signed-off-by: David S. Miller -
This routine checks for the existence of a given entry
in the hash table and inserts the new one if needed.The ->equal callback is used to compare two frag_queue-s
together, but this one is temporary and will be removed
later. The netfilter code and the ipv6 one use the same
routine to compare frags.The inet_frag_intern() always returns non-NULL pointer,
so convert the inet_frag_queue into protocol specific
one (with the container_of) without any checks.Signed-off-by: Pavel Emelyanov
Signed-off-by: David S. Miller -
Since the hash value is already calculated in xxx_find, we can
simply use it later. This is already done in netfilter code,
so make the same in ipv4 and ipv6.Signed-off-by: Pavel Emelyanov
Signed-off-by: David S. Miller -
Recent header_ops change would break the following dead
code in br2684. Maintaining conditonal code in mainline is wrong."Do, or do not. There is no 'try.'"
Signed-off-by: Stephen Hemminger
Signed-off-by: David S. Miller -
UML's two non-ethernet drivers need some header_ops conversion.
Signed-off-by: Jeff Dike
Signed-off-by: Andrew Morton
Signed-off-by: David S. Miller -
From: Ryan Reading
Every IrCOMM socket is registered with the discovery subsystem, so we don't
need to loop over all of them for every discovery event. We just need to
do it for the registered IrCOMM socket.Signed-off-by: Samuel Ortiz
Signed-off-by: Andrew Morton
Signed-off-by: David S. Miller -
Do not define the sysctl_dccp_sync_ratelimit sysctl variable in the
CONFIG_SYSCTL dependent sysctl.c module - move it to input.c instead.This fixes the following build bug:
net/built-in.o: In function `dccp_check_seqno':
input.c:(.text+0xbd859): undefined reference to `sysctl_dccp_sync_ratelimit'
distcc[29953] ERROR: compile (null) on localhost failed
make: *** [vmlinux] Error 1Found via 'make randconfig' build testing.
Signed-off-by: Ingo Molnar
Acked-by: Ian McDonald
Signed-off-by: Arnaldo Carvalho de Melo
Signed-off-by: Andrew Morton
Signed-off-by: David S. Miller -
The icmpv6msg mib statistics is not freed.
This is almost not critical for current kernel, since ipv6
module is unloadable, but this can happen on load error and
will happen every time we stop the network namespace (when
we have one, of course).Signed-off-by: Pavel Emelyanov
Acked-by: David L Stevens
Signed-off-by: David S. Miller -
Signed-off-by: Michael Chan
Signed-off-by: David S. Miller -
The bug is in the code in bnx2_set_power_state() that assumes copper
devices when setting up WoL. This is no longer true after adding WoL
support for Serdes devices.Signed-off-by: Michael Chan
Signed-off-by: David S. Miller -
This firmware update fixes a problem running with IPMI management
firmware.Signed-off-by: Michael Chan
Signed-off-by: David S. Miller -
* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6:
[IA64] fix non-numa build -
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ericvh/v9fs:
9p: remove sysctl
9p: fix bad kconfig cross-dependency
9p: soften invalidation in loose_mode
9p: attach-per-user
9p: rename uid and gid parameters
9p: define session flags
9p: Make transports dynamic -
arch/ia64/kernel/machine_kexec.c: In function `arch_crash_save_vmcoreinfo':
arch/ia64/kernel/machine_kexec.c:131: error: `pgdat_list' undeclared (first use in this function)
arch/ia64/kernel/machine_kexec.c:131: error: (Each undeclared identifier is reported only once
arch/ia64/kernel/machine_kexec.c:131: error: for each function it appears in.)
arch/ia64/kernel/machine_kexec.c:134: error: `node_memblk' undeclared (first use in this function)
arch/ia64/kernel/machine_kexec.c:135: error: `NR_NODE_MEMBLKS' undeclared (first use in this function)
arch/ia64/kernel/machine_kexec.c:136: error: invalid application of `sizeof' to incomplete type `node_memblk_s'
arch/ia64/kernel/machine_kexec.c:137: error: dereferencing pointer to incomplete type
arch/ia64/kernel/machine_kexec.c:138: error: dereferencing pointer to incomplete type
make[1]: *** [arch/ia64/kernel/machine_kexec.o] Error 1Signed-off-by: Andrew Morton
Signed-off-by: Tony Luck -
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/drzeus/mmc:
net: libertas sdio driver
mmc: at91_mci: cleanup: use MCI_ERRORS
mmc: possible leak in mmc_read_ext_csd -
Add driver for Marvell's Libertas 8385 and 8686 wifi chips.
Signed-off-by: Pierre Ossman
Acked-by: Dan Williams -
* ssh://master.kernel.org/pub/scm/linux/kernel/git/tglx/linux-2.6-x86: (114 commits)
x86: delete vsyscall files during make clean
kbuild: fix typo SRCARCH in find_sources
x86: fix kernel rebuild due to vsyscall fallout
.gitignore update for x86 arch
x86: unify include/asm/debugreg_32/64.h
x86: unify include/asm/unwind_32/64.h
x86: unify include/asm/types_32/64.h
x86: unify include/asm/tlb_32/64.h
x86: unify include/asm/siginfo_32/64.h
x86: unify include/asm/bug_32/64.h
x86: unify include/asm/mman_32/64.h
x86: unify include/asm/agp_32/64.h
x86: unify include/asm/kdebug_32/64.h
x86: unify include/asm/ioctls_32/64.h
x86: unify include/asm/floppy_32/64.h
x86: apply missing DMA/OOM prevention to floppy_32.h
x86: unify include/asm/cache_32/64.h
x86: unify include/asm/cache_32/64.h
x86: unify include/asm/dmi_32/64.h
x86: unify include/asm/delay_32/64.h
... -
make clean failed to delete a few files in
x86/kernel. This is because kbuild does not
see the correct/full kernel/Makefile.As a workaround until the Makefiles are merged specify
the files to be deleted in the common Makefile.Reported by Mike Galbraith
Signed-off-by: Sam Ravnborg
Cc: Mike Galbraith
Signed-off-by: Thomas Gleixner -
otherwise get the two copy file list in SRCARCH
for cscope:
C symbol: start_kernelFile Function Line
0 proto.h 11 extern void start_kernel(void );
1 start_kernel.h 10 extern asmlinkage void __init start_kernel(void );
2 head32.c i386_start_kernel 37 start_kernel();
3 head32.c i386_start_kernel 37 start_kernel();
4 head64.c x86_64_start_kernel 85 start_kernel();
5 head64.c x86_64_start_kernel 85 start_kernel();
6 head_32.S options 199 cmpb $0,%cl #the first CPU calls start_kernel
7 head_32.S options 199 cmpb $0,%cl #the first CPU calls start_kernel
8 enlighten.c xen_start_kernel 1145 start_kernel();
9 enlighten.c xen_start_kernel 1145 start_kernel();
a lguest.c lguest_init 1095 start_kernel();
b main.c start_kernel 513 asmlinkage void __init start_kernel(void )after the patch:
C symbol: start_kernelFile Function Line
0 proto.h 11 extern void start_kernel(void );
1 start_kernel.h 10 extern asmlinkage void __init start_kernel(void );
2 head32.c i386_start_kernel 37 start_kernel();
3 head64.c x86_64_start_kernel 85 start_kernel();
4 head_32.S options 199 cmpb $0,%cl #the first CPU calls start_kernel
5 enlighten.c xen_start_kernel 1145 start_kernel();
6 lguest.c lguest_init 1095 start_kernel();
7 main.c start_kernel 513 asmlinkage void __init start_kernel(void )Signed-off-by: Yinghai Lu
Signed-off-by: Thomas Gleixner