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 /tcps_sess.h | |
parent | 38362e127f7b7b836332bf17097dbbae71bbe810 (diff) | |
download | rsyslog-b0e8ce6c3d48e664135a0f74d5b4df2b3a42827f.tar.gz rsyslog-b0e8ce6c3d48e664135a0f74d5b4df2b3a42827f.tar.xz 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 'tcps_sess.h')
-rw-r--r-- | tcps_sess.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tcps_sess.h b/tcps_sess.h index 2bdee80b..0433fdfb 100644 --- a/tcps_sess.h +++ b/tcps_sess.h @@ -41,6 +41,11 @@ typedef struct tcps_sess_s { int sock; int iMsg; /* index of next char to store in msg */ int bAtStrtOfFram; /* are we at the very beginning of a new frame? */ + enum { + eAtStrtFram, + eInOctetCnt, + eInMsg + } inputState; /* our current state */ int iOctetsRemain; /* Number of Octets remaining in message */ TCPFRAMINGMODE eFraming; char msg[MAXLINE+1]; |