diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2008-03-14 17:03:14 +0000 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2008-03-14 17:03:14 +0000 |
commit | b0e8ce6c3d48e664135a0f74d5b4df2b3a42827f (patch) | |
tree | b564ab5c477c194de8985d9c97a048b7fb95629c /tcpsrv.c | |
parent | 38362e127f7b7b836332bf17097dbbae71bbe810 (diff) | |
download | rsyslog-b0e8ce6c3d48e664135a0f74d5b4df2b3a42827f.tar.gz rsyslog-b0e8ce6c3d48e664135a0f74d5b4df2b3a42827f.tar.bz2 rsyslog-b0e8ce6c3d48e664135a0f74d5b4df2b3a42827f.zip |
bugfix: TCP (and GSSAPI) octet-counted frame did not work correctly in all
situations. If the header was split across two packet reads, it was
invalidly processed, causing loss or modification of messages.
Diffstat (limited to 'tcpsrv.c')
-rw-r--r-- | tcpsrv.c | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -612,13 +612,12 @@ Run(tcpsrv_t *pThis) tcps_sess.Destruct(&pThis->pSessions[iTCPSess]); } else { /* valid data received, process it! */ - if(tcps_sess.DataRcvd(pThis->pSessions[iTCPSess], buf, state) == 0) { + if(tcps_sess.DataRcvd(pThis->pSessions[iTCPSess], buf, state) != RS_RET_OK) { /* in this case, something went awfully wrong. * We are instructed to terminate the session. */ errmsg.LogError(NO_ERRCODE, "Tearing down TCP Session %d - see " - "previous messages for reason(s)\n", - iTCPSess); + "previous messages for reason(s)\n", iTCPSess); pThis->pOnErrClose(pThis->pSessions[iTCPSess]); tcps_sess.Destruct(&pThis->pSessions[iTCPSess]); } |