summaryrefslogtreecommitdiffstats
path: root/net/bridge/netfilter/ebt_arpreply.c
diff options
context:
space:
mode:
authorJan Engelhardt2008-10-08 11:35:15 +0200
committerPatrick McHardy2008-10-08 11:35:15 +0200
commitf2ff525c8dae57b3cda51d76443f60f764f34202 (patch)
treeb28a6ed575375014dc14fc5b758e3d6da64977c2 /net/bridge/netfilter/ebt_arpreply.c
parentnetfilter: x_tables: output bad hook mask in hexadecimal (diff)
downloadkernel-qcow2-linux-f2ff525c8dae57b3cda51d76443f60f764f34202.tar.gz
kernel-qcow2-linux-f2ff525c8dae57b3cda51d76443f60f764f34202.tar.xz
kernel-qcow2-linux-f2ff525c8dae57b3cda51d76443f60f764f34202.zip
netfilter: ebtables: use generic table checking
Ebtables ORs (1 << NF_BR_NUMHOOKS) into the hook mask to indicate that the extension was called from a base chain. So this also needs to be present in the extensions' ->hooks. Signed-off-by: Jan Engelhardt <jengelh@medozas.de> Signed-off-by: Patrick McHardy <kaber@trash.net>
Diffstat (limited to 'net/bridge/netfilter/ebt_arpreply.c')
-rw-r--r--net/bridge/netfilter/ebt_arpreply.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/bridge/netfilter/ebt_arpreply.c b/net/bridge/netfilter/ebt_arpreply.c
index 8071b64af46f..0e51c8d7e5f2 100644
--- a/net/bridge/netfilter/ebt_arpreply.c
+++ b/net/bridge/netfilter/ebt_arpreply.c
@@ -73,8 +73,6 @@ ebt_arpreply_tg_check(const char *tablename, const void *entry,
e->invflags & EBT_IPROTO)
return false;
CLEAR_BASE_CHAIN_BIT;
- if (strcmp(tablename, "nat") || hookmask & ~(1 << NF_BR_PRE_ROUTING))
- return false;
return true;
}
@@ -82,6 +80,8 @@ static struct xt_target ebt_arpreply_tg_reg __read_mostly = {
.name = "arpreply",
.revision = 0,
.family = NFPROTO_BRIDGE,
+ .table = "nat",
+ .hooks = (1 << NF_BR_NUMHOOKS) | (1 << NF_BR_PRE_ROUTING),
.target = ebt_arpreply_tg,
.checkentry = ebt_arpreply_tg_check,
.targetsize = XT_ALIGN(sizeof(struct ebt_arpreply_info)),