Bug #99
closedPF_RING option parsing now broken.
Description
Something appears to have broken PF_RING maybe stuff related to conf compiler warnings I now receive. Ish, any ideas? It seems to break with commits more recent than. 38dc7ffebcc138023b66c1feffa7568623e8073d.
LD_LIBRARY_PATH="/opt/PF_RING/lib:/usr/lib:/usr/local/lib" src/suricata -c suricata.yaml --pfring-int=eth1 --pfring-clusterid=99 --dump-config
produces the following opts.
pfring = (null)
pfring.interface = eth1
clusterid = 99
clusterid should be pfring.clusterid via this bit of code.
else if(strcmp((long_opts[option_index]).name , "pfring-clusterid") == 0){
printf ("clusterid %s\n",optarg);
if (ConfSet("pfring.clusterid", optarg, 0) != 1) {
fprintf(stderr, "ERROR: Failed to set pfring clusterid.\n");
exit(EXIT_FAILURE);
}
}
although strangely I end up with this as well
logging.interface = eth0
logging.clusterid = 99
I get the following running the same command with commit 38dc7ffebcc138023b66c1feffa7568623e8073d.
pfring.clusterid = 99
pfring.interface = eth1
This is the bit of code that fails in source-pfring.c.
if (ConfGet("pfring.clusterid", &tmpclusterid) != 1){
printf("could not get pfring.clusterid\n");
return TM_ECODE_FAILED;
These are the compiler warnings I now receive.
conf.c: In function ‘ConfGetNode’:
conf.c:104: warning: ‘saveptr’ may be used uninitialized in this function
conf.c: In function ‘ConfSet’:
conf.c:147: warning: ‘saveptr’ may be used uninitialized in this function
Files