"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/dynamic-preprocessors/sdf/spp_sdf.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.

spp_sdf.c  (snort-2.9.16.1):spp_sdf.c  (snort-2.9.17)
skipping to change at line 522 skipping to change at line 522
/* Retrieve the corresponding config for this packet */ /* Retrieve the corresponding config for this packet */
policy_id = _dpd.getIpsRuntimePolicy(); policy_id = _dpd.getIpsRuntimePolicy();
sfPolicyUserPolicySet (sdf_context->context_id, policy_id); sfPolicyUserPolicySet (sdf_context->context_id, policy_id);
config = sfPolicyUserDataGetCurrent(sdf_context->context_id); config = sfPolicyUserDataGetCurrent(sdf_context->context_id);
/* Retrieve stream session data. Create one if it doesn't exist. */ /* Retrieve stream session data. Create one if it doesn't exist. */
session = _dpd.sessionAPI->get_application_data(packet->stream_session, PP_S DF); session = _dpd.sessionAPI->get_application_data(packet->stream_session, PP_S DF);
if (session == NULL) if (session == NULL)
{ {
char pseudo_start = 0; char pseudo_start[1] = {'0'};
/* Do port checks */ /* Do port checks */
if (SDFCheckPorts(config, packet) == 0) if (SDFCheckPorts(config, packet) == 0)
{ {
return; return;
} }
/* If there's no stream session, we'll just count PII for one packet */ /* If there's no stream session, we'll just count PII for one packet */
if (packet->stream_session == NULL) if (packet->stream_session == NULL)
{ {
if (config->stateless_session == NULL) if (config->stateless_session == NULL)
config->stateless_session = NewSDFSession(config, packet); config->stateless_session = NewSDFSession(config, packet);
session = config->stateless_session; session = config->stateless_session;
memset(session->counters, 0, session->num_patterns); memset(session->counters, 0, session->num_patterns);
memset(session->rtns_matched, 0, session->num_patterns); memset(session->rtns_matched, 0, session->num_patterns);
} }
else else
session = NewSDFSession(config, packet); session = NewSDFSession(config, packet);
/* Add one byte to support sensitive data starts with first byte */ /* Add one byte to support sensitive data starts with first byte */
begin = &pseudo_start; begin = pseudo_start;
buflen = 1; buflen = 1;
end = begin + buflen; end = begin + buflen;
SDFSearch(config, packet, session, begin, end, buflen, &ob_failed); SDFSearch(config, packet, session, begin, end, buflen, &ob_failed);
} }
else if( session->config_num != config->config_num ) else if( session->config_num != config->config_num )
{ {
/* Config has changed. Don't use rule tree nodes from previous config */ /* Config has changed. Don't use rule tree nodes from previous config */
session->part_match_index = 0; session->part_match_index = 0;
session->part_match_node = NULL; session->part_match_node = NULL;
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added

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