X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=ip6tables-save.c;h=37b1f197ef9ac89698482d14bafc70e2d48d98e2;hb=refs%2Fheads%2Fplanetlab-4_0-branch;hp=77cc3250e95bd64c5dc7ed33951f98ff4f902e98;hpb=f7b70cf9e00324b89b02de213bcd0dde7044d035;p=iptables.git diff --git a/ip6tables-save.c b/ip6tables-save.c index 77cc325..37b1f19 100644 --- a/ip6tables-save.c +++ b/ip6tables-save.c @@ -100,7 +100,7 @@ static int print_match(const struct ip6t_entry_match *e, const struct ip6t_ip6 *ip) { struct ip6tables_match *match - = find_match(e->u.user.name, TRY_LOAD); + = find_match(e->u.user.name, TRY_LOAD, NULL); if (match) { printf("-m %s ", e->u.user.name); @@ -149,7 +149,7 @@ static void print_rule(const struct ip6t_entry *e, /* print counters */ if (counters) - printf("[%llu:%llu] ", e->counters.pcnt, e->counters.bcnt); + printf("[%llu:%llu] ", (unsigned long long)e->counters.pcnt, (unsigned long long)e->counters.bcnt); /* print chain name */ printf("-A %s ", chain); @@ -277,7 +277,7 @@ static int do_output(const char *tablename) struct ip6t_counters count; printf("%s ", ip6tc_get_policy(chain, &count, &h)); - printf("[%llu:%llu]\n", count.pcnt, count.bcnt); + printf("[%llu:%llu]\n", (unsigned long long)count.pcnt, (unsigned long long)count.bcnt); } else { printf("- [0:0]\n"); } @@ -322,6 +322,10 @@ int main(int argc, char *argv[]) program_name = "ip6tables-save"; program_version = IPTABLES_VERSION; + lib_dir = getenv("IP6TABLES_LIB_DIR"); + if (!lib_dir) + lib_dir = IP6T_LIB_DIR; + #ifdef NO_SHARED_LIBS init_extensions(); #endif