diff options
Diffstat (limited to 'include/net')
-rw-r--r-- | include/net/sch_generic.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/include/net/sch_generic.h b/include/net/sch_generic.h index b931f021d7ab..f1fbe2d5e055 100644 --- a/include/net/sch_generic.h +++ b/include/net/sch_generic.h @@ -219,9 +219,16 @@ struct tcf_proto { struct qdisc_skb_cb { unsigned int pkt_len; - long data[]; + unsigned char data[24]; }; +static inline void qdisc_cb_private_validate(const struct sk_buff *skb, int sz) +{ + struct qdisc_skb_cb *qcb; + BUILD_BUG_ON(sizeof(skb->cb) < sizeof(unsigned int) + sz); + BUILD_BUG_ON(sizeof(qcb->data) < sz); +} + static inline int qdisc_qlen(struct Qdisc *q) { return q->q.qlen; |