]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
xfrm: interface with if_id 0 should return error
authorAntony Antony <antony.antony@secunet.com>
Sun, 12 Dec 2021 10:34:30 +0000 (11:34 +0100)
committerPaolo Pisati <paolo.pisati@canonical.com>
Fri, 28 Jan 2022 09:59:36 +0000 (10:59 +0100)
commita05fa0ac0b8f5f9d6064ec3c930eed45f8389c68
tree02ee0ee12fadc2d742dd047c9cd6a0e87d4e9c8b
parentbf7b93f49c6eee1fbf1aae382c29d1e7b672f3ee
xfrm: interface with if_id 0 should return error

BugLink: https://bugs.launchpad.net/bugs/1959376
[ Upstream commit 8dce43919566f06e865f7e8949f5c10d8c2493f5 ]

xfrm interface if_id = 0 would cause xfrm policy lookup errors since
Commit 9f8550e4bd9d.

Now explicitly fail to create an xfrm interface when if_id = 0

With this commit:
 ip link add ipsec0  type xfrm dev lo  if_id 0
 Error: if_id must be non zero.

v1->v2 change:
 - add Fixes: tag

Fixes: 9f8550e4bd9d ("xfrm: fix disable_xfrm sysctl when used on xfrm interfaces")
Signed-off-by: Antony Antony <antony.antony@secunet.com>
Reviewed-by: Eyal Birger <eyal.birger@gmail.com>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
net/xfrm/xfrm_interface.c