]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - net/netfilter/x_tables.c
netfilter: x_tables: don't reject valid target size on some architectures
[karo-tx-linux.git] / net / netfilter / x_tables.c
index 3d2cdcd50832895ffdfae3bf87d7cdda8259aae0..4cac7b65c742c5d54afe241fe17ef763d2539f35 100644 (file)
@@ -608,7 +608,7 @@ int xt_compat_check_entry_offsets(const void *base, const char *elems,
                return -EINVAL;
 
        if (strcmp(t->u.user.name, XT_STANDARD_TARGET) == 0 &&
-           target_offset + sizeof(struct compat_xt_standard_target) != next_offset)
+           COMPAT_XT_ALIGN(target_offset + sizeof(struct compat_xt_standard_target)) != next_offset)
                return -EINVAL;
 
        /* compat_xt_entry match has less strict aligment requirements,
@@ -690,7 +690,7 @@ int xt_check_entry_offsets(const void *base,
                return -EINVAL;
 
        if (strcmp(t->u.user.name, XT_STANDARD_TARGET) == 0 &&
-           target_offset + sizeof(struct xt_standard_target) != next_offset)
+           XT_ALIGN(target_offset + sizeof(struct xt_standard_target)) != next_offset)
                return -EINVAL;
 
        return xt_check_entry_match(elems, base + target_offset,