]> asedeno.scripts.mit.edu Git - linux.git/commit
xfrm: Return detailed errors from xfrmi_newlink
authorBenedict Wong <benedictwong@google.com>
Wed, 25 Jul 2018 20:45:29 +0000 (13:45 -0700)
committerSteffen Klassert <steffen.klassert@secunet.com>
Thu, 26 Jul 2018 05:17:26 +0000 (07:17 +0200)
commit44e2b838c24d883dae8496dc7b6ddac7956ba53c
tree7ce16ee0b9d72799f360d2269075784c1f1cbc50
parent934ffce1343f22ed5e2d0bd6da4440f4848074de
xfrm: Return detailed errors from xfrmi_newlink

Currently all failure modes of xfrm interface creation return EEXIST.
This change improves the granularity of errnos provided by also
returning ENODEV or EINVAL if failures happen in looking up the
underlying interface, or a required parameter is not provided.

This change has been tested against the Android Kernel Networking Tests,
with additional xfrmi_newlink tests here:

https://android-review.googlesource.com/c/kernel/tests/+/715755

Signed-off-by: Benedict Wong <benedictwong@google.com>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
net/xfrm/xfrm_interface.c