From 36e483b303b11890e870eba5a8c798b170244cb3 Mon Sep 17 00:00:00 2001 From: Jozsef Kadlecsik Date: Sat, 14 Jan 2012 15:06:00 +0100 Subject: Support hostnames and service names with dash The square brackets are introduced as an escape mechanism to enter hostnames or service names with dash in order to avoid mixing up the dash in the name with the range notation. Problem reported by Stephen Hemminger and Marc Guardiola. --- src/ipset.8 | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src') diff --git a/src/ipset.8 b/src/ipset.8 index 3c52048..a2ee39f 100644 --- a/src/ipset.8 +++ b/src/ipset.8 @@ -256,6 +256,12 @@ as \fBnomatch\fR are skipped as if those were no added to the set, which makes possible to build up sets with exceptions. See the example at hash type \fBhash:net\fR below. +If host names or service names with dash in the name are used instead of IP +addresses or service numbers, then the host name or service name must be enclosed +in square brackets. Example: + +.IP +ipset add foo [test\-hostname],[ftp\-data] .SS bitmap:ip The \fBbitmap:ip\fR set type uses a memory range to store either IPv4 host (default) or IPv4 network addresses. A \fBbitmap:ip\fR type of set can store up -- cgit v1.2.3