summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorFlorian Westphal <fw@strlen.de>2015-03-03 13:53:31 +0100
committerDavid S. Miller <davem@davemloft.net>2015-03-03 14:07:04 -0500
commit71e168b151babf4334e2e26c92230a6bda3b1f24 (patch)
tree132f7705345adf3ebdc961c58baef6af48e8e788 /net
parentacf8dd0a9d0b9e4cdb597c2f74802f79c699e802 (diff)
downloadlinux-71e168b151babf4334e2e26c92230a6bda3b1f24.tar.bz2
net: bridge: add compile-time assert for cb struct size
make build fail if structure no longer fits into ->cb storage. Signed-off-by: Florian Westphal <fw@strlen.de> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r--net/bridge/br.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/net/bridge/br.c b/net/bridge/br.c
index fb57ab6b24f9..02c24cf63c34 100644
--- a/net/bridge/br.c
+++ b/net/bridge/br.c
@@ -190,6 +190,8 @@ static int __init br_init(void)
{
int err;
+ BUILD_BUG_ON(sizeof(struct br_input_skb_cb) > FIELD_SIZEOF(struct sk_buff, cb));
+
err = stp_proto_register(&br_stp_proto);
if (err < 0) {
pr_err("bridge: can't register sap for STP\n");