libxt_geoip: geoip: remove XT_ALIGN from .userspacesize when used with offsetof

XT_ALIGN rounds up to the nearest multiple of 64 bits, but that is wrong
for .userspacesize if it is less than .matchsize/.targetsize.
This commit is contained in:
Jan Engelhardt
2009-03-24 08:27:41 +01:00
parent d3ee3a0c3c
commit f4b8440fba
2 changed files with 2 additions and 1 deletions

View 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)

View 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,