small fixes for Wills patch

remotes/origin/master-1.0.x
Victor Julien 17 years ago
parent 559edc01e3
commit 41647a5430

@ -1,6 +1,6 @@
/* Copyright (c) 2008 Victor Julien <victor@inliniac.net> */ /* Copyright (c) 2008 Victor Julien <victor@inliniac.net> */
#ifndef __ACTION_GLOBALS_H__ #ifndef __ACTION_GLOBALS_H__
#define __DECODE_H__ #define __ACTION_GLOBALS_H__
#define ACTION_ALERT 0 #define ACTION_ALERT 0
#define ACTION_DROP 1 #define ACTION_DROP 1

@ -328,21 +328,21 @@ int SigParsePort(Signature *s, const char *portstr, char flag) {
return 0; return 0;
} }
int SigParseAction(Signature *s, const char *action){ 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;
} 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 { } else {
return -1; return -1;
} }
} }

Loading…
Cancel
Save