if (p->is_ip6() && (net_frag_offset == 0))
{
const ip::IP6Frag* const fragHdr = layer::get_inner_ip6_frag();
- if (ft->ip_proto != fragHdr->ip6f_nxt)
- {
- ft->ip_proto = fragHdr->ip6f_nxt;
- }
+ ft->ip_proto = fragHdr->ip6f_nxt;
}
/*
* truncated. Don't want to try to copy more than we actually
* captured. Use dsize as the frag length since it is distance
* between the last succesfully decoded layer (which is ip6_frag
- * or ipv4) and the end of packet, */
+ * or ipv4) and the end of packet, */
len = fragLength = p->dsize;
fragStart = p->data;
pkth->address_space_id = address_space_id;
}
-void TcpStreamSession::SwapPacketHeaderFoo()
-{
- if ( egress_index != DAQ_PKTHDR_UNKNOWN )
- {
- int32_t save_ingress_index;
- int32_t save_ingress_group;
-
- save_ingress_index = ingress_index;
- save_ingress_group = ingress_group;
- ingress_index = egress_index;
- ingress_group = egress_group;
- egress_index = save_ingress_index;
- egress_group = save_ingress_group;
- }
-}
-
void TcpStreamSession::reset()
{
if (tcp_init)
case SSN_DIR_BOTH:
case SSN_DIR_FROM_CLIENT:
case SSN_DIR_FROM_SERVER:
- if (flow->ssn_state.ignore_direction != dir)
- {
- flow->ssn_state.ignore_direction = dir;
- }
+ flow->ssn_state.ignore_direction = dir;
break;
}
}
#endif
- if (flow->ssn_state.snort_protocol_id != snort_protocol_id)
- {
- flow->ssn_state.snort_protocol_id = snort_protocol_id;
- }
+ flow->ssn_state.snort_protocol_id = snort_protocol_id;
}
SnortProtocolId Stream::get_snort_protocol_id(Flow* flow)
if (!flow)
return UNKNOWN_PROTOCOL_ID;
- if (flow->ssn_state.snort_protocol_id != id)
- {
- flow->ssn_state.snort_protocol_id = id;
- }
+ flow->ssn_state.snort_protocol_id = id;
if (!flow->ssn_state.ipprotocol)
set_ip_protocol(flow);
}
// FIXIT-H this is no longer called (but should be)
+#if 0
void TcpSession::swap_trackers()
{
uint32_t session_flags = flow->get_session_flags( );
flow->update_session_flags(session_flags);
}
}
+#endif
void TcpSession::NewTcpSessionOnSyn(TcpSegmentDescriptor& tsd)
{