diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2008-05-16 15:11:24 +0200 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2008-05-16 15:11:24 +0200 |
commit | 29ebd4ab3e391aea53b6e337061d226359aeb993 (patch) | |
tree | 4ae2c32da9e8ed71109a2de600911df6dfdbd0d5 /plugins/imudp/imudp.c | |
parent | ffa17a25d2c2098d4977d377cbf20d0136fea820 (diff) | |
parent | dfb1f20ce71e69bf164c9b1d59e0b4cd9f81c252 (diff) | |
download | rsyslog-29ebd4ab3e391aea53b6e337061d226359aeb993.tar.gz rsyslog-29ebd4ab3e391aea53b6e337061d226359aeb993.tar.bz2 rsyslog-29ebd4ab3e391aea53b6e337061d226359aeb993.zip |
Merge branch 'master' into ietf-tls
Diffstat (limited to 'plugins/imudp/imudp.c')
-rw-r--r-- | plugins/imudp/imudp.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/plugins/imudp/imudp.c b/plugins/imudp/imudp.c index 5fdb3c91..54dc6836 100644 --- a/plugins/imudp/imudp.c +++ b/plugins/imudp/imudp.c @@ -135,6 +135,7 @@ BEGINrunInput struct sockaddr_storage frominet; socklen_t socklen; uchar fromHost[NI_MAXHOST]; + uchar fromHostIP[NI_MAXHOST]; uchar fromHostFQDN[NI_MAXHOST]; ssize_t l; CODESTARTrunInput @@ -182,7 +183,7 @@ CODESTARTrunInput l = recvfrom(udpLstnSocks[i+1], (char*) pRcvBuf, MAXLINE - 1, 0, (struct sockaddr *)&frominet, &socklen); if (l > 0) { - if(net.cvthname(&frominet, fromHost, fromHostFQDN) == RS_RET_OK) { + if(net.cvthname(&frominet, fromHost, fromHostFQDN, fromHostIP) == RS_RET_OK) { dbgprintf("Message from inetd socket: #%d, host: %s\n", udpLstnSocks[i+1], fromHost); /* Here we check if a host is permitted to send us @@ -193,7 +194,7 @@ CODESTARTrunInput */ if(net.isAllowedSender(net.pAllowedSenders_UDP, (struct sockaddr *)&frominet, (char*)fromHostFQDN)) { - parseAndSubmitMessage(fromHost, pRcvBuf, l, + parseAndSubmitMessage(fromHost, fromHostIP, pRcvBuf, l, MSG_PARSE_HOSTNAME, NOFLAG, eFLOWCTL_NO_DELAY); } else { dbgprintf("%s is not an allowed sender\n", (char*)fromHostFQDN); |