summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorMarcelo Ricardo Leitner <marcelo.leitner@gmail.com>2021-07-27 23:40:54 -0300
committerDavid S. Miller <davem@davemloft.net>2021-07-28 09:25:18 +0100
commit557fb5862c9272ad9b21407afe1da8acfd9b53eb (patch)
tree27223ddfafd79d8efee65ca559aac94e7d33f0b7 /net
parent46573e3ab08fb041d5ba7bf7bf3215a1e724c78c (diff)
downloadlwn-557fb5862c9272ad9b21407afe1da8acfd9b53eb.tar.gz
lwn-557fb5862c9272ad9b21407afe1da8acfd9b53eb.zip
sctp: fix return value check in __sctp_rcv_asconf_lookup
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: 0c5dc070ff3d ("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>
Diffstat (limited to 'net')
-rw-r--r--net/sctp/input.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/sctp/input.c b/net/sctp/input.c
index eb3c2a34a31c..5ef86fdb1176 100644
--- a/net/sctp/input.c
+++ b/net/sctp/input.c
@@ -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);