Cleanup of libnet patch.

remotes/origin/master-1.0.x
Victor Julien 16 years ago
parent 3678dda185
commit 01c0e316b9

@ -519,37 +519,34 @@ int SigParseAction(Signature *s, const char *action) {
if (strcasecmp(action, "alert") == 0) { if (strcasecmp(action, "alert") == 0) {
s->action = ACTION_ALERT; s->action = ACTION_ALERT;
return 0; return 0;
} else if(strcasecmp(action, "drop") == 0) { } else if (strcasecmp(action, "drop") == 0) {
s->action = ACTION_DROP; s->action = ACTION_DROP;
return 0; return 0;
} else if(strcasecmp(action, "pass") == 0) { } else if (strcasecmp(action, "pass") == 0) {
s->action = ACTION_PASS; s->action = ACTION_PASS;
return 0; return 0;
#ifdef HAVE_LIBNET11 #ifdef HAVE_LIBNET11
} else if(strcasecmp(action, "reject") == 0) { } else if (strcasecmp(action, "reject") == 0) {
s->action = ACTION_REJECT; s->action = ACTION_REJECT;
return 0; return 0;
} else if(strcasecmp(action, "rejectsrc") == 0) { } else if (strcasecmp(action, "rejectsrc") == 0) {
s->action = ACTION_REJECT; s->action = ACTION_REJECT;
return 0; return 0;
} else if(strcasecmp(action, "rejectdst") == 0) { } else if (strcasecmp(action, "rejectdst") == 0) {
s->action = ACTION_REJECT_DST; s->action = ACTION_REJECT_DST;
return 0; return 0;
} else if(strcasecmp(action, "rejectboth") == 0) { } else if (strcasecmp(action, "rejectboth") == 0) {
s->action = ACTION_REJECT_BOTH; s->action = ACTION_REJECT_BOTH;
return 0; return 0;
#else #else
} else if(strcasecmp(action, "reject") == 0) { } else if (strcasecmp(action, "reject") == 0 ||
SCLogError(SC_ERR_LIBNET_REQUIRED_FOR_ACTION,"Libnet 1.1.x is required for action \"%s\" and is not installed or could not be found",action); strcasecmp(action, "rejectsrc") == 0 ||
return -1; strcasecmp(action, "rejectdst") == 0 ||
} else if(strcasecmp(action, "rejectsrc") == 0) { strcasecmp(action, "rejectboth") == 0)
SCLogError(SC_ERR_LIBNET_REQUIRED_FOR_ACTION,"Libnet 1.1.x is required for action \"%s\" and is not installed or could not be found",action); {
return -1; SCLogError(SC_ERR_LIBNET_REQUIRED_FOR_ACTION, "Libnet 1.1.x is "
} else if(strcasecmp(action, "rejectdst") == 0) { "required for action \"%s\" but is not compiled into Suricata",
SCLogError(SC_ERR_LIBNET_REQUIRED_FOR_ACTION,"Libnet 1.1.x is required for action \"%s\" and is not installed or could not be found",action); action);
return -1;
} else if(strcasecmp(action, "rejectboth") == 0) {
SCLogError(SC_ERR_LIBNET_REQUIRED_FOR_ACTION,"Libnet 1.1.x is required for action \"%s\" and is not installed or could not be found",action);
return -1; return -1;
#endif /* HAVE_LIBNET11 */ #endif /* HAVE_LIBNET11 */
} else { } else {

Loading…
Cancel
Save