[netfilter-cvslog] r7034 - in trunk/iptables: extensions include
kaber at trash.net
kaber at trash.net
Wed Sep 5 16:19:23 CEST 2007
Author: kaber at trash.net
Date: 2007-09-05 16:19:23 +0200 (Wed, 05 Sep 2007)
New Revision: 7034
Modified:
trunk/iptables/extensions/libxt_connbytes.c
trunk/iptables/include/xtables.h
Log:
Fix aligned_u64 type on 64 bit: its an unsigned long, not an unsigned long long.
Fixes compiler warning in quota match.
Modified: trunk/iptables/extensions/libxt_connbytes.c
===================================================================
--- trunk/iptables/extensions/libxt_connbytes.c 2007-09-05 14:10:53 UTC (rev 7033)
+++ trunk/iptables/extensions/libxt_connbytes.c 2007-09-05 14:19:23 UTC (rev 7034)
@@ -42,7 +42,8 @@
}
if (si->count.from > si->count.to)
exit_error(PARAMETER_PROBLEM, "%llu should be less than %llu",
- si->count.from, si->count.to);
+ (unsigned long long)si->count.from,
+ (unsigned long long)si->count.to);
}
/* Function which parses command options; returns true if it
@@ -152,11 +153,13 @@
struct xt_connbytes_info *sinfo = (struct xt_connbytes_info *)match->data;
if (sinfo->count.from > sinfo->count.to)
- printf("connbytes ! %llu:%llu ", sinfo->count.to,
- sinfo->count.from);
+ printf("connbytes ! %llu:%llu ",
+ (unsigned long long)sinfo->count.to,
+ (unsigned long long)sinfo->count.from);
else
- printf("connbytes %llu:%llu ",sinfo->count.from,
- sinfo->count.to);
+ printf("connbytes %llu:%llu ",
+ (unsigned long long)sinfo->count.from,
+ (unsigned long long)sinfo->count.to);
fputs("connbytes mode ", stdout);
print_mode(sinfo);
@@ -171,11 +174,13 @@
struct xt_connbytes_info *sinfo = (struct xt_connbytes_info *)match->data;
if (sinfo->count.from > sinfo->count.to)
- printf("! --connbytes %llu:%llu ", sinfo->count.to,
- sinfo->count.from);
+ printf("! --connbytes %llu:%llu ",
+ (unsigned long long)sinfo->count.to,
+ (unsigned long long)sinfo->count.from);
else
- printf("--connbytes %llu:%llu ", sinfo->count.from,
- sinfo->count.to);
+ printf("--connbytes %llu:%llu ",
+ (unsigned long long)sinfo->count.from,
+ (unsigned long long)sinfo->count.to);
fputs("--connbytes-mode ", stdout);
print_mode(sinfo);
Modified: trunk/iptables/include/xtables.h
===================================================================
--- trunk/iptables/include/xtables.h 2007-09-05 14:10:53 UTC (rev 7033)
+++ trunk/iptables/include/xtables.h 2007-09-05 14:19:23 UTC (rev 7034)
@@ -218,7 +218,7 @@
};
/* this is a special 64bit data type that is 8-byte aligned */
-#define aligned_u64 unsigned long long __attribute__((aligned(8)))
+#define aligned_u64 u_int64_t __attribute__((aligned(8)))
extern void exit_printhelp() __attribute__((noreturn));
extern void exit_tryhelp(int) __attribute__((noreturn));
More information about the netfilter-cvslog
mailing list