]> git.ipfire.org Git - thirdparty/xtables-addons.git/commitdiff
libxt_geoip: geoip: remove XT_ALIGN from .userspacesize when used with offsetof
authorJan Engelhardt <jengelh@medozas.de>
Tue, 24 Mar 2009 07:27:41 +0000 (08:27 +0100)
committerJan Engelhardt <jengelh@medozas.de>
Tue, 24 Mar 2009 07:27:41 +0000 (08:27 +0100)
XT_ALIGN rounds up to the nearest multiple of 64 bits, but that is wrong
for .userspacesize if it is less than .matchsize/.targetsize.

doc/changelog.txt
extensions/libxt_geoip.c

index a292c7dc9da81fdf146978f14a0a41f0018a28bd..c4475340cc129a8c00775babb8888496ae072f87 100644 (file)
@@ -1,6 +1,7 @@
 
 
 - fuzzy: need to account for kernel-level modified variables in .userspacesize
+- geoip: remove XT_ALIGN from .userspacesize when used with offsetof
 
 
 Xtables-addons 1.13 (March 23 2009)
index ef959222ce4c7a3cd122f100105ec570eb973f65..60b409ccb0f8ab5671ae9e4c688671302864e65c 100644 (file)
@@ -263,7 +263,7 @@ static struct xtables_match geoip_match = {
         .name          = "geoip",
         .version       = XTABLES_VERSION,
         .size          = XT_ALIGN(sizeof(struct xt_geoip_match_info)),
-        .userspacesize = XT_ALIGN(offsetof(struct xt_geoip_match_info, mem)),
+        .userspacesize = offsetof(struct xt_geoip_match_info, mem),
         .help          = geoip_help,
         .parse         = geoip_parse,
         .final_check   = geoip_final_check,