xfrm: fix the if_id check in changelink
authorAntony Antony <antony.antony@secunet.com>
Tue, 1 Feb 2022 06:51:57 +0000 (07:51 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 8 Mar 2022 18:12:44 +0000 (19:12 +0100)
commitce0d6bf33c351e82f30d810da8a1e192b94faa03
tree09b08c5dcaf2594e5d5205242575fcad1e29f2dc
parent00c74b587197b0c503a8b1057a464ad13462444f
xfrm: fix the if_id check in changelink

commit 6d0d95a1c2b07270870e7be16575c513c29af3f1 upstream.

if_id will be always 0, because it was not yet initialized.

Fixes: 8dce43919566 ("xfrm: interface with if_id 0 should return error")
Reported-by: Pavel Machek <pavel@denx.de>
Signed-off-by: Antony Antony <antony.antony@secunet.com>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/xfrm/xfrm_interface.c