0
0
mirror of https://github.com/OpenVPN/openvpn3.git synced 2024-09-19 19:52:15 +02:00

unit-test: fix sitnl systematic failure

It was noted that the SITNL unit test is always failing for no clear
reason.

It turned out that commit 22ba196429
("SITNL: revert change of sitnl_send return type, return int"),
that was supposed to be a simple revert of
ae663c573a ("Using new numeric
conversion tools") is actually converting two "return ret" into
return -1 and return -EINVAL accordingly.

This accidental change results in two functions always returning
an error despite terminating succesfully.

This behaviour was obviously fooling the unitest which failed in result.

Fix both functions by properly returning "ret" as it was originally.

Signed-off-by: Antonio Quartulli <antonio@openvpn.net>
This commit is contained in:
Antonio Quartulli 2024-03-08 01:57:25 +01:00 committed by David Sommerseth
parent 8c007de79d
commit 9eeeb38c45
No known key found for this signature in database
GPG Key ID: 86CF944C9671FDF2

View File

@ -823,7 +823,7 @@ class SITNL
/* for SITNL_ADDATTR */
err:
return -EINVAL;
return ret;
}
static int
@ -933,7 +933,7 @@ class SITNL
/* for SITNL_ADDATTR */
err:
return -1;
return ret;
}
static int