LLC: sys_listen already checks for backlog > SOMAXCONN

also remove tests against SOCK_SEQPACKET, it is not supported
in llc_ui_create.
parent a7f3da32
......@@ -803,7 +803,7 @@ static int llc_ui_listen(struct socket *sock, int backlog)
if (sock->state != SS_UNCONNECTED)
goto out;
rc = -EOPNOTSUPP;
if (sk->type != SOCK_STREAM && sk->type != SOCK_SEQPACKET)
if (sk->type != SOCK_STREAM)
goto out;
rc = -EAGAIN;
if (sk->zapped)
......@@ -811,8 +811,6 @@ static int llc_ui_listen(struct socket *sock, int backlog)
rc = 0;
if (!(unsigned)backlog) /* BSDism */
backlog = 1;
if ((unsigned)backlog > SOMAXCONN)
backlog = SOMAXCONN;
sk->max_ack_backlog = backlog;
if (sk->state != TCP_LISTEN) {
sk->ack_backlog = 0;
......@@ -899,7 +897,7 @@ static int llc_ui_accept(struct socket *sock, struct socket *newsock, int flags)
int rc = -EOPNOTSUPP;
lock_sock(sk);
if (sk->type != SOCK_SEQPACKET && sk->type != SOCK_STREAM)
if (sk->type != SOCK_STREAM)
goto out;
rc = -EINVAL;
if (sock->state != SS_UNCONNECTED || sk->state != TCP_LISTEN)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment