summaryrefslogtreecommitdiffstats
path: root/plugins/omrelp
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2011-04-15 10:23:19 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2011-04-15 10:23:19 +0200
commit72c235744023d10e1a9b44c90b65a6b34029e471 (patch)
treed6e14606cc430beeead93d68fc46de7ed82915c1 /plugins/omrelp
parent9105946272e4190e042981f35994b3f044ebb0d3 (diff)
parent254dc643c260c0f4a489188b2277811a4104063e (diff)
downloadrsyslog-72c235744023d10e1a9b44c90b65a6b34029e471.tar.gz
rsyslog-72c235744023d10e1a9b44c90b65a6b34029e471.tar.xz
rsyslog-72c235744023d10e1a9b44c90b65a6b34029e471.zip
Merge branch 'v5-stable' into v5-devel
Conflicts: ChangeLog
Diffstat (limited to 'plugins/omrelp')
-rw-r--r--plugins/omrelp/omrelp.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/plugins/omrelp/omrelp.c b/plugins/omrelp/omrelp.c
index cf70381f..1453d68f 100644
--- a/plugins/omrelp/omrelp.c
+++ b/plugins/omrelp/omrelp.c
@@ -251,8 +251,18 @@ CODE_STD_STRING_REQUESTparseSelectorAct(1)
/* extract the host first (we do a trick - we replace the ';' or ':' with a '\0')
* now skip to port and then template name. rgerhards 2005-07-06
*/
- for(q = p ; *p && *p != ';' && *p != ':' ; ++p)
- /* JUST SKIP */;
+ if(*p == '[') { /* everything is hostname upto ']' */
+ ++p; /* skip '[' */
+ for(q = p ; *p && *p != ']' ; ++p)
+ /* JUST SKIP */;
+ if(*p == ']') {
+ *p = '\0'; /* trick to obtain hostname (later)! */
+ ++p; /* eat it */
+ }
+ } else { /* traditional view of hostname */
+ for(q = p ; *p && *p != ';' && *p != ':' && *p != '#' ; ++p)
+ /* JUST SKIP */;
+ }
pData->port = NULL;
if(*p == ':') { /* process port */