net: ipv4: fix return value check in esp_remove_trailer
authorMa Ke <make_ruc2021@163.com>
Mon, 9 Oct 2023 01:13:37 +0000 (09:13 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 25 Oct 2023 10:03:06 +0000 (12:03 +0200)
commit55d794cef3532ce2a974c37529a9bbd4a4bc1e2f
treee7bd09f51d03070434d374cfe47baacde3af3fde
parent49b9165ead33dab3f4c48622c5512cde1468f95b
net: ipv4: fix return value check in esp_remove_trailer

commit 513f61e2193350c7a345da98559b80f61aec4fa6 upstream.

In esp_remove_trailer(), to avoid an unexpected result returned by
pskb_trim, we should check the return value of pskb_trim().

Signed-off-by: Ma Ke <make_ruc2021@163.com>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/ipv4/esp4.c