From d8b191a1f37ca3f5331afa25480d49612335b674 Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Thu, 15 May 2008 07:58:01 +0200 Subject: bugfix: TLS server went into an endless loop in some situations. Thanks to Michael Biebl for reporting the problem. --- runtime/nsd_gtls.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'runtime/nsd_gtls.c') diff --git a/runtime/nsd_gtls.c b/runtime/nsd_gtls.c index 03ceba7b..be3910f9 100644 --- a/runtime/nsd_gtls.c +++ b/runtime/nsd_gtls.c @@ -534,6 +534,12 @@ Rcv(nsd_t *pNsd, uchar *pBuf, ssize_t *pLenBuf) /* in TLS mode now */ lenRcvd = gnutls_record_recv(pThis->sess, pBuf, *pLenBuf); + if(lenRcvd < 0) { +int gnuRet; /* this is a hack */ + *pLenBuf = -1; + CHKgnutls(lenRcvd); /* this will abort the function */ + } + *pLenBuf = lenRcvd; finalize_it: -- cgit From e623b1a06bab31665c9185659dad7c7783229ac9 Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Thu, 15 May 2008 11:57:18 +0200 Subject: added TODO item --- runtime/nsd_gtls.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'runtime/nsd_gtls.c') diff --git a/runtime/nsd_gtls.c b/runtime/nsd_gtls.c index be3910f9..5ae92913 100644 --- a/runtime/nsd_gtls.c +++ b/runtime/nsd_gtls.c @@ -535,7 +535,7 @@ Rcv(nsd_t *pNsd, uchar *pBuf, ssize_t *pLenBuf) /* in TLS mode now */ lenRcvd = gnutls_record_recv(pThis->sess, pBuf, *pLenBuf); if(lenRcvd < 0) { -int gnuRet; /* this is a hack */ + int gnuRet; /* TODO: build a specific function for GnuTLS error reporting */ *pLenBuf = -1; CHKgnutls(lenRcvd); /* this will abort the function */ } -- cgit From 09afe64f29bae5af8ea1749373e8c8b6586b70d1 Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Fri, 16 May 2008 13:36:41 +0200 Subject: added fromhost-ip properties and some bugfixes - bugfix: TCP input modules did incorrectly set fromhost property (always blank) - bugfix: imklog did not set fromhost property - added "fromhost-ip" property - added "RSYSLOG_DebugFormat" canned template - bugfix: hostname and fromhost were swapped when a persisted message (in queued mode) was read in --- runtime/nsd_gtls.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'runtime/nsd_gtls.c') diff --git a/runtime/nsd_gtls.c b/runtime/nsd_gtls.c index 5ae92913..5ea7ceb9 100644 --- a/runtime/nsd_gtls.c +++ b/runtime/nsd_gtls.c @@ -471,7 +471,7 @@ AcceptConnReq(nsd_t *pNsd, nsd_t **ppNew) nsd_gtls_t *pThis = (nsd_gtls_t*) pNsd; ISOBJ_TYPE_assert((pThis), nsd_gtls); - CHKiRet(nsd_gtlsConstruct(&pNew)); + CHKiRet(nsd_gtlsConstruct(&pNew)); // TODO: prevent construct/destruct! CHKiRet(nsd_ptcp.Destruct(&pNew->pTcp)); CHKiRet(nsd_ptcp.AcceptConnReq(pThis->pTcp, &pNew->pTcp)); -- cgit