[SMF/UPF] fix the bug for decoding IPFilter (977)
This commit is contained in:
parent
9a814ceac9
commit
dc870cc839
|
@ -45,7 +45,7 @@ int ogs_ipfw_compile_rule(ogs_ipfw_rule_t *ipfw_rule, char *flow_description)
|
|||
int rbufsize;
|
||||
struct ip_fw_rule *rule = (struct ip_fw_rule *)rulebuf;
|
||||
|
||||
int l;
|
||||
int x, l;
|
||||
ipfw_insn *cmd;
|
||||
|
||||
char *description = NULL;
|
||||
|
@ -92,9 +92,9 @@ int ogs_ipfw_compile_rule(ogs_ipfw_rule_t *ipfw_rule, char *flow_description)
|
|||
av[i] = NULL;
|
||||
|
||||
/* "to assigned" --> "to any" */
|
||||
for (i = 2; av[i] != NULL; i++) {
|
||||
if (strcmp(av[i], "assigned") == 0 && strcmp(av[i-1], "to") == 0) {
|
||||
av[i] = "any";
|
||||
for (x = 2; av[x] != NULL; x++) {
|
||||
if (strcmp(av[x], "assigned") == 0 && strcmp(av[x-1], "to") == 0) {
|
||||
av[x] = "any";
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue