]> git.baikalelectronics.ru Git - kernel.git/commit
[XFRM]: Fix missing protocol comparison of larval SAs.
authorJoy Latten <latten@austin.ibm.com>
Tue, 13 Mar 2007 00:14:07 +0000 (17:14 -0700)
committerDavid S. Miller <davem@davemloft.net>
Tue, 13 Mar 2007 00:14:07 +0000 (17:14 -0700)
commitd0bfbfa47e37980a7479f12fad6be94333bf0c15
tree668f2df92fb85e17574a1fbdf34062539eff69d7
parent9febf347ee4e6974e8380ff70f7dbcd9465c9a7c
[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>
net/xfrm/xfrm_state.c