"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/preprocessors/Stream6/snort_stream_icmp.c" between
snort-2.9.16.1.tar.gz and snort-2.9.17.tar.gz

About: Snort is a network intrusion prevention and detection system (IDS/IPS) combining the benefits of signature, protocol and anomaly-based inspection.

snort_stream_icmp.c  (snort-2.9.16.1):snort_stream_icmp.c  (snort-2.9.17)
skipping to change at line 209 skipping to change at line 209
} }
/* Cleanup the proto specific data */ /* Cleanup the proto specific data */
session_api->free_protocol_session_pool( SESSION_PROTO_ICMP, ssn ); session_api->free_protocol_session_pool( SESSION_PROTO_ICMP, ssn );
ssn->proto_specific_data = NULL; ssn->proto_specific_data = NULL;
StreamResetFlowBits(ssn); StreamResetFlowBits(ssn);
session_api->free_application_data(ssn); session_api->free_application_data(ssn);
s5stats.icmp_sessions_released++; s5stats.icmp_sessions_released++;
s5stats.active_icmp_sessions--;
} }
uint32_t StreamGetIcmpPrunes(void) uint32_t StreamGetIcmpPrunes(void)
{ {
if( icmp_lws_cache ) if( icmp_lws_cache )
return session_api->get_session_prune_count( SESSION_PROTO_ICMP ); return session_api->get_session_prune_count( SESSION_PROTO_ICMP );
else else
return s5stats.icmp_prunes; return s5stats.icmp_prunes;
} }
skipping to change at line 370 skipping to change at line 371
} }
if (ssn) if (ssn)
{ {
/* Mark this session as dead. */ /* Mark this session as dead. */
DEBUG_WRAP(DebugMessage(DEBUG_STREAM_STATE, DEBUG_WRAP(DebugMessage(DEBUG_STREAM_STATE,
"Marking session as dead, per ICMP Unreachable!\n");); "Marking session as dead, per ICMP Unreachable!\n"););
ssn->ha_state.session_flags |= SSNFLAG_DROP_CLIENT; ssn->ha_state.session_flags |= SSNFLAG_DROP_CLIENT;
ssn->ha_state.session_flags |= SSNFLAG_DROP_SERVER; ssn->ha_state.session_flags |= SSNFLAG_DROP_SERVER;
ssn->session_state |= STREAM_STATE_UNREACH; ssn->session_state |= STREAM_STATE_UNREACH;
s5stats.active_icmp_sessions++;
} }
return 0; return 0;
} }
static int ProcessIcmpEcho(Packet *p) static int ProcessIcmpEcho(Packet *p)
{ {
//SessionKey skey; //SessionKey skey;
//SessionControlBlock *ssn = NULL; //SessionControlBlock *ssn = NULL;
s5stats.active_icmp_sessions++;
return 0; return 0;
} }
void IcmpUpdateDirection(SessionControlBlock *ssn, char dir, sfaddr_t* ip, uint1 6_t port) void IcmpUpdateDirection(SessionControlBlock *ssn, char dir, sfaddr_t* ip, uint1 6_t port)
{ {
IcmpSession *icmpssn = ssn->proto_specific_data->data; IcmpSession *icmpssn = ssn->proto_specific_data->data;
sfaddr_t tmpIp; sfaddr_t tmpIp;
if (!icmpssn) if (!icmpssn)
skipping to change at line 437 skipping to change at line 440
unsigned SessionICMPReloadAdjust(unsigned maxWork) unsigned SessionICMPReloadAdjust(unsigned maxWork)
{ {
return SessionProtocolReloadAdjust(icmp_lws_cache, session_configuration->ma x_icmp_sessions, return SessionProtocolReloadAdjust(icmp_lws_cache, session_configuration->ma x_icmp_sessions,
maxWork, 0 maxWork, 0
#ifdef REG_TEST #ifdef REG_TEST
, "ICMP" , "ICMP"
#endif #endif
); );
} }
#endif #endif
size_t get_icmp_used_mempool()
{
if (icmp_lws_cache && icmp_lws_cache->protocol_session_pool)
return icmp_lws_cache->protocol_session_pool->used_memory;
return 0;
}
 End of changes. 4 change blocks. 
0 lines changed or deleted 3 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)