mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-23 23:21:46 +00:00
[SCTP] Add support for ip_nonlocal_bind sysctl & IP_FREEBIND socket option
Signed-off-by: Neil Horman <nhorman@redhat.com> Signed-off-by: Sridhar Samudrala <sri@us.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
bca735bd0d
commit
cdac4e0774
3 changed files with 7 additions and 2 deletions
|
@ -378,10 +378,13 @@ static int sctp_v4_available(union sctp_addr *addr, struct sctp_sock *sp)
|
|||
{
|
||||
int ret = inet_addr_type(addr->v4.sin_addr.s_addr);
|
||||
|
||||
/* FIXME: ip_nonlocal_bind sysctl support. */
|
||||
|
||||
if (addr->v4.sin_addr.s_addr != INADDR_ANY && ret != RTN_LOCAL)
|
||||
if (addr->v4.sin_addr.s_addr != INADDR_ANY &&
|
||||
ret != RTN_LOCAL &&
|
||||
!sp->inet.freebind &&
|
||||
!sysctl_ip_nonlocal_bind)
|
||||
return 0;
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue