]> git.ipfire.org Git - thirdparty/iptables.git/commitdiff
Fix returnvalue of TC_BUILTIN()
authorMartin Josefsson <gandalf@wlug.westbo.se>
Thu, 23 Sep 2004 18:23:20 +0000 (18:23 +0000)
committerMartin Josefsson <gandalf@wlug.westbo.se>
Thu, 23 Sep 2004 18:23:20 +0000 (18:23 +0000)
All jumps to nonexisting chains were believed to be jumps to builtin chains,
that's bad as it made it impossible to add rules with external targets.

libiptc/libiptc.c

index 957af672e769f50ea5a564092c0a5968b5ab9931..0058674e7fb153b7cb4f7784bab11c8fbf75c369 100644 (file)
@@ -1,4 +1,4 @@
-/* Library which manipulates firewall rules.  Version $Revision: 1.55 $ */
+/* Library which manipulates firewall rules.  Version $Revision: 1.56 $ */
 
 /* Architecture of firewall rules is as follows:
  *
@@ -1131,7 +1131,7 @@ TC_BUILTIN(const char *chain, const TC_HANDLE_T handle)
        c = iptcc_find_label(chain, handle);
        if (!c) {
                errno = ENOENT;
-               return -1;
+               return 0;
        }
 
        return iptcc_is_builtin(c);