summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2009-10-14 17:14:56 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2009-10-14 17:14:56 +0200
commit7f9db36d9a56a3d2cae2d6cfd97240fad2f85a51 (patch)
tree4395c114e4bbeb94cbed0f3c7177d148c179989c
parentc104eea4e5d0aeb4c87ee23fab8532530d5fe0e9 (diff)
parent73cc2afb2246a0339fdadde4f2bf66120bcae20f (diff)
downloadrsyslog-7f9db36d9a56a3d2cae2d6cfd97240fad2f85a51.tar.gz
rsyslog-7f9db36d9a56a3d2cae2d6cfd97240fad2f85a51.tar.xz
rsyslog-7f9db36d9a56a3d2cae2d6cfd97240fad2f85a51.zip
Merge branch 'v3-stable' into v4-stable
Conflicts: plugins/imrelp/imrelp.c
-rw-r--r--ChangeLog2
-rw-r--r--doc/imrelp.html3
-rw-r--r--plugins/imrelp/imrelp.c9
3 files changed, 9 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index 3b16824d..73760519 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -250,6 +250,8 @@ version before switching to this one.
Thanks to Ken for providing the patch
---------------------------------------------------------------------------
Version 3.22.2 [v3-stable] (rgerhards), 2009-07-??
+- enhance: imrelp now also provides remote peer's IP address
+ [if librelp != 1.0.0 is used]
- bugfix: sending syslog messages with zip compression did not work
- clarified use of $ActionsSendStreamDriver[AuthMode/PermittedPeers]
in doc set (require TLS drivers)
diff --git a/doc/imrelp.html b/doc/imrelp.html
index 53826ac2..2cf9c1f7 100644
--- a/doc/imrelp.html
+++ b/doc/imrelp.html
@@ -35,6 +35,9 @@ Starts a RELP server on selected port</li>
<b>Caveats/Known Bugs:</b>
<ul>
<li>see description</li>
+<li>To obtain the remote system's IP address, you need to have at least
+librelp 1.0.0 installed. Versions below it return the hostname instead
+of the IP address.</li>
</ul>
<p><b>Sample:</b></p>
<p>This sets up a RELP server on port 20514.<br>
diff --git a/plugins/imrelp/imrelp.c b/plugins/imrelp/imrelp.c
index 2255e643..524d1a35 100644
--- a/plugins/imrelp/imrelp.c
+++ b/plugins/imrelp/imrelp.c
@@ -77,16 +77,15 @@ isPermittedHost(struct sockaddr *addr, char *fromHostFQDN, void __attribute__((u
* are different from our rsRetVal. So we can simply use our own iRet system
* to fulfill the requirement.
* rgerhards, 2008-03-21
- * TODO: we currently do not receive the remote hosts's IP. As a work-around, we
- * use "???" for the time being. -- rgerhards, 2008-05-16
+ * Note: librelp 1.0.0 is required in order to receive the IP address, otherwise
+ * we will only see the hostname (twice). -- rgerhards, 2009-10-14
*/
static relpRetVal
-onSyslogRcv(uchar *pHostname, uchar __attribute__((unused)) *pIP, uchar *pMsg, size_t lenMsg)
+onSyslogRcv(uchar *pHostname, uchar *pIP, uchar *pMsg, size_t lenMsg)
{
DEFiRet;
- parseAndSubmitMessage(pHostname, (uchar*) "[unset]", pMsg, lenMsg, PARSE_HOSTNAME,
+ parseAndSubmitMessage(pHostname, pIP, pMsg, lenMsg, PARSE_HOSTNAME,
eFLOWCTL_LIGHT_DELAY, (uchar*)"imrelp", NULL, 0);
-
RETiRet;
}