Changeset View
Changeset View
Standalone View
Standalone View
sbin/ipfw/ipv6.c
Show First 20 Lines • Show All 342 Lines • ▼ Show 20 Lines | if (strcmp(av, "any") == 0) | ||||
return (1); | return (1); | ||||
if (strcmp(av, "me") == 0) { /* Set the data for "me" opt*/ | if (strcmp(av, "me") == 0) { /* Set the data for "me" opt*/ | ||||
cmd->o.len |= F_INSN_SIZE(ipfw_insn); | cmd->o.len |= F_INSN_SIZE(ipfw_insn); | ||||
return (1); | return (1); | ||||
} | } | ||||
if (strcmp(av, "me4") == 0) { /* Set the data for "me" opt*/ | |||||
rgrimes: Something seems wrong here, we are processing a me4 command inside an ipv6 only fill command? | |||||
cmd->o.len |= F_INSN_SIZE(ipfw_insn); | |||||
return (1); | |||||
} | |||||
if (strcmp(av, "me6") == 0) { /* Set the data for "me" opt*/ | if (strcmp(av, "me6") == 0) { /* Set the data for "me" opt*/ | ||||
cmd->o.len |= F_INSN_SIZE(ipfw_insn); | cmd->o.len |= F_INSN_SIZE(ipfw_insn); | ||||
return (1); | return (1); | ||||
} | } | ||||
if (strncmp(av, "table(", 6) == 0) { | if (strncmp(av, "table(", 6) == 0) { | ||||
fill_table(&cmd->o, av, O_IP_DST_LOOKUP, tstate); | fill_table(&cmd->o, av, O_IP_DST_LOOKUP, tstate); | ||||
return (1); | return (1); | ||||
▲ Show 20 Lines • Show All 166 Lines • Show Last 20 Lines |
Something seems wrong here, we are processing a me4 command inside an ipv6 only fill command?
Also why is this done as 3 if statements? Seems that:
if (strcmp(av, "me") == 0 || strcmp(av,"me6") ==0)
is the right way to do this.