]> git.karo-electronics.de Git - karo-tx-linux.git/commit
Fix extraneous IPSEC larval SA creation
authorJoy Latten <latten@austin.ibm.com>
Sat, 17 Mar 2007 01:27:51 +0000 (18:27 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 23 Mar 2007 19:49:24 +0000 (12:49 -0700)
commit380974c0843a390d460446f79c5dea3b56046e66
treed41cf7b6f40b809562b13d5dd056f5dc9f19a8e5
parent81b88f0a73ee3d7afa42fb44179067bf865001bc
Fix extraneous IPSEC larval SA creation

[XFRM]: Fix missing protocol comparison of larval SAs.

I noticed that in xfrm_state_add we look for the larval SA in a few
places without checking for protocol match. So when using both
AH and ESP, whichever one gets added first, deletes the larval SA.
It seems AH always gets added first and ESP is always the larval
SA's protocol since the xfrm->tmpl has it first. Thus causing the
additional km_query()

Adding the check eliminates accidental double SA creation.

Signed-off-by: Joy Latten <latten@austin.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
net/xfrm/xfrm_state.c