]> git.ipfire.org Git - thirdparty/iptables.git/commitdiff
make find_target() and find_match() honor LOAD_MUST_SUCCEED when NO_SHARED_LIBS
authorMarc Boucher <marc@mbsi.ca>
Sun, 24 Mar 2002 15:09:31 +0000 (15:09 +0000)
committerMarc Boucher <marc@mbsi.ca>
Sun, 24 Mar 2002 15:09:31 +0000 (15:09 +0000)
is defined.

ip6tables.c
iptables.c

index b4d6ea550fa6c882a7c64bae30bce9dda8023cee..dad9052d74f423970c47618a6b8ae7d9221fb239 100644 (file)
@@ -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)
index 8e4c13af984ad35a1209ff4b001b5b2cf6443cf2..b5d35791b186080c3dc549b1ac5ab5d5f9a84b93 100644 (file)
@@ -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)