int AFPRunModeIsIPS(void)
{
- int nlive = LiveGetDeviceCount();
+ int nlive = LiveGetDeviceNameCount();
int ldev;
ConfNode *if_root;
ConfNode *if_default = NULL;
if_default = ConfNodeLookupKeyValue(af_packet_node, "interface", "default");
for (ldev = 0; ldev < nlive; ldev++) {
- const char *live_dev = LiveGetDeviceName(ldev);
+ const char *live_dev = LiveGetDeviceNameName(ldev);
if (live_dev == NULL) {
SCLogError(SC_ERR_INVALID_VALUE, "Problem with config file");
return 0;
"AF_PACKET using both IPS and TAP/IDS mode, this will not "
"be allowed in Suricata 8 due to undefined behavior. See ticket #5588.");
for (ldev = 0; ldev < nlive; ldev++) {
- const char *live_dev = LiveGetDeviceName(ldev);
+ const char *live_dev = LiveGetDeviceNameName(ldev);
if (live_dev == NULL) {
SCLogError(SC_ERR_INVALID_VALUE, "Problem with config file");
return 0;
int NetmapRunModeIsIPS(void)
{
- int nlive = LiveGetDeviceCount();
+ int nlive = LiveGetDeviceNameCount();
int ldev;
ConfNode *if_root;
ConfNode *if_default = NULL;
if_default = ConfNodeLookupKeyValue(netmap_node, "interface", "default");
for (ldev = 0; ldev < nlive; ldev++) {
- const char *live_dev = LiveGetDeviceName(ldev);
+ const char *live_dev = LiveGetDeviceNameName(ldev);
if (live_dev == NULL) {
SCLogError(SC_ERR_INVALID_VALUE, "Problem with config file");
return 0;
"Netmap using both IPS and TAP/IDS mode, this will not be "
"allowed in Suricata 8 due to undefined behavior. See ticket #5588.");
for (ldev = 0; ldev < nlive; ldev++) {
- const char *live_dev = LiveGetDeviceName(ldev);
+ const char *live_dev = LiveGetDeviceNameName(ldev);
if (live_dev == NULL) {
SCLogError(SC_ERR_INVALID_VALUE, "Problem with config file");
return 0;
}
}
-static int PostDeviceFinalizedSetup(SCInstance *suri)
+static void RunModeEngineIsIPS(SCInstance *suri)
{
- SCEnter();
-
#ifdef HAVE_AF_PACKET
if (suri->run_mode == RUNMODE_AFP_DEV) {
if (AFPRunModeIsIPS()) {
MacSetRegisterFlowStorage();
+ /* set engine mode if L2 IPS */
+ RunModeEngineIsIPS(suri);
+
AppLayerSetup();
/* Suricata will use this umask if provided. By default it will use the
LiveDeviceFinalize();
- /* set engine mode if L2 IPS */
- if (PostDeviceFinalizedSetup(suri) != TM_ECODE_OK) {
- exit(EXIT_FAILURE);
- }
-
/* hostmode depends on engine mode being set */
PostConfLoadedSetupHostMode();