linux-stable/net/xfrm
Antony Antony 68ac0f3810 xfrm: state and policy should fail if XFRMA_IF_ID 0
xfrm ineterface does not allow xfrm if_id = 0
fail to create or update xfrm state and policy.

With this commit:
 ip xfrm policy add src 192.0.2.1 dst 192.0.2.2 dir out if_id 0
 RTNETLINK answers: Invalid argument

 ip xfrm state add src 192.0.2.1 dst 192.0.2.2 proto esp spi 1 \
            reqid 1 mode tunnel aead 'rfc4106(gcm(aes))' \
            0x1111111111111111111111111111111111111111 96 if_id 0
 RTNETLINK answers: Invalid argument

v1->v2 change:
 - add Fixes: tag

Fixes: 9f8550e4bd ("xfrm: fix disable_xfrm sysctl when used on xfrm interfaces")
Signed-off-by: Antony Antony <antony.antony@secunet.com>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
2021-12-17 07:17:35 +01:00
..
espintcp.c espintcp: restore IP CB before handing the packet to xfrm 2020-08-17 15:58:04 +02:00
Kconfig xfrm/compat: Add 32=>64-bit messages translator 2020-09-24 08:53:03 +02:00
Makefile xfrm: Provide API to register translator module 2020-09-24 08:53:03 +02:00
xfrm_algo.c crypto: skcipher - remove the "blkcipher" algorithm type 2019-11-01 13:38:32 +08:00
xfrm_compat.c net/xfrm/compat: Copy xfrm_spdattr_type_t atributes 2021-07-21 09:53:25 +02:00
xfrm_device.c xfrm: Fix xfrm offload fallback fail case 2021-06-22 09:08:15 +02:00
xfrm_hash.c
xfrm_hash.h xfrm: add state hashtable keyed by seq 2021-05-14 13:52:01 +02:00
xfrm_inout.h xfrm: move xfrm4_extract_header to common helper 2020-05-06 09:40:08 +02:00
xfrm_input.c xfrm: Remove redundant fields and related parentheses 2021-10-28 07:56:02 +02:00
xfrm_interface.c xfrm: interface with if_id 0 should return error 2021-12-17 07:17:13 +01:00
xfrm_ipcomp.c net: xfrm: Fix end of loop tests for list_for_each_entry 2021-07-26 12:26:28 +02:00
xfrm_output.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2021-06-29 15:45:27 -07:00
xfrm_policy.c xfrm: fix policy lookup for ipv6 gre packets 2021-11-23 10:12:21 +01:00
xfrm_proc.c
xfrm_replay.c xfrm: replay: remove last replay indirection 2021-06-21 09:55:06 +02:00
xfrm_state.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2021-06-29 15:45:27 -07:00
xfrm_sysctl.c
xfrm_user.c xfrm: state and policy should fail if XFRMA_IF_ID 0 2021-12-17 07:17:35 +01:00