summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJozsef Kadlecsik <kadlec@blackhole.kfki.hu>2011-04-19 12:25:38 +0200
committerJozsef Kadlecsik <kadlec@blackhole.kfki.hu>2011-04-19 12:25:38 +0200
commit31ee222fa9d4360ac3a066ba2d8c5076aaf7a57b (patch)
tree643171788aa5f22ee2134b716bb3c39abcdb0d55
parentdb87cb1cb68a356143c5773188e477af94417874 (diff)
Get rid of the trailing empty line at listing sets.
Also, remove the empty "members" section when listing just the set headers. Testsuite is updated to reflect the changes in the output.
-rw-r--r--lib/session.c33
-rw-r--r--tests/bitmap:ip.t.list01
-rw-r--r--tests/bitmap:ip.t.list11
-rw-r--r--tests/bitmap:ip.t.list21
-rw-r--r--tests/bitmap:ip.t.list31
-rw-r--r--tests/bitmap:ip.t.list41
-rw-r--r--tests/bitmap:ip.t.list51
-rw-r--r--tests/bitmap:ip.t.list61
-rw-r--r--tests/hash:ip,port,ip.t.list01
-rw-r--r--tests/hash:ip,port,ip.t.list11
-rw-r--r--tests/hash:ip,port,net.t.list01
-rw-r--r--tests/hash:ip,port.t.list01
-rw-r--r--tests/hash:ip,port.t.list11
-rw-r--r--tests/hash:ip,port.t.list21
-rw-r--r--tests/hash:ip.t.list01
-rw-r--r--tests/hash:ip.t.list11
-rw-r--r--tests/hash:ip.t.list21
-rw-r--r--tests/hash:ip.t.list31
-rw-r--r--tests/hash:ip6,port,ip6.t.list01
-rw-r--r--tests/hash:ip6,port,ip6.t.list11
-rw-r--r--tests/hash:ip6,port,net6.t.list01
-rw-r--r--tests/hash:ip6,port.t.list01
-rw-r--r--tests/hash:ip6,port.t.list11
-rw-r--r--tests/hash:ip6.t.list01
-rw-r--r--tests/hash:ip6.t.list11
-rw-r--r--tests/hash:ip6.t.list21
-rw-r--r--tests/hash:ip6.t.list31
-rw-r--r--tests/hash:net,port.t.list01
-rw-r--r--tests/hash:net,port.t.list11
-rw-r--r--tests/hash:net.t.list01
-rw-r--r--tests/hash:net.t.list11
-rw-r--r--tests/hash:net6,port.t.list01
-rw-r--r--tests/hash:net6,port.t.list11
-rw-r--r--tests/hash:net6.t.list01
-rw-r--r--tests/hash:net6.t.list11
-rw-r--r--tests/iphash.t.list01
-rw-r--r--tests/iphash.t.list11
-rw-r--r--tests/ipmap.t.list01
-rw-r--r--tests/ipmap.t.list11
-rw-r--r--tests/ipmap.t.list21
-rw-r--r--tests/ipmap.t.list31
-rw-r--r--tests/ipmap.t.list41
-rw-r--r--tests/ipporthash.t.list01
-rw-r--r--tests/ipporthash.t.list11
-rw-r--r--tests/ipportiphash.t.list01
-rw-r--r--tests/ipportiphash.t.list11
-rw-r--r--tests/ipportnethash.t.list01
-rw-r--r--tests/ipportnethash.t.list11
-rw-r--r--tests/iptree.t.list01
-rw-r--r--tests/iptreemap.t.list01
-rw-r--r--tests/macipmap.t.list01
-rw-r--r--tests/macipmap.t.list11
-rw-r--r--tests/macipmap.t.list21
-rw-r--r--tests/macipmap.t.list31
-rw-r--r--tests/nethash.t.list01
-rw-r--r--tests/portmap.t.list01
-rw-r--r--tests/portmap.t.list11
-rw-r--r--tests/portmap.t.list21
-rw-r--r--tests/portmap.t.list31
-rw-r--r--tests/restore.t.list01
-rw-r--r--tests/restore.t.list11
-rw-r--r--tests/setlist.t.list01
-rw-r--r--tests/setlist.t.list11
-rw-r--r--tests/setlist.t.list21
-rw-r--r--tests/setlist.t.list31
-rw-r--r--tests/setlist.t.list41
-rwxr-xr-xtests/sort.sh1
67 files changed, 22 insertions, 77 deletions
diff --git a/lib/session.c b/lib/session.c
index 5e20a32..c55c311 100644
--- a/lib/session.c
+++ b/lib/session.c
@@ -35,6 +35,7 @@ struct ipset_session {
/* Command state */
enum ipset_cmd cmd; /* Current command */
uint32_t lineno; /* Current lineno in restore mode */
+ uint32_t printed_set; /* Printed sets so far */
char saved_setname[IPSET_MAXNAMELEN]; /* Saved setname */
const struct ipset_type *saved_type; /* Saved type */
struct nlattr *nested[IPSET_NEST_MAX]; /* Pointer to nest levels */
@@ -829,8 +830,9 @@ list_create(struct ipset_session *session, struct nlattr *nla[])
type->name);
break;
case IPSET_LIST_PLAIN:
- safe_snprintf(session, "Name: %s\n"
+ safe_snprintf(session, "%sName: %s\n"
"Type: %s\nHeader: ",
+ session->printed_set ? "\n" : "",
ipset_data_setname(data),
type->name);
break;
@@ -896,11 +898,15 @@ list_create(struct ipset_session *session, struct nlattr *nla[])
safe_dprintf(session, ipset_print_number, IPSET_OPT_MEMSIZE);
safe_snprintf(session, "</memsize>\n <references>");
safe_dprintf(session, ipset_print_number, IPSET_OPT_REFERENCES);
- safe_snprintf(session, "</references>\n </header>\n <members>\n");
+ safe_snprintf(session,
+ session->envopts & IPSET_ENV_LIST_HEADER ?
+ "</references>\n </header>\n" :
+ "</references>\n </header>\n <members>\n");
break;
default:
break;
}
+ session->printed_set++;
return MNL_CB_OK;
}
@@ -912,16 +918,17 @@ print_set_done(struct ipset_session *session)
? "NONE" : session->saved_setname);
switch (session->mode) {
case IPSET_LIST_XML:
- if (session->saved_setname[0] == '\0')
- safe_snprintf(session, "\n");
- else
+ if (session->envopts & IPSET_ENV_LIST_SETNAME)
+ break;
+ if (session->envopts & IPSET_ENV_LIST_HEADER) {
+ if (session->saved_setname[0] != '\0')
+ safe_snprintf(session, "</ipset>\n");
+ break;
+ }
+ if (session->saved_setname[0] != '\0')
safe_snprintf(session, " </members>\n</ipset>\n");
break;
- case IPSET_LIST_SAVE:
- /* No empty lines between the sets */
- break;
default:
- safe_snprintf(session, "\n");
break;
}
return call_outfn(session) ? MNL_CB_ERROR : MNL_CB_STOP;
@@ -933,8 +940,11 @@ callback_list(struct ipset_session *session, struct nlattr *nla[],
{
struct ipset_data *data = session->data;
- if (setjmp(printf_failure))
+ if (setjmp(printf_failure)) {
+ session->saved_setname[0] = '\0';
+ session->printed_set = 0;
return MNL_CB_ERROR;
+ }
if (!nla[IPSET_ATTR_SETNAME])
FAILURE("Broken %s kernel message: missing setname!",
@@ -1629,7 +1639,7 @@ build_msg(struct ipset_session *session, bool aggregate)
flags |= IPSET_FLAG_LIST_HEADER;
if (ipset_data_test(data, IPSET_SETNAME))
ADDATTR_SETNAME(session, nlh, data);
- if (flags) {
+ if (flags && session->mode != IPSET_LIST_SAVE) {
ipset_data_set(data, IPSET_OPT_FLAGS, &flags);
ADDATTR(session, nlh, data, IPSET_ATTR_FLAGS, AF_INET,
cmd_attrs);
@@ -1756,6 +1766,7 @@ ipset_commit(struct ipset_session *session)
/* Reset saved data and nested state */
session->saved_setname[0] = '\0';
+ session->printed_set = 0;
for (i = session->nestid - 1; i >= 0; i--)
session->nested[i] = NULL;
session->nestid = 0;
diff --git a/tests/bitmap:ip.t.list0 b/tests/bitmap:ip.t.list0
index 5f6b35d..e3bbf3b 100644
--- a/tests/bitmap:ip.t.list0
+++ b/tests/bitmap:ip.t.list0
@@ -5,4 +5,3 @@ Size in memory: 524408
References: 0
Members:
2.1.0.0 timeout 0
-
diff --git a/tests/bitmap:ip.t.list1 b/tests/bitmap:ip.t.list1
index 6064717..c97f359 100644
--- a/tests/bitmap:ip.t.list1
+++ b/tests/bitmap:ip.t.list1
@@ -5,4 +5,3 @@ Size in memory: 524408
References: 0
Members:
2.0.0.0 timeout 0
-
diff --git a/tests/bitmap:ip.t.list2 b/tests/bitmap:ip.t.list2
index e00abc9..f3db85c 100644
--- a/tests/bitmap:ip.t.list2
+++ b/tests/bitmap:ip.t.list2
@@ -5,4 +5,3 @@ Size in memory: 524408
References: 0
Members:
10.255.255.0 timeout 0
-
diff --git a/tests/bitmap:ip.t.list3 b/tests/bitmap:ip.t.list3
index 2d5e7a7..8d427b5 100644
--- a/tests/bitmap:ip.t.list3
+++ b/tests/bitmap:ip.t.list3
@@ -6,4 +6,3 @@ References: 0
Members:
0.0.0.0 timeout 0
255.255.0.0 timeout 0
-
diff --git a/tests/bitmap:ip.t.list4 b/tests/bitmap:ip.t.list4
index 53004cf..43418be 100644
--- a/tests/bitmap:ip.t.list4
+++ b/tests/bitmap:ip.t.list4
@@ -10,4 +10,3 @@ Members:
2.0.0.130 timeout x
2.0.0.131 timeout x
2.1.0.0 timeout x
-
diff --git a/tests/bitmap:ip.t.list5 b/tests/bitmap:ip.t.list5
index 65d338d..7d4c34d 100644
--- a/tests/bitmap:ip.t.list5
+++ b/tests/bitmap:ip.t.list5
@@ -6,4 +6,3 @@ References: 0
Members:
2.0.0.0 timeout x
2.0.255.255 timeout x
-
diff --git a/tests/bitmap:ip.t.list6 b/tests/bitmap:ip.t.list6
index 13b75ad..e5a7c07 100644
--- a/tests/bitmap:ip.t.list6
+++ b/tests/bitmap:ip.t.list6
@@ -262,4 +262,3 @@ Members:
10.8.254.0 timeout x
10.8.255.0 timeout x
10.255.255.0 timeout x
-
diff --git a/tests/hash:ip,port,ip.t.list0 b/tests/hash:ip,port,ip.t.list0
index daad2db..779649f 100644
--- a/tests/hash:ip,port,ip.t.list0
+++ b/tests/hash:ip,port,ip.t.list0
@@ -8,4 +8,3 @@ Members:
2.0.0.1,tcp:5,1.1.1.1 timeout x
2.1.0.0,tcp:128,2.2.2.2 timeout x
2.1.0.1,tcp:128,2.2.2.2 timeout x
-
diff --git a/tests/hash:ip,port,ip.t.list1 b/tests/hash:ip,port,ip.t.list1
index fb0b4a4..2e42e5a 100644
--- a/tests/hash:ip,port,ip.t.list1
+++ b/tests/hash:ip,port,ip.t.list1
@@ -4,4 +4,3 @@ Header: family inet hashsize 1024 maxelem 65536 timeout 5
Size in memory: 8304
References: 0
Members:
-
diff --git a/tests/hash:ip,port,net.t.list0 b/tests/hash:ip,port,net.t.list0
index 967e693..3ce6e1f 100644
--- a/tests/hash:ip,port,net.t.list0
+++ b/tests/hash:ip,port,net.t.list0
@@ -8,4 +8,3 @@ Members:
2.0.0.1,tcp:5,192.168.0.0/24 timeout x
2.1.0.0,tcp:128,10.0.0.0/16 timeout x
2.1.0.1,tcp:128,10.0.0.0/17 timeout x
-
diff --git a/tests/hash:ip,port.t.list0 b/tests/hash:ip,port.t.list0
index fb6a8ec..7896f57 100644
--- a/tests/hash:ip,port.t.list0
+++ b/tests/hash:ip,port.t.list0
@@ -8,4 +8,3 @@ Members:
2.0.0.1,tcp:5 timeout x
2.1.0.0,tcp:128 timeout x
2.1.0.1,tcp:128 timeout x
-
diff --git a/tests/hash:ip,port.t.list1 b/tests/hash:ip,port.t.list1
index d455117..0b71466 100644
--- a/tests/hash:ip,port.t.list1
+++ b/tests/hash:ip,port.t.list1
@@ -4,4 +4,3 @@ Header: family inet hashsize 1024 maxelem 65536 timeout 5
Size in memory: 8304
References: 0
Members:
-
diff --git a/tests/hash:ip,port.t.list2 b/tests/hash:ip,port.t.list2
index 33911a0..bb6e9e4 100644
--- a/tests/hash:ip,port.t.list2
+++ b/tests/hash:ip,port.t.list2
@@ -7,4 +7,3 @@ Members:
2.0.0.1,tcp:80
2.0.0.1,udp:80
2.0.0.1,vrrp:0
-
diff --git a/tests/hash:ip.t.list0 b/tests/hash:ip.t.list0
index 117faf2..09a1850 100644
--- a/tests/hash:ip.t.list0
+++ b/tests/hash:ip.t.list0
@@ -5,4 +5,3 @@ Size in memory: 1208
References: 0
Members:
192.168.68.69 timeout 0
-
diff --git a/tests/hash:ip.t.list1 b/tests/hash:ip.t.list1
index b15a212..cb21bc4 100644
--- a/tests/hash:ip.t.list1
+++ b/tests/hash:ip.t.list1
@@ -5,4 +5,3 @@ Size in memory: 1352
References: 0
Members:
200.100.10.0 timeout 0
-
diff --git a/tests/hash:ip.t.list2 b/tests/hash:ip.t.list2
index 468ba67..ec085bf 100644
--- a/tests/hash:ip.t.list2
+++ b/tests/hash:ip.t.list2
@@ -6,4 +6,3 @@ References: 0
Members:
192.168.68.69 timeout x
2.0.0.1 timeout x
-
diff --git a/tests/hash:ip.t.list3 b/tests/hash:ip.t.list3
index 463f0a4..7bdf31a 100644
--- a/tests/hash:ip.t.list3
+++ b/tests/hash:ip.t.list3
@@ -7,4 +7,3 @@ Members:
192.168.68.0 timeout x
2.0.0.0 timeout x
200.100.10.0 timeout x
-
diff --git a/tests/hash:ip6,port,ip6.t.list0 b/tests/hash:ip6,port,ip6.t.list0
index 8192dfb..061ea94 100644
--- a/tests/hash:ip6,port,ip6.t.list0
+++ b/tests/hash:ip6,port,ip6.t.list0
@@ -8,4 +8,3 @@ Members:
2:1::1,tcp:128,2:2:2::2 timeout x
2::,tcp:5,1:1:1::1 timeout x
2::1,tcp:5,1:1:1::1 timeout x
-
diff --git a/tests/hash:ip6,port,ip6.t.list1 b/tests/hash:ip6,port,ip6.t.list1
index 16fdb92..b05e3ff 100644
--- a/tests/hash:ip6,port,ip6.t.list1
+++ b/tests/hash:ip6,port,ip6.t.list1
@@ -4,4 +4,3 @@ Header: family inet6 hashsize 1024 maxelem 65536 timeout 5
Size in memory: 8304
References: 0
Members:
-
diff --git a/tests/hash:ip6,port,net6.t.list0 b/tests/hash:ip6,port,net6.t.list0
index d3d6503..0b0fabd 100644
--- a/tests/hash:ip6,port,net6.t.list0
+++ b/tests/hash:ip6,port,net6.t.list0
@@ -8,4 +8,3 @@ Members:
2:1::1,tcp:128,::/12
2::,tcp:5,1::/24
2::1,tcp:5,1::/24
-
diff --git a/tests/hash:ip6,port.t.list0 b/tests/hash:ip6,port.t.list0
index 1336a3f..d64f0db 100644
--- a/tests/hash:ip6,port.t.list0
+++ b/tests/hash:ip6,port.t.list0
@@ -8,4 +8,3 @@ Members:
2:1::1,tcp:128 timeout x
2::,tcp:5 timeout x
2::1,tcp:5 timeout x
-
diff --git a/tests/hash:ip6,port.t.list1 b/tests/hash:ip6,port.t.list1
index 8dec3e8..31c2fd5 100644
--- a/tests/hash:ip6,port.t.list1
+++ b/tests/hash:ip6,port.t.list1
@@ -4,4 +4,3 @@ Header: family inet6 hashsize 1024 maxelem 65536 timeout 5
Size in memory: 8304
References: 0
Members:
-
diff --git a/tests/hash:ip6.t.list0 b/tests/hash:ip6.t.list0
index ff1c0da..25df7d9 100644
--- a/tests/hash:ip6.t.list0
+++ b/tests/hash:ip6.t.list0
@@ -5,4 +5,3 @@ Size in memory: 1240
References: 0
Members:
192:168:68::69 timeout 0
-
diff --git a/tests/hash:ip6.t.list1 b/tests/hash:ip6.t.list1
index 00b3323..215677d 100644
--- a/tests/hash:ip6.t.list1
+++ b/tests/hash:ip6.t.list1
@@ -5,4 +5,3 @@ Size in memory: 1448
References: 0
Members:
200:100:10:: timeout 0
-
diff --git a/tests/hash:ip6.t.list2 b/tests/hash:ip6.t.list2
index 5cd39fb..339bf3f 100644
--- a/tests/hash:ip6.t.list2
+++ b/tests/hash:ip6.t.list2
@@ -6,4 +6,3 @@ References: 0
Members:
192:168:68::69 timeout x
2::1 timeout x
-
diff --git a/tests/hash:ip6.t.list3 b/tests/hash:ip6.t.list3
index dce0660..b7f7d12 100644
--- a/tests/hash:ip6.t.list3
+++ b/tests/hash:ip6.t.list3
@@ -7,4 +7,3 @@ Members:
192:168:68:: timeout x
200:100:10:: timeout x
2:: timeout x
-
diff --git a/tests/hash:net,port.t.list0 b/tests/hash:net,port.t.list0
index 8194872..4988d96 100644
--- a/tests/hash:net,port.t.list0
+++ b/tests/hash:net,port.t.list0
@@ -8,4 +8,3 @@ Members:
192.168.68.64/27,tcp:8 timeout x
2.0.0.0/24,icmp:echo-request timeout x
2.0.0.1,icmp:echo-request timeout x
-
diff --git a/tests/hash:net,port.t.list1 b/tests/hash:net,port.t.list1
index c049cf7..753c575 100644
--- a/tests/hash:net,port.t.list1
+++ b/tests/hash:net,port.t.list1
@@ -4,4 +4,3 @@ Header: family inet hashsize 128 maxelem 65536 timeout 5
Size in memory: 2000
References: 0
Members:
-
diff --git a/tests/hash:net.t.list0 b/tests/hash:net.t.list0
index b5cc00b..7e4d92b 100644
--- a/tests/hash:net.t.list0
+++ b/tests/hash:net.t.list0
@@ -8,4 +8,3 @@ Members:
192.168.68.64/27 timeout x
2.0.0.0/24 timeout x
2.0.0.1 timeout x
-
diff --git a/tests/hash:net.t.list1 b/tests/hash:net.t.list1
index 515a93c..fb8dc80 100644
--- a/tests/hash:net.t.list1
+++ b/tests/hash:net.t.list1
@@ -4,4 +4,3 @@ Header: family inet hashsize 128 maxelem 65536 timeout 5
Size in memory: 1672
References: 0
Members:
-
diff --git a/tests/hash:net6,port.t.list0 b/tests/hash:net6,port.t.list0
index 7c9b46d..e66d2df 100644
--- a/tests/hash:net6,port.t.list0
+++ b/tests/hash:net6,port.t.list0
@@ -8,4 +8,3 @@ Members:
1:1:1::1,tcp:8 timeout x
2::/24,tcp:8 timeout x
3::1,tcp:8 timeout x
-
diff --git a/tests/hash:net6,port.t.list1 b/tests/hash:net6,port.t.list1
index 31c3eca..f3b23cb 100644
--- a/tests/hash:net6,port.t.list1
+++ b/tests/hash:net6,port.t.list1
@@ -5,4 +5,3 @@ Size in memory: 2328
References: 0
Members:
1:1:1::1,tcp:8 timeout 0
-
diff --git a/tests/hash:net6.t.list0 b/tests/hash:net6.t.list0
index afe1f2c..4b06c8c 100644
--- a/tests/hash:net6.t.list0
+++ b/tests/hash:net6.t.list0
@@ -8,4 +8,3 @@ Members:
1:1:1::1 timeout x
2::/24 timeout x
3::1 timeout x
-
diff --git a/tests/hash:net6.t.list1 b/tests/hash:net6.t.list1
index 05d4746..891c0ce 100644
--- a/tests/hash:net6.t.list1
+++ b/tests/hash:net6.t.list1
@@ -4,4 +4,3 @@ Header: family inet6 hashsize 128 maxelem 65536 timeout 5
Size in memory: 2696
References: 0
Members:
-
diff --git a/tests/iphash.t.list0 b/tests/iphash.t.list0
index e2cc4ca..b871248 100644
--- a/tests/iphash.t.list0
+++ b/tests/iphash.t.list0
@@ -6,4 +6,3 @@ References: 0
Members:
192.168.68.69
2.0.0.1
-
diff --git a/tests/iphash.t.list1 b/tests/iphash.t.list1
index ec9b493..652c366 100644
--- a/tests/iphash.t.list1
+++ b/tests/iphash.t.list1
@@ -6,4 +6,3 @@ References: 0
Members:
192.168.68.0
2.0.0.0
-
diff --git a/tests/ipmap.t.list0 b/tests/ipmap.t.list0
index 8bf54c2..c97caef 100644
--- a/tests/ipmap.t.list0
+++ b/tests/ipmap.t.list0
@@ -10,4 +10,3 @@ Members:
2.0.0.130
2.0.0.131
2.1.0.0
-
diff --git a/tests/ipmap.t.list1 b/tests/ipmap.t.list1
index 4541cf5..d971782 100644
--- a/tests/ipmap.t.list1
+++ b/tests/ipmap.t.list1
@@ -6,4 +6,3 @@ References: 0
Members:
2.0.0.1
2.1.0.0
-
diff --git a/tests/ipmap.t.list2 b/tests/ipmap.t.list2
index 5f78ba6..09a305c 100644
--- a/tests/ipmap.t.list2
+++ b/tests/ipmap.t.list2
@@ -6,4 +6,3 @@ References: 0
Members:
2.0.0.0
2.0.255.255
-
diff --git a/tests/ipmap.t.list3 b/tests/ipmap.t.list3
index 0acb3ee..037051b 100644
--- a/tests/ipmap.t.list3
+++ b/tests/ipmap.t.list3
@@ -262,4 +262,3 @@ Members:
10.8.254.0
10.8.255.0
10.255.255.0
-
diff --git a/tests/ipmap.t.list4 b/tests/ipmap.t.list4
index 67a0c4f..7135ff4 100644
--- a/tests/ipmap.t.list4
+++ b/tests/ipmap.t.list4
@@ -6,4 +6,3 @@ References: 0
Members:
0.0.0.0
255.255.0.0
-
diff --git a/tests/ipporthash.t.list0 b/tests/ipporthash.t.list0
index e28593c..c31e151 100644
--- a/tests/ipporthash.t.list0
+++ b/tests/ipporthash.t.list0
@@ -8,4 +8,3 @@ Members:
2.0.0.1,tcp:5
2.1.0.0,tcp:128
2.1.0.1,tcp:128
-
diff --git a/tests/ipporthash.t.list1 b/tests/ipporthash.t.list1
index 1fbfc9c..a99b8db 100644
--- a/tests/ipporthash.t.list1
+++ b/tests/ipporthash.t.list1
@@ -8,4 +8,3 @@ Members:
2.0.0.0,tcp:5
2.0.255.255,tcp:128
2.1.0.0,tcp:128
-
diff --git a/tests/ipportiphash.t.list0 b/tests/ipportiphash.t.list0
index 623e683..055aaf2 100644
--- a/tests/ipportiphash.t.list0
+++ b/tests/ipportiphash.t.list0
@@ -8,4 +8,3 @@ Members:
2.0.0.1,tcp:5,1.1.1.1
2.1.0.0,tcp:128,2.2.2.2
2.1.0.1,tcp:128,2.2.2.2
-
diff --git a/tests/ipportiphash.t.list1 b/tests/ipportiphash.t.list1
index 104a94a..22784b7 100644
--- a/tests/ipportiphash.t.list1
+++ b/tests/ipportiphash.t.list1
@@ -6,4 +6,3 @@ References: 0
Members:
2.0.0.0,tcp:5,1.1.1.1
2.0.255.255,tcp:128,2.2.2.2
-
diff --git a/tests/ipportnethash.t.list0 b/tests/ipportnethash.t.list0
index ebc2ab6..96fa73f 100644
--- a/tests/ipportnethash.t.list0
+++ b/tests/ipportnethash.t.list0
@@ -8,4 +8,3 @@ Members:
2.0.0.1,tcp:5,1.1.1.0/24
2.1.0.0,tcp:128,2.0.0.0/12
2.1.0.1,tcp:128,2.0.0.0/12
-
diff --git a/tests/ipportnethash.t.list1 b/tests/ipportnethash.t.list1
index fc90f78..2d287e4 100644
--- a/tests/ipportnethash.t.list1
+++ b/tests/ipportnethash.t.list1
@@ -8,4 +8,3 @@ Members:
2.0.0.0,tcp:5,1.1.1.0/24
2.0.255.255,tcp:128,2.0.0.0/12
2.1.0.0,tcp:128,2.0.0.0/12
-
diff --git a/tests/iptree.t.list0 b/tests/iptree.t.list0
index f93546d..73beb61 100644
--- a/tests/iptree.t.list0
+++ b/tests/iptree.t.list0
@@ -6,4 +6,3 @@ References: 0
Members:
192.168.68.69
2.0.0.1
-
diff --git a/tests/iptreemap.t.list0 b/tests/iptreemap.t.list0
index 15db1fe..a1c7435 100644
--- a/tests/iptreemap.t.list0
+++ b/tests/iptreemap.t.list0
@@ -35,4 +35,3 @@ Members:
2.0.0.1
3.0.0.0
3.0.0.2
-
diff --git a/tests/macipmap.t.list0 b/tests/macipmap.t.list0
index 9403224..7239eb0 100644
--- a/tests/macipmap.t.list0
+++ b/tests/macipmap.t.list0
@@ -7,4 +7,3 @@ Members:
2.0.0.1,00:11:22:33:44:56
2.0.0.2,00:11:22:33:44:55
2.1.0.0
-
diff --git a/tests/macipmap.t.list1 b/tests/macipmap.t.list1
index 3420abe..2c4a800 100644
--- a/tests/macipmap.t.list1
+++ b/tests/macipmap.t.list1
@@ -7,4 +7,3 @@ Members:
2.0.0.0
2.0.0.2,00:11:22:33:44:55
2.0.255.255,00:11:22:33:44:56
-
diff --git a/tests/macipmap.t.list2 b/tests/macipmap.t.list2
index f154a52..b4d943b 100644
--- a/tests/macipmap.t.list2
+++ b/tests/macipmap.t.list2
@@ -5,4 +5,3 @@ Size in memory: 1048688
References: 0
Members:
2.1.0.0 timeout x
-
diff --git a/tests/macipmap.t.list3 b/tests/macipmap.t.list3
index 04b66b5..93a0db3 100644
--- a/tests/macipmap.t.list3
+++ b/tests/macipmap.t.list3
@@ -7,4 +7,3 @@ Members:
2.0.0.1,00:11:22:33:44:56 timeout x
2.0.0.2,00:11:22:33:44:55 timeout x
2.1.0.0 timeout x
-
diff --git a/tests/nethash.t.list0 b/tests/nethash.t.list0
index 2809d79..4c73c56 100644
--- a/tests/nethash.t.list0
+++ b/tests/nethash.t.list0
@@ -8,4 +8,3 @@ Members:
192.168.68.64/27
2.0.0.0/24
2.0.0.1
-
diff --git a/tests/portmap.t.list0 b/tests/portmap.t.list0
index 9934a75..88636c1 100644
--- a/tests/portmap.t.list0
+++ b/tests/portmap.t.list0
@@ -6,4 +6,3 @@ References: 0
Members:
1
1024
-
diff --git a/tests/portmap.t.list1 b/tests/portmap.t.list1
index 4f13e32..1dff313 100644
--- a/tests/portmap.t.list1
+++ b/tests/portmap.t.list1
@@ -6,4 +6,3 @@ References: 0
Members:
0
65535
-
diff --git a/tests/portmap.t.list2 b/tests/portmap.t.list2
index 66e06b8..f2e511f 100644
--- a/tests/portmap.t.list2
+++ b/tests/portmap.t.list2
@@ -6,4 +6,3 @@ Size in memory: 524288
References: 0
Members:
65535 timeout 0
-
diff --git a/tests/portmap.t.list3 b/tests/portmap.t.list3
index b79cd1e..1af93d6 100644
--- a/tests/portmap.t.list3
+++ b/tests/portmap.t.list3
@@ -6,4 +6,3 @@ References: 0
Members:
0 timeout x
65535 timeout x
-
diff --git a/tests/restore.t.list0 b/tests/restore.t.list0
index 43b8422..6c56885 100644
--- a/tests/restore.t.list0
+++ b/tests/restore.t.list0
@@ -7,4 +7,3 @@ Members:
3::3
4::4
a::a
-
diff --git a/tests/restore.t.list1 b/tests/restore.t.list1
index fd9b82d..146748d 100644
--- a/tests/restore.t.list1
+++ b/tests/restore.t.list1
@@ -7,4 +7,3 @@ Members:
1::1
2::2
b::b
-
diff --git a/tests/setlist.t.list0 b/tests/setlist.t.list0
index 99f88fb..ab0ddee 100644
--- a/tests/setlist.t.list0
+++ b/tests/setlist.t.list0
@@ -6,4 +6,3 @@ References: 0
Members:
foo
bar
-
diff --git a/tests/setlist.t.list1 b/tests/setlist.t.list1
index 7bba167..419a03f 100644
--- a/tests/setlist.t.list1
+++ b/tests/setlist.t.list1
@@ -7,4 +7,3 @@ Members:
a
b
c
-
diff --git a/tests/setlist.t.list2 b/tests/setlist.t.list2
index 2dc752a..dff0314 100644
--- a/tests/setlist.t.list2
+++ b/tests/setlist.t.list2
@@ -6,4 +6,3 @@ References: 0
Members:
a
c
-
diff --git a/tests/setlist.t.list3 b/tests/setlist.t.list3
index 5abe9e4..1fdb7e5 100644
--- a/tests/setlist.t.list3
+++ b/tests/setlist.t.list3
@@ -5,4 +5,3 @@ Size in memory: 120
References: 0
Members:
a
-
diff --git a/tests/setlist.t.list4 b/tests/setlist.t.list4
index f867508..956d59e 100644
--- a/tests/setlist.t.list4
+++ b/tests/setlist.t.list4
@@ -33,4 +33,3 @@ Size in memory: 112
References: 0
Members:
a
-
diff --git a/tests/sort.sh b/tests/sort.sh
index ccdbc4e..69aebd5 100755
--- a/tests/sort.sh
+++ b/tests/sort.sh
@@ -2,5 +2,4 @@
head -n 6 $1 > .foo
tail -n +7 $1 | grep '[[:alnum:]]' | sort >> .foo
-echo >> .foo
rm $1