From 8e53fe8cf7a178cf9702fb1bb916f4645058e5e7 Mon Sep 17 00:00:00 2001 From: Joe Stringer Date: Fri, 18 Sep 2015 13:58:00 -0700 Subject: Add connection tracking mark support. This patch adds a new 32-bit metadata field to the connection tracking interface. When a mark is specified as part of the ct action and the connection is committed, the value is saved with the current connection. Subsequent ct lookups with the table specified will expose this metadata as the "ct_mark" field in the flow. For example, to allow new TCP connections from port 1->2 and only allow established connections from port 2->1, and to associate a mark with those connections: table=0,priority=1,action=drop table=0,arp,action=normal table=0,in_port=1,tcp,action=ct(commit,exec(set_field:1->ct_mark)),2 table=0,in_port=2,ct_state=-trk,tcp,action=ct(table=1) table=1,in_port=2,ct_state=+trk,ct_mark=1,tcp,action=1 Signed-off-by: Joe Stringer Acked-by: Jarno Rajahalme Acked-by: Ben Pfaff --- tests/test-odp.c | 1 + 1 file changed, 1 insertion(+) (limited to 'tests/test-odp.c') diff --git a/tests/test-odp.c b/tests/test-odp.c index 0e65ced34..245e1f9dc 100644 --- a/tests/test-odp.c +++ b/tests/test-odp.c @@ -60,6 +60,7 @@ parse_keys(bool wc_keys) .recirc = true, .ct_state = true, .ct_zone = true, + .ct_mark = true, }, }; -- cgit v1.2.1