napatech: Fix compiler issues w/out bypass

This commit fixes compiler errors when Napatech bypass is not configured
pull/5321/head
Jeff Lucovsky 5 years ago committed by Victor Julien
parent 81d7a7aa82
commit c408b15c51

@ -679,11 +679,11 @@ static void NapatechReleasePacket(struct Packet_ *p)
* If the packet is to be dropped we need to set the wirelength
* before releasing the Napatech buffer back to NTService.
*/
#ifdef NAPATECH_ENABLE_BYPASS
if (is_inline && PACKET_TEST_ACTION(p, ACTION_DROP)) {
p->ntpv.dyn3->wireLength = 0;
}
#ifdef NAPATECH_ENABLE_BYPASS
/*
* If this flow is to be programmed for hardware bypass we do it now. This is done
* here because the action is not available in the packet structure at the time of the
@ -847,11 +847,11 @@ TmEcode NapatechPacketLoop(ThreadVars *tv, void *data, void *slot)
SC_ATOMIC_ADD(stream_count, 1);
if (SC_ATOMIC_GET(stream_count) == NapatechGetNumConfiguredStreams()) {
#ifdef NAPATECH_ENABLE_BYPASS
if (ConfGetBool("napatech.inline", &is_inline) == 0) {
is_inline = 0;
}
#ifdef NAPATECH_ENABLE_BYPASS
/* Initialize the port map before we setup traffic filters */
for (int i = 0; i < MAX_PORTS; ++i) {
inline_port_map[i] = -1;

@ -1385,7 +1385,9 @@ uint32_t NapatechSetupTraffic(uint32_t first_stream, uint32_t last_stream)
NtConfigStream_t hconfig;
char ntpl_cmd[512];
int is_inline = 0;
#ifdef NAPATECH_ENABLE_BYPASS
int is_span_port[MAX_PORTS] = { 0 };
#endif
char span_ports[128];
memset(span_ports, 0, sizeof(span_ports));

Loading…
Cancel
Save