diff options
-rw-r--r-- | ChangeLog | 2 | ||||
-rw-r--r-- | grammar/rainerscript.c | 6 | ||||
-rw-r--r-- | plugins/imklog/imklog.c | 2 | ||||
-rw-r--r-- | plugins/omudpspoof/omudpspoof.c | 5 | ||||
-rw-r--r-- | template.c | 3 | ||||
-rw-r--r-- | tools/pmrfc3164.c | 2 | ||||
-rw-r--r-- | tools/pmrfc5424.c | 4 |
7 files changed, 11 insertions, 13 deletions
@@ -2,6 +2,8 @@ Version 6.3.9 [DEVEL] 2012-04-?? - added capability to specify substrings for field extraction mode - added the "jsonf" property replacer option (and fieldname) +- bugfix: omudpspoof did not work correctly if no spoof hostname was + configured - bugfix: property replacer option "json" could lead to content loss message was truncated if escaping was necessary - bugfix: assigned ruleset was lost when using disk queues diff --git a/grammar/rainerscript.c b/grammar/rainerscript.c index d1d64e6e..320e66d0 100644 --- a/grammar/rainerscript.c +++ b/grammar/rainerscript.c @@ -743,9 +743,11 @@ var2Number(struct var *r, int *bSuccess) if(r->datatype == 'S') { n = es_str2num(r->d.estr, bSuccess); } else { - *bSuccess = 1; + n = r->d.n; + if(bSuccess) + *bSuccess = 1; } - return r->d.n; + return n; } /* ensure that retval is a string; if string is no number, diff --git a/plugins/imklog/imklog.c b/plugins/imklog/imklog.c index 90b424f3..6a607a74 100644 --- a/plugins/imklog/imklog.c +++ b/plugins/imklog/imklog.c @@ -194,11 +194,9 @@ rsRetVal imklogLogIntMsg(int priority, char *fmt, ...) DEFiRet; va_list ap; uchar msgBuf[2048]; /* we use the same size as sysklogd to remain compatible */ - uchar *pLogMsg; va_start(ap, fmt); vsnprintf((char*)msgBuf, sizeof(msgBuf) / sizeof(char), fmt, ap); - pLogMsg = msgBuf; va_end(ap); logmsgInternal(NO_ERRCODE ,priority, msgBuf, 0); diff --git a/plugins/omudpspoof/omudpspoof.c b/plugins/omudpspoof/omudpspoof.c index 506fca77..9a469c16 100644 --- a/plugins/omudpspoof/omudpspoof.c +++ b/plugins/omudpspoof/omudpspoof.c @@ -202,7 +202,7 @@ UDPSend(instanceData *pData, uchar *pszSourcename, char *msg, size_t len) struct addrinfo *r; int lsent = 0; int bSendSuccess; - int j, build_ip; + int j; u_char opt[20]; struct sockaddr_in *tempaddr,source_ip; libnet_ptag_t ip, ipo; @@ -238,7 +238,6 @@ UDPSend(instanceData *pData, uchar *pszSourcename, char *msg, size_t len) DBGPRINTF("Can't build UDP header: %s\n", libnet_geterror(libnet_handle)); } - build_ip = 0; /* this is not a legal options string */ for (j = 0; j < 20; j++) { opt[j] = libnet_get_prand(LIBNET_PR2); @@ -422,7 +421,7 @@ CODE_STD_STRING_REQUESTparseSelectorAct(2) pData->port = NULL; else CHKmalloc(pData->port = ustrdup(cs.pszTargetPort)); - CHKiRet(OMSRsetEntry(*ppOMSR, 1, ustrdup(cs.pszSourceNameTemplate), OMSR_NO_RQD_TPL_OPTS)); + CHKiRet(OMSRsetEntry(*ppOMSR, 1, ustrdup(sourceTpl), OMSR_NO_RQD_TPL_OPTS)); pData->compressionLevel = cs.iCompressionLevel; pData->sourcePort = pData->sourcePortStart = cs.iSourcePortStart; pData->sourcePortEnd = cs.iSourcePortEnd; @@ -943,14 +943,13 @@ static int do_Parameter(unsigned char **pp, struct template *pTpl) static rsRetVal tplAddTplMod(struct template *pTpl, uchar** ppRestOfConfLine) { - uchar *pSrc, *pDst; + uchar *pSrc; uchar szMod[2048]; unsigned lenMod; strgen_t *pStrgen; DEFiRet; pSrc = *ppRestOfConfLine; - pDst = szMod; lenMod = 0; while(*pSrc && !isspace(*pSrc) && lenMod < sizeof(szMod) - 1) { szMod[lenMod] = *pSrc++; diff --git a/tools/pmrfc3164.c b/tools/pmrfc3164.c index 6d2d22b1..2657780d 100644 --- a/tools/pmrfc3164.c +++ b/tools/pmrfc3164.c @@ -75,7 +75,6 @@ ENDisCompatibleWithFeature BEGINparse uchar *p2parse; int lenMsg; - int bTAGCharDetected; int i; /* general index for parsing */ uchar bufParseTAG[CONF_TAG_MAXSIZE]; uchar bufParseHOSTNAME[CONF_HOSTNAME_MAXSIZE]; @@ -137,7 +136,6 @@ CODESTARTparse * rgerhards, 2009-06-23: and I now have extended this logic to every character * that is not a valid hostname. */ - bTAGCharDetected = 0; if(lenMsg > 0 && pMsg->msgFlags & PARSE_HOSTNAME) { i = 0; while(i < lenMsg && (isalnum(p2parse[i]) || p2parse[i] == '.' || p2parse[i] == '.' diff --git a/tools/pmrfc5424.c b/tools/pmrfc5424.c index b06f1347..9b5c6165 100644 --- a/tools/pmrfc5424.c +++ b/tools/pmrfc5424.c @@ -106,7 +106,7 @@ static int parseRFCField(uchar **pp2parse, uchar *pResult, int *pLenStr) /* set the new parse pointer */ *pp2parse = p2parse; - return 0; + return iRet; } @@ -191,7 +191,7 @@ static int parseRFCStructuredData(uchar **pp2parse, uchar *pResult, int *pLenStr /* set the new parse pointer */ *pp2parse = p2parse; *pLenStr = lenStr; - return 0; + return iRet; } /* parse a RFC5424-formatted syslog message. This function returns |