From 12452d6a15fdc50ce53a1fe428fd2520979d7aa6 Mon Sep 17 00:00:00 2001 From: Janeks Jaunups Date: Tue, 6 May 2014 07:30:15 +0200 Subject: ipset: Handle missing leading zeros in ethernet address parser ipset would not parse ether addresses which are not exactly 17 characters long, for ex. 1:2:3:4:5:6, which is fixed in the patch. Signed-off-by: Jozsef Kadlecsik --- tests/macipmap.t | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'tests/macipmap.t') diff --git a/tests/macipmap.t b/tests/macipmap.t index 53b12fa..45783d6 100644 --- a/tests/macipmap.t +++ b/tests/macipmap.t @@ -44,6 +44,14 @@ 0 diff -u -I 'Size in memory.*' .foo macipmap.t.list0 # Range: Flush test set 0 ipset -F test +# Range: Catch invalid (too long) MAC +1 ipset -A test 2.0.0.2,00:11:22:33:44:55:66 +# Range: Catch invalid (too short) MAC +1 ipset -A test 2.0.0.2,00:11:22:33:44 +# Range: Add an element with MAC without leading zeros +0 ipset -A test 2.0.0.2,0:1:2:3:4:5 +# Range: Check element with MAC without leading zeros +0 ipset -T test 2.0.0.2,0:1:2:3:4:5 # Range: Delete test set 0 ipset -X test # Network: Try to create a set from an invalid network -- cgit v1.2.3