Skip to content

Commit

Permalink
[NETFILTER]: x_tables: add more detail to error message about match/t…
Browse files Browse the repository at this point in the history
…arget mask mismatch

Signed-off-by: Balazs Scheidler <bazsi@balabit.hu>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Balazs Scheidler authored and David S. Miller committed Jul 11, 2007
1 parent 585426f commit 5faf415
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions net/netfilter/x_tables.c
Original file line number Diff line number Diff line change
Expand Up @@ -320,8 +320,8 @@ int xt_check_match(const struct xt_match *match, unsigned short family,
return -EINVAL;
}
if (match->hooks && (hook_mask & ~match->hooks) != 0) {
printk("%s_tables: %s match: bad hook_mask %u\n",
xt_prefix[family], match->name, hook_mask);
printk("%s_tables: %s match: bad hook_mask %u/%u\n",
xt_prefix[family], match->name, hook_mask, match->hooks);
return -EINVAL;
}
if (match->proto && (match->proto != proto || inv_proto)) {
Expand Down Expand Up @@ -410,8 +410,9 @@ int xt_check_target(const struct xt_target *target, unsigned short family,
return -EINVAL;
}
if (target->hooks && (hook_mask & ~target->hooks) != 0) {
printk("%s_tables: %s target: bad hook_mask %u\n",
xt_prefix[family], target->name, hook_mask);
printk("%s_tables: %s target: bad hook_mask %u/%u\n",
xt_prefix[family], target->name, hook_mask,
target->hooks);
return -EINVAL;
}
if (target->proto && (target->proto != proto || inv_proto)) {
Expand Down

0 comments on commit 5faf415

Please sign in to comment.