The problem with not being able to get zbalance_ipc to read it's options from a
file appear to be some bad code in PF_RING/userland/examples_zc/zutils.c.  This
patch fixes it for me.

# diff -u zutils.c.orig zutils.c
--- zutils.c.orig       2019-12-09 16:04:44.866959192 -0800
+++ zutils.c    2019-12-09 16:05:18.919730468 -0800
@@ -190,7 +190,6 @@
         break;
       else if(line[i] == ' ') {
         line[i] = '=';
-        break;
       }
       i++;
     }
@@ -226,7 +225,7 @@
       if(argument[0] != '\0')
        opt_argv[opt_argc++] = strdup(argument);

-      tok = strtok(NULL, "\n");
+      tok = strtok(NULL, "=");
     }
   }

It wasn't replacing all the spaces with "=", and the NULL strtok to get the
next token was then taking the entire line up to the newline as the next token
instead of picking the next token up to the next "=".


Mike


On 12/9/19 4:25 PM, Mike Iglesias wrote:
> Correction: We're using the RPM package pfring-7.4.0-2768.x86_64.  I was
> looking at the GIT repo code, which is version 7.5.0-2747.
> 
> 
> On 12/9/19 3:45 PM, Mike Iglesias wrote:
>> I'm trying to set up the systemctl cluster@ files to use zbalance_ipc to
>> balance a stream.  In /etc/cluster/cluster-99.conf I have this:
>>
>> -i p1p1 -m 2 -n 2 -g 2 -c 99
>>
>> I copied /lib/systemd/system/[email protected] to
>> /etc/systemd/system/[email protected].  When I try to start it I get an 
>> error
>> from systemctl saying that the service didn't start.
>>
>> If I do this:
>>
>> zbalance_ipc /etc/cluster/cluster-99.conf
>>
>> I get the help output with all the options to the zbalance_ipc program, so it
>> doesn't like something in the cluster-99.conf file.  If I run zbalance_ipc 
>> with
>> the options in the cluster-99.conf file on the command line it works.
>>
>> I'm using version 7.5.0-2747.
>>
>>
> 
> _______________________________________________
> Ntop-misc mailing list
> [email protected]
> http://listgateway.unipi.it/mailman/listinfo/ntop-misc
> 

_______________________________________________
Ntop-misc mailing list
[email protected]
http://listgateway.unipi.it/mailman/listinfo/ntop-misc

Reply via email to