From 8c29f2843591376f8a1abca5f09a9740927f1000 Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Tue, 17 Nov 2009 08:11:31 +0100 Subject: moved DNS resolution code out of imudp and into the backend processing Most importantly, DNS resolution now never happens if the resolved name is not required. Note that this applies to imudp - for the other inputs, DNS resolution almost comes for free, so we do not do it there. However, the new method has been implemented in a generic way and as such may also be used by other modules in the future. --- runtime/parser.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'runtime/parser.c') diff --git a/runtime/parser.c b/runtime/parser.c index 38f72986..0686bd91 100644 --- a/runtime/parser.c +++ b/runtime/parser.c @@ -462,7 +462,8 @@ ParseMsg(msg_t *pMsg) * (and that functionality is too important for debugging to drop it...). */ DBGPRINTF("msg parser: flags %x, from '%s', msg '%.50s'\n", pMsg->msgFlags, - getRcvFrom(pMsg), pMsg->pszRawMsg); + (pMsg->msgFlags & NEEDS_DNSRESOL) ? UCHAR_CONSTANT("~NOTRESOLVED~") : getRcvFrom(pMsg), + pMsg->pszRawMsg); /* we now need to go through our list of parsers and see which one is capable of * parsing the message. Note that the first parser that requires message sanitization -- cgit v1.2.3