summaryrefslogtreecommitdiffstats
path: root/net/bridge
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 20:07:04 +0100
commit71e168b151babf4334e2e26c92230a6bda3b1f24 (patch)
tree132f7705345adf3ebdc961c58baef6af48e8e788 /net/bridge
parentudp: only allow UFO for packets from SOCK_DGRAM sockets (diff)
downloadlinux-71e168b151babf4334e2e26c92230a6bda3b1f24.tar.xz
linux-71e168b151babf4334e2e26c92230a6bda3b1f24.zip
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/bridge')
-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");