linux_dsm_epyc7002/include
Xin Long 4f47e8ab6a xfrm: policy: match with both mark and mask on user interfaces
In commit ed17b8d377 ("xfrm: fix a warning in xfrm_policy_insert_list"),
it would take 'priority' to make a policy unique, and allow duplicated
policies with different 'priority' to be added, which is not expected
by userland, as Tobias reported in strongswan.

To fix this duplicated policies issue, and also fix the issue in
commit ed17b8d377 ("xfrm: fix a warning in xfrm_policy_insert_list"),
when doing add/del/get/update on user interfaces, this patch is to change
to look up a policy with both mark and mask by doing:

  mark.v == pol->mark.v && mark.m == pol->mark.m

and leave the check:

  (mark & pol->mark.m) == pol->mark.v

for tx/rx path only.

As the userland expects an exact mark and mask match to manage policies.

v1->v2:
  - make xfrm_policy_mark_match inline and fix the changelog as
    Tobias suggested.

Fixes: 295fae5688 ("xfrm: Allow user space manipulation of SPD mark")
Fixes: ed17b8d377 ("xfrm: fix a warning in xfrm_policy_insert_list")
Reported-by: Tobias Brunner <tobias@strongswan.org>
Tested-by: Tobias Brunner <tobias@strongswan.org>
Signed-off-by: Xin Long <lucien.xin@gmail.com>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
2020-06-24 09:13:13 +02:00
..
acpi
asm-generic
clocksource
crypto
drm drm/edid: Replace zero-length array with flexible-array 2020-06-15 23:08:31 -05:00
dt-bindings
keys RxRPC: Replace zero-length array with flexible-array 2020-06-15 23:08:32 -05:00
kunit
kvm
linux net: qed: fix left elements count calculation 2020-06-23 15:01:16 -07:00
math-emu
media
misc
net xfrm: policy: match with both mark and mask on user interfaces 2020-06-24 09:13:13 +02:00
pcmcia
ras
rdma
scsi
soc
sound
target
trace rxrpc: Fix trace string 2020-06-17 22:51:01 +01:00
uapi bridge: uapi: mrp: Fix MRP_PORT_ROLE 2020-06-23 14:38:05 -07:00
vdso
video
xen