From d4f9a8fb9e9acc09b0726e19e7c8e5faaa959803 Mon Sep 17 00:00:00 2001 From: Laura Garcia Liebana Date: Sat, 22 Oct 2016 23:36:07 +0200 Subject: src: add offset attribute for numgen expression Add support to add an offset to the numgen generated value. Example: ct mark set numgen inc mod 2 offset 100 This will generate marks with serie like 100, 101, 100, ... Signed-off-by: Laura Garcia Liebana Signed-off-by: Pablo Neira Ayuso --- tests/py/ip/numgen.t | 1 + 1 file changed, 1 insertion(+) (limited to 'tests') diff --git a/tests/py/ip/numgen.t b/tests/py/ip/numgen.t index 9ce0c714..29a6a105 100644 --- a/tests/py/ip/numgen.t +++ b/tests/py/ip/numgen.t @@ -2,5 +2,6 @@ *ip;test-ip4;pre ct mark set numgen inc mod 2;ok +ct mark set numgen inc mod 2 offset 100;ok dnat to numgen inc mod 2 map { 0 : 192.168.10.100, 1 : 192.168.20.200 };ok dnat to numgen inc mod 10 map { 0-5 : 192.168.10.100, 6-9 : 192.168.20.200};ok -- cgit v1.2.3