]> git.baikalelectronics.ru Git - kernel.git/commit
xfrm: Fix xfrm_state_find() wrt. wildcard source address.
authorDavid S. Miller <davem@davemloft.net>
Fri, 13 Mar 2009 21:22:40 +0000 (14:22 -0700)
committerDavid S. Miller <davem@davemloft.net>
Fri, 13 Mar 2009 21:22:40 +0000 (14:22 -0700)
commita7ab9d082df06eace9d56f05ffdb71aa3560b665
tree1aa7a5ff6de043d6b87b023835f0494570369f10
parentde8a0f975a0afd66e684b73f83a47bcffed0a531
xfrm: Fix xfrm_state_find() wrt. wildcard source address.

The change to make xfrm_state objects hash on source address
broke the case where such source addresses are wildcarded.

Fix this by doing a two phase lookup, first with fully specified
source address, next using saddr wildcarded.

Reported-by: Nicolas Dichtel <nicolas.dichtel@dev.6wind.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/xfrm/xfrm_state.c