mirror of
				https://github.com/torvalds/linux.git
				synced 2025-11-04 02:30:34 +02:00 
			
		
		
		
	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: 0c5dc070ff ("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>
			
			
This commit is contained in:
		
							parent
							
								
									46573e3ab0
								
							
						
					
					
						commit
						557fb5862c
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		| 
						 | 
					@ -1203,7 +1203,7 @@ static struct sctp_association *__sctp_rcv_asconf_lookup(
 | 
				
			||||||
	if (unlikely(!af))
 | 
						if (unlikely(!af))
 | 
				
			||||||
		return NULL;
 | 
							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 NULL;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	return __sctp_lookup_association(net, laddr, &paddr, transportp);
 | 
						return __sctp_lookup_association(net, laddr, &paddr, transportp);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue