From f4b8440fba4a07daec11cdc964ae58a75d3d1773 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Tue, 24 Mar 2009 08:27:41 +0100 Subject: [PATCH] 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. --- doc/changelog.txt | 1 + extensions/libxt_geoip.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/changelog.txt b/doc/changelog.txt index a292c7d..c447534 100644 --- a/doc/changelog.txt +++ b/doc/changelog.txt @@ -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) diff --git a/extensions/libxt_geoip.c b/extensions/libxt_geoip.c index ef95922..60b409c 100644 --- a/extensions/libxt_geoip.c +++ b/extensions/libxt_geoip.c @@ -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,