diff options
author | Ilia.Gavrilov <[email protected]> | 2023-06-23 11:23:46 +0000 |
---|---|---|
committer | Pablo Neira Ayuso <[email protected]> | 2023-06-26 17:18:48 +0200 |
commit | f188d30087480eab421cd8ca552fb15f55d57f4d (patch) | |
tree | da12d44926a8daf74d86efec791ba6cf94a2585b /lib/mpi/mpi-sub-ui.c | |
parent | f18e7122cc73d9218930156fa38f050a2e37de57 (diff) |
netfilter: nf_conntrack_sip: fix the ct_sip_parse_numerical_param() return value.
ct_sip_parse_numerical_param() returns only 0 or 1 now.
But process_register_request() and process_register_response() imply
checking for a negative value if parsing of a numerical header parameter
failed.
The invocation in nf_nat_sip() looks correct:
if (ct_sip_parse_numerical_param(...) > 0 &&
...) { ... }
Make the return value of the function ct_sip_parse_numerical_param()
a tristate to fix all the cases
a) return 1 if value is found; *val is set
b) return 0 if value is not found; *val is unchanged
c) return -1 on error; *val is undefined
Found by InfoTeCS on behalf of Linux Verification Center
(linuxtesting.org) with SVACE.
Fixes: 0f32a40fc91a ("[NETFILTER]: nf_conntrack_sip: create signalling expectations")
Signed-off-by: Ilia.Gavrilov <[email protected]>
Reviewed-by: Simon Horman <[email protected]>
Reviewed-by: Florian Westphal <[email protected]>
Signed-off-by: Pablo Neira Ayuso <[email protected]>
Diffstat (limited to 'lib/mpi/mpi-sub-ui.c')
0 files changed, 0 insertions, 0 deletions