"Fossies" - the Fresh Open Source Software Archive  

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

detector_smtp.c  (snort-2.9.16.1):detector_smtp.c  (snort-2.9.17)
skipping to change at line 1062 skipping to change at line 1062
break; break;
case SMTP_SERVICE_STATE_HELO: case SMTP_SERVICE_STATE_HELO:
switch (fd->code) switch (fd->code)
{ {
case 250: case 250:
fd->state = SMTP_SERVICE_STATE_TRANSFER; fd->state = SMTP_SERVICE_STATE_TRANSFER;
break; break;
case 220: case 220:
case 500: case 500:
case 501: case 501:
case 502:
case 504: case 504:
break; break;
case 421: case 421:
case 553: case 553:
fd->state = SMTP_SERVICE_STATE_CONNECTION_ERROR; fd->state = SMTP_SERVICE_STATE_CONNECTION_ERROR;
break; break;
default: default:
goto fail; goto fail;
} }
break; break;
skipping to change at line 1101 skipping to change at line 1102
/* STARTTLS failed. Fall through and call this SMTP */ /* STARTTLS failed. Fall through and call this SMTP */
case SMTP_SERVICE_STATE_TRANSFER: case SMTP_SERVICE_STATE_TRANSFER:
goto success; goto success;
case SMTP_SERVICE_STATE_BAD_CLIENT: case SMTP_SERVICE_STATE_BAD_CLIENT:
switch (fd->code) switch (fd->code)
{ {
case 500: case 500:
case 501: case 501:
case 502: case 502:
case 550: case 550:
goto success; goto not_compatible;
} }
case SMTP_SERVICE_STATE_CONNECTION_ERROR: case SMTP_SERVICE_STATE_CONNECTION_ERROR:
default: default:
goto fail; goto fail;
} }
} }
inprocess: inprocess:
smtp_service_mod.api->service_inprocess(flowp, args->pkt, args->dir, &svc_el ement, NULL); smtp_service_mod.api->service_inprocess(flowp, args->pkt, args->dir, &svc_el ement, NULL);
return SERVICE_INPROCESS; return SERVICE_INPROCESS;
skipping to change at line 1125 skipping to change at line 1126
setAppIdFlag(flowp, APPID_SESSION_CONTINUE); setAppIdFlag(flowp, APPID_SESSION_CONTINUE);
smtp_service_mod.api->add_service(flowp, args->pkt, args->dir, &svc_element, smtp_service_mod.api->add_service(flowp, args->pkt, args->dir, &svc_element,
APP_ID_SMTP, NULL, NULL, NULL, NULL); APP_ID_SMTP, NULL, NULL, NULL, NULL);
return SERVICE_SUCCESS; return SERVICE_SUCCESS;
fail: fail:
smtp_service_mod.api->fail_service(flowp, args->pkt, args->dir, &svc_element , smtp_service_mod.api->fail_service(flowp, args->pkt, args->dir, &svc_element ,
smtp_service_mod.flow_data_index, args->p Config, NULL); smtp_service_mod.flow_data_index, args->p Config, NULL);
return SERVICE_NOMATCH; return SERVICE_NOMATCH;
not_compatible:
smtp_service_mod.api->incompatible_data(flowp, args->pkt, args->dir, &svc_el
ement,
smtp_service_mod.flow_data_index, ar
gs->pConfig, NULL);
return SERVICE_NOT_COMPATIBLE;
} }
 End of changes. 3 change blocks. 
1 lines changed or deleted 9 lines changed or added

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