Home Home > GIT Browse > SLE15-AZURE
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenis Kirjanov <dkirjanov@suse.com>2019-12-05 19:36:10 +0300
committerDenis Kirjanov <dkirjanov@suse.com>2019-12-05 19:36:10 +0300
commit978b64207eff3a07407b65b52403d49640054769 (patch)
tree3537c5ee4170dd834fb71cbce7993d4a1586eb45
parent0715c9a023d3f227df6e1376e6f815c8f15aa164 (diff)
-rw-r--r--net/ipv4/af_inet.c3
-rw-r--r--net/sctp/socket.c4
2 files changed, 4 insertions, 3 deletions
diff --git a/net/ipv4/af_inet.c b/net/ipv4/af_inet.c
index 248b5de6a6bc..ef3ec3f6d817 100644
--- a/net/ipv4/af_inet.c
+++ b/net/ipv4/af_inet.c
@@ -565,7 +565,8 @@ int inet_dgram_connect(struct socket *sock, struct sockaddr *uaddr,
return err;
}
- if (!inet_sk(sk)->inet_num && inet_autobind(sk))
+ if (!inet_sk(sk)->inet_num && !sk->sk_prot->no_autobind &&
+ inet_autobind(sk))
return -EAGAIN;
return sk->sk_prot->connect(sk, uaddr, addr_len);
}
diff --git a/net/sctp/socket.c b/net/sctp/socket.c
index ed6c081aff36..f0c7b8c84058 100644
--- a/net/sctp/socket.c
+++ b/net/sctp/socket.c
@@ -8240,7 +8240,7 @@ struct proto sctp_prot = {
.backlog_rcv = sctp_backlog_rcv,
.hash = sctp_hash,
.unhash = sctp_unhash,
- .get_port = sctp_get_port,
+ .no_autobind = true,
.obj_size = sizeof(struct sctp_sock),
.sysctl_mem = sysctl_sctp_mem,
.sysctl_rmem = sysctl_sctp_rmem,
@@ -8279,7 +8279,7 @@ struct proto sctpv6_prot = {
.backlog_rcv = sctp_backlog_rcv,
.hash = sctp_hash,
.unhash = sctp_unhash,
- .get_port = sctp_get_port,
+ .no_autobind = true,
.obj_size = sizeof(struct sctp6_sock),
.sysctl_mem = sysctl_sctp_mem,
.sysctl_rmem = sysctl_sctp_rmem,