From 63a47967d70c39179cf7cad67ffc1eb0c912adb2 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Antti=20T=C3=B6nkyr=C3=A4?= Date: Sat, 15 Aug 2015 20:58:56 +0000 Subject: [PATCH] source-pfring: don't set cluster mode when using ZC and VLAN tracking is disabled --- src/source-pfring.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/source-pfring.c b/src/source-pfring.c index 84fe0df615..3b2b52df23 100644 --- a/src/source-pfring.c +++ b/src/source-pfring.c @@ -517,8 +517,10 @@ TmEcode ReceivePfringThreadInit(ThreadVars *tv, void *initdata, void **data) ptv->vlan_disabled = 1; } - /* Since VLAN is disabled we force the cluster type to CLUSTER_FLOW_5_TUPLE */ - if (ptv->vlan_disabled == 1 && ptv->ctype == CLUSTER_FLOW) { + /* If VLAN tracking is disabled, set cluster type to 5-tuple or in case of a + * ZC interface, do nothing */ + if (ptv->vlan_disabled && ptv->ctype == CLUSTER_FLOW && + strncmp(ptv->interface, "zc", 2) != 0) { SCLogInfo("VLAN disabled, setting cluster type to CLUSTER_FLOW_5_TUPLE"); rc = pfring_set_cluster(ptv->pd, ptv->cluster_id, CLUSTER_FLOW_5_TUPLE); -- 2.47.3