xfrm: Try to honor policy index if it's supplied by user
authorFan Du <fan.du@windriver.com>
Thu, 7 Nov 2013 09:47:48 +0000 (17:47 +0800)
committerSteffen Klassert <steffen.klassert@secunet.com>
Fri, 6 Dec 2013 05:45:05 +0000 (06:45 +0100)
commite682adf021be796940be6cc10c07be7f7398c220
tree5dbb9c9ddef2e08945d3bcd73d391b0181bfc9eb
parentd70f2cf520cf8c86c6b467fc5dcea524ec51dc2f
xfrm: Try to honor policy index if it's supplied by user

xfrm code always searches for unused policy index for
newly created policy regardless whether or not user
space policy index hint supplied.

This patch enables such feature so that using
"ip xfrm ... index=xxx" can be used by user to set
specific policy index.

Currently this beahvior is broken, so this patch make
it happen as expected.

Signed-off-by: Fan Du <fan.du@windriver.com>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
net/xfrm/xfrm_policy.c
net/xfrm/xfrm_user.c