From 73cc2afb2246a0339fdadde4f2bf66120bcae20f Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Wed, 14 Oct 2009 12:56:03 +0200 Subject: enhance: imrelp now also provides remote peer's IP address [if librelp != 1.0.0 is used] --- ChangeLog | 2 ++ doc/imrelp.html | 3 +++ plugins/imrelp/imrelp.c | 8 ++++---- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 8f23049b..e31d56d7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,7 @@ --------------------------------------------------------------------------- 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 bfdaad84..cfc6da38 100644 --- a/doc/imrelp.html +++ b/doc/imrelp.html @@ -33,6 +33,9 @@ Starts a RELP server on selected port Caveats/Known Bugs:

Sample:

This sets up a RELP server on port 20514.
diff --git a/plugins/imrelp/imrelp.c b/plugins/imrelp/imrelp.c index b01dd98b..f4e1444c 100644 --- a/plugins/imrelp/imrelp.c +++ b/plugins/imrelp/imrelp.c @@ -76,14 +76,14 @@ 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, MSG_PARSE_HOSTNAME, + parseAndSubmitMessage(pHostname, pIP, pMsg, lenMsg, MSG_PARSE_HOSTNAME, NOFLAG, eFLOWCTL_LIGHT_DELAY, (uchar*)"imrelp"); RETiRet; -- cgit