diff options
author | Jan Engelhardt <jengelh@medozas.de> | 2009-06-25 12:32:12 -0400 |
---|---|---|
committer | Jan Engelhardt <jengelh@medozas.de> | 2010-02-15 10:59:28 -0500 |
commit | b402405d71beed8e4df354844353f66b4e18269f (patch) | |
tree | 20b149e61dc17a68c9b659afabe5f804724abb3d | |
parent | 2249065f4b22b493bae2caf549b86f175f33188e (diff) |
netfilter: xtables: print details on size mismatch
Print which revision has been used and which size are which
(kernel/user) for easier debugging.
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
-rw-r--r-- | net/netfilter/x_tables.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/net/netfilter/x_tables.c b/net/netfilter/x_tables.c index 255ab0657ce8..12503199826f 100644 --- a/net/netfilter/x_tables.c +++ b/net/netfilter/x_tables.c | |||
@@ -366,8 +366,10 @@ int xt_check_match(struct xt_mtchk_param *par, | |||
366 | * ebt_among is exempt from centralized matchsize checking | 366 | * ebt_among is exempt from centralized matchsize checking |
367 | * because it uses a dynamic-size data set. | 367 | * because it uses a dynamic-size data set. |
368 | */ | 368 | */ |
369 | pr_err("%s_tables: %s match: invalid size %u != %u\n", | 369 | pr_err("%s_tables: %s.%u match: invalid size " |
370 | "%u (kernel) != (user) %u\n", | ||
370 | xt_prefix[par->family], par->match->name, | 371 | xt_prefix[par->family], par->match->name, |
372 | par->match->revision, | ||
371 | XT_ALIGN(par->match->matchsize), size); | 373 | XT_ALIGN(par->match->matchsize), size); |
372 | return -EINVAL; | 374 | return -EINVAL; |
373 | } | 375 | } |
@@ -516,8 +518,10 @@ int xt_check_target(struct xt_tgchk_param *par, | |||
516 | unsigned int size, u_int8_t proto, bool inv_proto) | 518 | unsigned int size, u_int8_t proto, bool inv_proto) |
517 | { | 519 | { |
518 | if (XT_ALIGN(par->target->targetsize) != size) { | 520 | if (XT_ALIGN(par->target->targetsize) != size) { |
519 | pr_err("%s_tables: %s target: invalid size %u != %u\n", | 521 | pr_err("%s_tables: %s.%u target: invalid size " |
522 | "%u (kernel) != (user) %u\n", | ||
520 | xt_prefix[par->family], par->target->name, | 523 | xt_prefix[par->family], par->target->name, |
524 | par->target->revision, | ||
521 | XT_ALIGN(par->target->targetsize), size); | 525 | XT_ALIGN(par->target->targetsize), size); |
522 | return -EINVAL; | 526 | return -EINVAL; |
523 | } | 527 | } |