diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2009-11-17 08:11:31 +0100 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2009-11-17 08:11:31 +0100 |
commit | 8c29f2843591376f8a1abca5f09a9740927f1000 (patch) | |
tree | e606312593700d4dda370879b3ec16cd0faf48d0 /runtime/parser.c | |
parent | 4d93afabe9b10f2f60ab52b2a5134d6c37050e1b (diff) | |
download | rsyslog-8c29f2843591376f8a1abca5f09a9740927f1000.tar.gz rsyslog-8c29f2843591376f8a1abca5f09a9740927f1000.tar.xz rsyslog-8c29f2843591376f8a1abca5f09a9740927f1000.zip |
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.
Diffstat (limited to 'runtime/parser.c')
-rw-r--r-- | runtime/parser.c | 3 |
1 files changed, 2 insertions, 1 deletions
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 |