[NETFILTER]: ebtables: don't compute gap before checking struct type
authorChuck Ebbert <76306.1226@compuserve.com>
Thu, 4 Jan 2007 20:17:44 +0000 (12:17 -0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 4 Jan 2007 20:17:44 +0000 (12:17 -0800)
commit44f9a2fdc48ccb8bb510b6e1210bf15b3e10afdb
treed7215dd5b39707affd4ce0e70d313335ffd85611
parentbbdc176a2f39913063aaaf95bc27e4b18fd14953
[NETFILTER]: ebtables: don't compute gap before checking struct type

We cannot compute the gap until we know we have a 'struct ebt_entry' and
not 'struct ebt_entries'.  Failure to check can cause crash.

Tested-by: Santiago Garcia Mantinan <manty@manty.net>
Acked-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Chuck Ebbert <76306.1226@compuserve.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/bridge/netfilter/ebtables.c