Skip to content

Commit

Permalink
netfilter: xtables: print details on size mismatch
Browse files Browse the repository at this point in the history
Print which revision has been used and which size are which
(kernel/user) for easier debugging.

Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
  • Loading branch information
Jan Engelhardt committed Feb 15, 2010
1 parent 2249065 commit b402405
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions net/netfilter/x_tables.c
Original file line number Diff line number Diff line change
Expand Up @@ -366,8 +366,10 @@ 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 %u != %u\n",
pr_err("%s_tables: %s.%u match: invalid size "
"%u (kernel) != (user) %u\n",
xt_prefix[par->family], par->match->name,
par->match->revision,
XT_ALIGN(par->match->matchsize), size);
return -EINVAL;
}
Expand Down Expand Up @@ -516,8 +518,10 @@ 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 %u != %u\n",
pr_err("%s_tables: %s.%u target: invalid size "
"%u (kernel) != (user) %u\n",
xt_prefix[par->family], par->target->name,
par->target->revision,
XT_ALIGN(par->target->targetsize), size);
return -EINVAL;
}
Expand Down

0 comments on commit b402405

Please sign in to comment.