For default buffer filter, its 'interval' value is zero,
so here we should accept zero interval.

Signed-off-by: zhanghailiang <zhang.zhanghaili...@huawei.com>
Reviewed-by: Yang Hongyang <hongyang.y...@easystack.cn>
Cc: Jason Wang <jasow...@redhat.com>
---
v12:
- Add Reviewed-by tag
v11:
- Add comment
v10:
- new patch

Signed-off-by: zhanghailiang <zhang.zhanghaili...@huawei.com>
---
 net/filter-buffer.c | 10 ----------
 1 file changed, 10 deletions(-)

diff --git a/net/filter-buffer.c b/net/filter-buffer.c
index 9cf3544..8abac94 100644
--- a/net/filter-buffer.c
+++ b/net/filter-buffer.c
@@ -111,16 +111,6 @@ static void filter_buffer_setup(NetFilterState *nf, Error 
**errp)
     FilterBufferState *s = FILTER_BUFFER(nf);
     char *path = object_get_canonical_path_component(OBJECT(nf));
 
-    /*
-     * We may want to accept zero interval when VM FT solutions like MC
-     * or COLO use this filter to release packets on demand.
-     */
-    if (!s->interval) {
-        error_setg(errp, QERR_INVALID_PARAMETER_VALUE, "interval",
-                   "a non-zero interval");
-        return;
-    }
-
     s->incoming_queue = qemu_new_net_queue(qemu_netfilter_pass_to_next, nf);
     nf->is_default = !strcmp(path, "nop");
     /*
-- 
1.8.3.1



Reply via email to