Blame SOURCES/0035-Syslog-permit-IPv6-loghost-addresses.patch

ab36df
From 46460e6d15a217dd0b73e515f8edd480cd95654f Mon Sep 17 00:00:00 2001
ab36df
From: Dominic Cleal <dcleal@redhat.com>
ab36df
Date: Wed, 3 Sep 2014 16:27:41 +0100
ab36df
Subject: [PATCH] Syslog: permit IPv6 loghost addresses
ab36df
ab36df
Fixes RHBZ#1129388
ab36df
ab36df
(cherry picked from commit a94ad3e6ca467acd03b38c9964f9c3c773a646a5)
ab36df
ab36df
Conflicts:
ab36df
	NEWS
ab36df
---
ab36df
 lenses/syslog.aug            | 3 ++-
ab36df
 lenses/tests/test_syslog.aug | 5 +++++
ab36df
 2 files changed, 7 insertions(+), 1 deletion(-)
ab36df
ab36df
diff --git a/lenses/syslog.aug b/lenses/syslog.aug
ab36df
index caa1ce0..97c721e 100644
ab36df
--- a/lenses/syslog.aug
ab36df
+++ b/lenses/syslog.aug
ab36df
@@ -120,7 +120,8 @@ module Syslog =
ab36df
 	(* Variable: loghost_r
ab36df
 	 Matches a hostname, that is labels speparated by dots, labels can't
ab36df
 	 start or end with a "-".  maybe a bit too complicated for what it's worth *)
ab36df
-	let loghost_r = /[a-zA-Z0-9]([a-zA-Z0-9-]*[a-zA-Z0-9])?(\.[a-zA-Z0-9]([a-zA-Z0-9-]*[a-zA-Z0-9])?)*/
ab36df
+	let loghost_r = /[a-zA-Z0-9]([a-zA-Z0-9-]*[a-zA-Z0-9])?(\.[a-zA-Z0-9]([a-zA-Z0-9-]*[a-zA-Z0-9])?)*/ |
ab36df
+                    "[" . Rx.ipv6 . "]"
ab36df
 
ab36df
 	(* Group: Function *)
ab36df
 
ab36df
diff --git a/lenses/tests/test_syslog.aug b/lenses/tests/test_syslog.aug
ab36df
index 8fe24c3..51f1e2d 100644
ab36df
--- a/lenses/tests/test_syslog.aug
ab36df
+++ b/lenses/tests/test_syslog.aug
ab36df
@@ -15,6 +15,7 @@ daemon.!<=info					/var/log/foo
ab36df
 *.*						@syslog.far.away:123
ab36df
 *.*						@@syslog.far.away
ab36df
 *.*						@@syslog.far.away:123
ab36df
+*.*						@[2001::1]:514
ab36df
 *.*						foo,bar
ab36df
 *.*						|\"/usr/bin/soft arg\"
ab36df
 !startslip
ab36df
@@ -105,6 +106,10 @@ daemon.info                                     /var/log/cvsupd.log
ab36df
 	  }
ab36df
 	  { "entry"
ab36df
 	    { "selector" { "facility" = "*" } { "level" = "*" } }
ab36df
+	    { "action" { "hostname" = "[2001::1]" } { "port" = "514" } }
ab36df
+	  }
ab36df
+	  { "entry"
ab36df
+	    { "selector" { "facility" = "*" } { "level" = "*" } }
ab36df
 	    { "action" { "user" = "foo" } { "user" = "bar" } }
ab36df
 	  }
ab36df
 	  { "entry"