diff options
author | Harald Welte <laforge@gnumonks.org> | 2001-08-06 18:50:21 +0000 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2001-08-06 18:50:21 +0000 |
commit | 3efb6ead2e51fe1eca55bcb2b06afb4dc4b8cb7c (patch) | |
tree | d7a51c0752b5a80c8408692277f2b660ce4dfc2b /ip6tables.c | |
parent | 2acb25b8d54cb7430f0751dd36861499e1cd28bd (diff) |
- added patch to support statically linking of iptables
- iptables-save/-restore is no longer experimental
Diffstat (limited to 'ip6tables.c')
-rw-r--r-- | ip6tables.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/ip6tables.c b/ip6tables.c index 2160950e..2d13f3af 100644 --- a/ip6tables.c +++ b/ip6tables.c @@ -684,6 +684,7 @@ find_match(const char *name, enum ip6t_tryload tryload) break; } +#ifndef NO_SHARED_LIBS if (!ptr && tryload != DONT_LOAD) { char path[sizeof(IP6T_LIB_DIR) + sizeof("/libip6t_.so") + strlen(name)]; @@ -701,6 +702,14 @@ find_match(const char *name, enum ip6t_tryload tryload) exit_error(PARAMETER_PROBLEM, "Couldn't load match `%s'\n", name); } +#else + if (ptr && !ptr->loaded) { + if (tryload != DONT_LOAD) + ptr->loaded = 1; + else + ptr = NULL; + } +#endif if (ptr) ptr->used = 1; @@ -881,6 +890,7 @@ find_target(const char *name, enum ip6t_tryload tryload) break; } +#ifndef NO_SHARED_LIBS if (!ptr && tryload != DONT_LOAD) { char path[sizeof(IP6T_LIB_DIR) + sizeof("/libip6t_.so") + strlen(name)]; @@ -898,6 +908,14 @@ find_target(const char *name, enum ip6t_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; |