diff options
author | Jan Engelhardt <jengelh@medozas.de> | 2008-10-08 13:35:14 +0400 |
---|---|---|
committer | Patrick McHardy <kaber@trash.net> | 2008-10-08 13:35:14 +0400 |
commit | 815377fe344c799228ca6278613ca3100b069ad5 (patch) | |
tree | 2d6cb0ea2f8fd484ec8cd740965226ad6a93c906 /net/bridge | |
parent | 001a18d369f4813ed792629ff4a9a6ade2a4a031 (diff) | |
download | linux-815377fe344c799228ca6278613ca3100b069ad5.tar.xz |
netfilter: ebt_among: obtain match size through different means
The function signatures will be changed to match those of Xtables, and
the datalen argument will be gone. ebt_among unfortunately relies on
it, so we need to obtain it somehow.
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Diffstat (limited to 'net/bridge')
-rw-r--r-- | net/bridge/netfilter/ebt_among.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/net/bridge/netfilter/ebt_among.c b/net/bridge/netfilter/ebt_among.c index 568c890887b5..88b5c9118a75 100644 --- a/net/bridge/netfilter/ebt_among.c +++ b/net/bridge/netfilter/ebt_among.c @@ -178,6 +178,8 @@ ebt_among_check(const char *tablename, unsigned int hookmask, const struct ebt_entry *e, void *data, unsigned int datalen) { + const struct ebt_entry_match *em = + container_of(data, const struct ebt_entry_match, data); const struct ebt_among_info *info = data; int expected_length = sizeof(struct ebt_among_info); const struct ebt_mac_wormhash *wh_dst, *wh_src; @@ -188,11 +190,11 @@ ebt_among_check(const char *tablename, unsigned int hookmask, expected_length += ebt_mac_wormhash_size(wh_dst); expected_length += ebt_mac_wormhash_size(wh_src); - if (datalen != EBT_ALIGN(expected_length)) { + if (em->match_size != EBT_ALIGN(expected_length)) { printk(KERN_WARNING "ebtables: among: wrong size: %d " "against expected %d, rounded to %Zd\n", - datalen, expected_length, + em->match_size, expected_length, EBT_ALIGN(expected_length)); return false; } |