diff options
author | Florian Westphal <fw@strlen.de> | 2015-03-03 07:53:31 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-03-03 14:07:04 -0500 |
commit | 71e168b151babf4334e2e26c92230a6bda3b1f24 (patch) | |
tree | 132f7705345adf3ebdc961c58baef6af48e8e788 | |
parent | acf8dd0a9d0b9e4cdb597c2f74802f79c699e802 (diff) |
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>
-rw-r--r-- | net/bridge/br.c | 2 |
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) | |||
190 | { | 190 | { |
191 | int err; | 191 | int err; |
192 | 192 | ||
193 | BUILD_BUG_ON(sizeof(struct br_input_skb_cb) > FIELD_SIZEOF(struct sk_buff, cb)); | ||
194 | |||
193 | err = stp_proto_register(&br_stp_proto); | 195 | err = stp_proto_register(&br_stp_proto); |
194 | if (err < 0) { | 196 | if (err < 0) { |
195 | pr_err("bridge: can't register sap for STP\n"); | 197 | pr_err("bridge: can't register sap for STP\n"); |