From a1187fff744cf407c010fb52a482950d958dbf02 Mon Sep 17 00:00:00 2001 From: laforge Date: Mon, 6 Aug 2001 18:50:21 +0000 Subject: - added patch to support statically linking of iptables - iptables-save/-restore is no longer experimental --- iptables.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'iptables.c') diff --git a/iptables.c b/iptables.c index 55420ab..7f4c892 100644 --- a/iptables.c +++ b/iptables.c @@ -649,6 +649,7 @@ find_match(const char *name, enum ipt_tryload tryload) break; } +#ifndef NO_SHARED_LIBS if (!ptr && tryload != DONT_LOAD) { char path[sizeof(IPT_LIB_DIR) + sizeof("/libipt_.so") + strlen(name)]; @@ -667,6 +668,14 @@ find_match(const char *name, enum ipt_tryload tryload) "Couldn't load match `%s':%s\n", name, dlerror()); } +#else + if (ptr && !ptr->loaded) { + if (tryload != DONT_LOAD) + ptr->loaded = 1; + else + ptr = NULL; + } +#endif if (ptr) ptr->used = 1; @@ -904,6 +913,7 @@ find_target(const char *name, enum ipt_tryload tryload) break; } +#ifndef NO_SHARED_LIBS if (!ptr && tryload != DONT_LOAD) { char path[sizeof(IPT_LIB_DIR) + sizeof("/libipt_.so") + strlen(name)]; @@ -921,6 +931,14 @@ find_target(const char *name, enum ipt_tryload tryload) "Couldn't load target `%s':%s\n", name, dlerror()); } +#else + if (ptr && !ptr->loaded) { + if (tryload != DONT_LOAD) + ptr->loaded = 1; + else + ptr = NULL; + } +#endif if (ptr) ptr->used = 1; -- cgit v1.2.3