aboutsummaryrefslogtreecommitdiff
path: root/include/net
diff options
context:
space:
mode:
authorLukas Straub <lukasstraub2@web.de>2019-10-24 16:25:48 +0200
committerJason Wang <jasowang@redhat.com>2020-03-03 18:04:47 +0800
commit1973136532f75fdcf78251317e3c97b950595155 (patch)
tree24c20bbf44f1ae2659698983685ca9d08c743bf5 /include/net
parent7b9e215ed6381a1447d016a397f8b07d9dc652d3 (diff)
net/filter.c: Add Options to insert filters anywhere in the filter list
To switch the Secondary to Primary, we need to insert new filters before the filter-rewriter. Add the options insert= and position= to be able to insert filters anywhere in the filter list. position should be "head" or "tail" to insert at the head or tail of the filter list or it should be "id=<id>" to specify the id of another filter. insert should be either "before" or "behind" to specify where to insert the new filter relative to the one specified with position. Signed-off-by: Lukas Straub <lukasstraub2@web.de> Reviewed-by: Zhang Chen <chen.zhang@intel.com> Signed-off-by: Jason Wang <jasowang@redhat.com>
Diffstat (limited to 'include/net')
-rw-r--r--include/net/filter.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/net/filter.h b/include/net/filter.h
index e8fb6259db..9393c59192 100644
--- a/include/net/filter.h
+++ b/include/net/filter.h
@@ -62,6 +62,8 @@ struct NetFilterState {
NetClientState *netdev;
NetFilterDirection direction;
bool on;
+ char *position;
+ bool insert_before_flag;
QTAILQ_ENTRY(NetFilterState) next;
};