Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 184157
b: refs/heads/master
c: 42107f5
h: refs/heads/master
i:
  184155: 621d6c6
v: v3
  • Loading branch information
Alexey Dobriyan authored and Patrick McHardy committed Feb 10, 2010
1 parent bc6044b commit 2d276f0
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 0a02604628c49037e1de2091d75462fd856b26ed
refs/heads/master: 42107f5009da223daa800d6da6904d77297ae829
13 changes: 9 additions & 4 deletions trunk/include/linux/netfilter/x_tables.h
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,7 @@ struct _xt_align {
__u64 u64;
};

#define XT_ALIGN(s) (((s) + (__alignof__(struct _xt_align)-1)) \
& ~(__alignof__(struct _xt_align)-1))
#define XT_ALIGN(s) ALIGN((s), __alignof__(struct _xt_align))

/* Standard return verdict, or do jump. */
#define XT_STANDARD_TARGET ""
Expand Down Expand Up @@ -571,8 +570,14 @@ struct compat_xt_counters_info {
struct compat_xt_counters counters[0];
};

#define COMPAT_XT_ALIGN(s) (((s) + (__alignof__(struct compat_xt_counters)-1)) \
& ~(__alignof__(struct compat_xt_counters)-1))
struct _compat_xt_align {
__u8 u8;
__u16 u16;
__u32 u32;
compat_u64 u64;
};

#define COMPAT_XT_ALIGN(s) ALIGN((s), __alignof__(struct _compat_xt_align))

extern void xt_compat_lock(u_int8_t af);
extern void xt_compat_unlock(u_int8_t af);
Expand Down
4 changes: 2 additions & 2 deletions trunk/net/netfilter/x_tables.c
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ int xt_check_match(struct xt_mtchk_param *par,
* ebt_among is exempt from centralized matchsize checking
* because it uses a dynamic-size data set.
*/
pr_err("%s_tables: %s match: invalid size %Zu != %u\n",
pr_err("%s_tables: %s match: invalid size %u != %u\n",
xt_prefix[par->family], par->match->name,
XT_ALIGN(par->match->matchsize), size);
return -EINVAL;
Expand Down Expand Up @@ -514,7 +514,7 @@ int xt_check_target(struct xt_tgchk_param *par,
unsigned int size, u_int8_t proto, bool inv_proto)
{
if (XT_ALIGN(par->target->targetsize) != size) {
pr_err("%s_tables: %s target: invalid size %Zu != %u\n",
pr_err("%s_tables: %s target: invalid size %u != %u\n",
xt_prefix[par->family], par->target->name,
XT_ALIGN(par->target->targetsize), size);
return -EINVAL;
Expand Down

0 comments on commit 2d276f0

Please sign in to comment.