]> git.baikalelectronics.ru Git - kernel.git/commit
xfrm: make user policy API complete
authorNicolas Dichtel <nicolas.dichtel@6wind.com>
Tue, 14 Sep 2021 14:46:33 +0000 (16:46 +0200)
committerSteffen Klassert <steffen.klassert@secunet.com>
Wed, 15 Sep 2021 11:41:36 +0000 (13:41 +0200)
commit0127e8bbf930ebf31ef7f7ca0b8a3315a81babf9
tree2eb79880f5771da0fd0375be55743750ff75e05c
parent89eb7c9e30bb6affb91ac651a7627d217c0076d1
xfrm: make user policy API complete

>From a userland POV, this API was based on some magic values:
 - dirmask and action were bitfields but meaning of bits
   (XFRM_POL_DEFAULT_*) are not exported;
 - action is confusing, if a bit is set, does it mean drop or accept?

Let's try to simplify this uapi by using explicit field and macros.

Fixes: 0ad336bd5de0 ("xfrm: Add possibility to set the default to block if we have no policy")
Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
include/uapi/linux/xfrm.h
net/xfrm/xfrm_user.c