Skip to content

Commit

Permalink
sctp: fix return value check in __sctp_rcv_asconf_lookup
Browse files Browse the repository at this point in the history
As Ben Hutchings noticed, this check should have been inverted: the call
returns true in case of success.

Reported-by: Ben Hutchings <ben@decadent.org.uk>
Fixes: 0c5dc07 ("sctp: validate from_addr_param return")
Signed-off-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Reviewed-by: Xin Long <lucien.xin@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
marceloleitner authored and davem330 committed Jul 28, 2021
1 parent 46573e3 commit 557fb58
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/sctp/input.c
Original file line number Diff line number Diff line change
Expand Up @@ -1203,7 +1203,7 @@ static struct sctp_association *__sctp_rcv_asconf_lookup(
if (unlikely(!af))
return NULL;

if (af->from_addr_param(&paddr, param, peer_port, 0))
if (!af->from_addr_param(&paddr, param, peer_port, 0))
return NULL;

return __sctp_lookup_association(net, laddr, &paddr, transportp);
Expand Down

0 comments on commit 557fb58

Please sign in to comment.