diff options
author | Lukas Straub <lukasstraub2@web.de> | 2019-10-24 16:25:48 +0200 |
---|---|---|
committer | Jason Wang <jasowang@redhat.com> | 2020-03-03 18:04:47 +0800 |
commit | 1973136532f75fdcf78251317e3c97b950595155 (patch) | |
tree | 24c20bbf44f1ae2659698983685ca9d08c743bf5 /include | |
parent | 7b9e215ed6381a1447d016a397f8b07d9dc652d3 (diff) | |
download | qemu-1973136532f75fdcf78251317e3c97b950595155.zip qemu-1973136532f75fdcf78251317e3c97b950595155.tar.gz qemu-1973136532f75fdcf78251317e3c97b950595155.tar.bz2 |
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')
-rw-r--r-- | include/net/filter.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/net/filter.h b/include/net/filter.h index e8fb625..9393c59 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; }; |