diff --git a/lib/ipfw/ipfw2.c b/lib/ipfw/ipfw2.c index b8ef6ee77..c301c84b5 100644 --- a/lib/ipfw/ipfw2.c +++ b/lib/ipfw/ipfw2.c @@ -3269,8 +3269,16 @@ add_proto0(ipfw_insn *cmd, char *av, u_char *protop) proto = strtol(av, &ep, 10); if (*ep != '\0' || proto <= 0) { +#if 0 /* modified by acetcom */ if ((pe = getprotobyname(av)) == NULL) return NULL; +#else + if ((pe = getprotobyname(av)) == NULL) { + ogs_fatal("getprotobyname('%s') failed", av); + ogs_assert_if_reached(); + return NULL; + } +#endif proto = pe->p_proto; } diff --git a/lib/ipfw/ipfw2.h b/lib/ipfw/ipfw2.h index 877053454..29becc877 100644 --- a/lib/ipfw/ipfw2.h +++ b/lib/ipfw/ipfw2.h @@ -29,6 +29,8 @@ * XXX The context is not restored after each line. */ +#include "ogs-ipfw.h" + struct cmdline_opts { /* boolean options: */ int do_value_as_ip; /* show table value as IP */ diff --git a/lib/ipfw/ogs-ipfw.c b/lib/ipfw/ogs-ipfw.c index 96c18b265..203a9ed3d 100644 --- a/lib/ipfw/ogs-ipfw.c +++ b/lib/ipfw/ogs-ipfw.c @@ -24,8 +24,6 @@ #endif #endif -#include "ogs-ipfw.h" - #include "ipfw2.h" #include "objs/include_e/netinet/ip_fw.h"