From: Marc Boucher Date: Sun, 24 Mar 2002 15:09:31 +0000 (+0000) Subject: make find_target() and find_match() honor LOAD_MUST_SUCCEED when NO_SHARED_LIBS X-Git-Tag: v1.2.7~60 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=067477b4cabfea38d8dd6394194b75083e504615;p=thirdparty%2Fiptables.git make find_target() and find_match() honor LOAD_MUST_SUCCEED when NO_SHARED_LIBS is defined. --- diff --git a/ip6tables.c b/ip6tables.c index b4d6ea55..dad9052d 100644 --- a/ip6tables.c +++ b/ip6tables.c @@ -740,6 +740,10 @@ find_match(const char *name, enum ip6t_tryload tryload) else ptr = NULL; } + if(!ptr && (tryload == LOAD_MUST_SUCCEED)) { + exit_error(PARAMETER_PROBLEM, + "Couldn't find match `%s'\n", name); + } #endif if (ptr) @@ -952,6 +956,10 @@ find_target(const char *name, enum ip6t_tryload tryload) else ptr = NULL; } + if(!ptr && (tryload == LOAD_MUST_SUCCEED)) { + exit_error(PARAMETER_PROBLEM, + "Couldn't find target `%s'\n", name); + } #endif if (ptr) diff --git a/iptables.c b/iptables.c index 8e4c13af..b5d35791 100644 --- a/iptables.c +++ b/iptables.c @@ -681,6 +681,10 @@ find_match(const char *name, enum ipt_tryload tryload) else ptr = NULL; } + if(!ptr && (tryload == LOAD_MUST_SUCCEED)) { + exit_error(PARAMETER_PROBLEM, + "Couldn't find match `%s'\n", name); + } #endif if (ptr) @@ -952,6 +956,10 @@ find_target(const char *name, enum ipt_tryload tryload) else ptr = NULL; } + if(!ptr && (tryload == LOAD_MUST_SUCCEED)) { + exit_error(PARAMETER_PROBLEM, + "Couldn't find target `%s'\n", name); + } #endif if (ptr)