Project

General

Profile

Actions

Bug #2899

closed

Suricata 4.1.2 and up to 5.x Dev branch - Make compile issue when using PF_ring library on Redhat only

Added by Jake Babbin about 5 years ago. Updated about 5 years ago.

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

Description

Discovered a bug that appears when compiling Suricata 4.x up to the current 5.x Dev branches.

When compiling with PF_Ring support a single line change is required in order to get Suricata to compile on Redhat 6.x.

File:
"src/source-pfring.c"

Snippet from the original Code
154 ChecksumValidationMode checksum_mode;
155
156 bool vlan_hdr_warned;
157 } PfringThreadVars;
158
159 /**
CHANGE TO (NOTING THE ADDITION Of “_” to the line)
154 ChecksumValidationMode checksum_mode;
155
156 bool vlan_hdr_warned;
157 } PfringThreadVars_;
158
159 /**

Configure options to replicate:
./configure --enable-pfring --enable-af-packet --enable-lua --enable-geoip --with-libpcap-include=/usr/local/pfring/include --with-libpcap-libraries=/usr/local/pfring/lib -- with=libpfring-includes=/usr/local/pfring/include --with-libpfring-libraries=/usr/local/pfring/lib

If the source file is not corrected then the 'make' command is issued to build the Suricata tool this is the error you will get


CC source-pfring.o
source-pfring.c:157: error: redefinition of typedef ‘PfringThreadVars’
source-pfring.h:31: note: previous declaration of ‘PfringThreadVars’ was here
make[2]: *** [source-pfring.o] Error 1
make[2]: Leaving directory `/home/suricatauser/GIT_Suricata/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/suricatauser/GIT_Suricata'
make: *** [all] Error 2

Actions

Also available in: Atom PDF