Project

General

Profile

Actions

Bug #99

closed

PF_RING option parsing now broken.

Added by Will Metcalf about 14 years ago. Updated about 14 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Target version:
Affected Versions:
Effort:
Difficulty:
Label:

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

0001-Fix-bug-99.patch (6.26 KB) 0001-Fix-bug-99.patch Jason Ish, 02/18/2010 12:54 AM
Actions #1

Updated by Jason Ish about 14 years ago

  • Status changed from New to Assigned
Actions #2

Updated by Jason Ish about 14 years ago

Fixed. Error in allow override handling and in ConfSet when it moved away from the hash table.

Actions #3

Updated by Jason Ish about 14 years ago

  • Status changed from Assigned to Resolved
Actions #4

Updated by Victor Julien about 14 years ago

  • Status changed from Resolved to Closed

Applied, thanks Jason.

Actions

Also available in: Atom PDF