aboutsummaryrefslogtreecommitdiff
path: root/net/xfrm/xfrm_state.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-03-12 18:12:42 -0700
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-03-12 18:12:42 -0700
commit27d30b0f4e0c8e63f48ef400a64fc073b71bfe59 (patch)
tree55440b5ab26f8d8f0ad6702f69fd29202239785d /net/xfrm/xfrm_state.c
parent2cb8a57b9851805883dfe92cf5d88a726134a384 (diff)
parent75e252d981c0e80c14ce90df246e9b1300474c4f (diff)
Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6: [XFRM]: Fix missing protocol comparison of larval SAs. [WANROUTER]: Delete superfluous source file "net/wanrouter/af_wanpipe.c". [IPV4]: Fix warning in ip_mc_rejoin_group. [ROSE]: Socket locking is a great invention. [ROSE]: Remove ourselves from waitqueue when receiving a signal [NetLabel]: parse the CIPSO ranged tag on incoming packets
Diffstat (limited to 'net/xfrm/xfrm_state.c')
-rw-r--r--net/xfrm/xfrm_state.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/net/xfrm/xfrm_state.c b/net/xfrm/xfrm_state.c
index a35f9e4ede2..5c5f6dcab97 100644
--- a/net/xfrm/xfrm_state.c
+++ b/net/xfrm/xfrm_state.c
@@ -704,7 +704,8 @@ static struct xfrm_state *__find_acq_core(unsigned short family, u8 mode, u32 re
x->props.mode != mode ||
x->props.family != family ||
x->km.state != XFRM_STATE_ACQ ||
- x->id.spi != 0)
+ x->id.spi != 0 ||
+ x->id.proto != proto)
continue;
switch (family) {
@@ -801,7 +802,8 @@ int xfrm_state_add(struct xfrm_state *x)
if (use_spi && x->km.seq) {
x1 = __xfrm_find_acq_byseq(x->km.seq);
- if (x1 && xfrm_addr_cmp(&x1->id.daddr, &x->id.daddr, family)) {
+ if (x1 && ((x1->id.proto != x->id.proto) ||
+ xfrm_addr_cmp(&x1->id.daddr, &x->id.daddr, family))) {
xfrm_state_put(x1);
x1 = NULL;
}