aboutsummaryrefslogtreecommitdiff
path: root/include/linux/initramfs.h
diff options
context:
space:
mode:
authorLorenzo Colitti <lorenzo@google.com>2017-11-20 19:26:02 +0900
committerMoyster <oysterized@gmail.com>2017-12-05 16:36:24 +0100
commit701497f022711f9c63fd8568362774554b34e4ed (patch)
treec11a7b10eb098b4098b02c3f0138122db84c310c /include/linux/initramfs.h
parent4b3b3341fdb4cbf2c32a4ca426fcdbccb395d5be (diff)
UPSTREAM: net: xfrm: allow clearing socket xfrm policies.
Currently it is possible to add or update socket policies, but not clear them. Therefore, once a socket policy has been applied, the socket cannot be used for unencrypted traffic. This patch allows (privileged) users to clear socket policies by passing in a NULL pointer and zero length argument to the {IP,IPV6}_{IPSEC,XFRM}_POLICY setsockopts. This results in both the incoming and outgoing policies being cleared. The simple approach taken in this patch cannot clear socket policies in only one direction. If desired this could be added in the future, for example by continuing to pass in a length of zero (which currently is guaranteed to return EMSGSIZE) and making the policy be a pointer to an integer that contains one of the XFRM_POLICY_{IN,OUT} enum values. An alternative would have been to interpret the length as a signed integer and use XFRM_POLICY_IN (i.e., 0) to clear the input policy and -XFRM_POLICY_OUT (i.e., -1) to clear the output policy. Bug: 65857891 Change-Id: Ib8fb501a494caa027ce9f9cfec315f5936d3913b Tested: https://android-review.googlesource.com/539816 Signed-off-by: Lorenzo Colitti <lorenzo@google.com> Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Diffstat (limited to 'include/linux/initramfs.h')
0 files changed, 0 insertions, 0 deletions