mirror of
https://git.openldap.org/openldap/openldap.git
synced 2026-01-02 04:59:39 -05:00
ITS#9803 Drop connection when receiving non-LDAP data
This commit is contained in:
parent
34ebfac7ef
commit
e8813b12b6
1 changed files with 10 additions and 4 deletions
|
|
@ -506,6 +506,16 @@ nextresp3:
|
|||
lc->lconn_ber = NULL;
|
||||
break;
|
||||
|
||||
default:
|
||||
/*
|
||||
* We read a BerElement that isn't LDAP or the stream has desync'd.
|
||||
* In either case, anything we read from now on is probably garbage,
|
||||
* just drop the connection.
|
||||
*/
|
||||
ber_free( ber, 1 );
|
||||
lc->lconn_ber = NULL;
|
||||
/* FALLTHRU */
|
||||
|
||||
case LBER_DEFAULT:
|
||||
fail:
|
||||
err = sock_errno();
|
||||
|
|
@ -521,10 +531,6 @@ fail:
|
|||
}
|
||||
lc->lconn_status = 0;
|
||||
return -1;
|
||||
|
||||
default:
|
||||
ld->ld_errno = LDAP_LOCAL_ERROR;
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* message id */
|
||||
|
|
|
|||
Loading…
Reference in a new issue