]> git.baikalelectronics.ru Git - kernel.git/commit
xfrm: check bundle policy existance before dereferencing it
authorTimo Teräs <timo.teras@iki.fi>
Thu, 24 Jun 2010 21:35:00 +0000 (14:35 -0700)
committerDavid S. Miller <davem@davemloft.net>
Thu, 24 Jun 2010 21:35:00 +0000 (14:35 -0700)
commit63bae891d5b956c296d2a602b6e3ae8a09cf8eaa
tree6cec9bc88430cf30f8409b8b607d2b6a6d2fd118
parent73077ea15c9db60329cc66a775674e691f67624e
xfrm: check bundle policy existance before dereferencing it

Fix the bundle validation code to not assume having a valid policy.
When we have multiple transformations for a xfrm policy, the bundle
instance will be a chain of bundles with only the first one having
the policy reference. When policy_genid is bumped it will expire the
first bundle in the chain which is equivalent of expiring the whole
chain.

Reported-bisected-and-tested-by: Justin P. Mattock <justinmattock@gmail.com>
Signed-off-by: Timo Teräs <timo.teras@iki.fi>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/xfrm/xfrm_policy.c