net/filter.c: Add Options to insert filters anywhere in the filter list
commit1973136532f75fdcf78251317e3c97b950595155
authorLukas Straub <lukasstraub2@web.de>
Thu, 24 Oct 2019 14:25:48 +0000 (24 16:25 +0200)
committerJason Wang <jasowang@redhat.com>
Tue, 3 Mar 2020 10:04:47 +0000 (3 18:04 +0800)
tree24c20bbf44f1ae2659698983685ca9d08c743bf5
parent7b9e215ed6381a1447d016a397f8b07d9dc652d3
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>
include/net/filter.h
net/filter.c
qemu-options.hx