net: sched: cbq: create block for q->link.block
authorJiri Pirko <jiri@mellanox.com>
Mon, 27 Nov 2017 17:37:21 +0000 (18:37 +0100)
committerDavid S. Miller <davem@davemloft.net>
Tue, 28 Nov 2017 21:04:26 +0000 (16:04 -0500)
commitd51aae68b142f48232257e96ce317db25445418d
tree137141a72c691f4a5a286fa263473acd1715c2c4
parent0195a21079c077abfb475a56830b06b37424982a
net: sched: cbq: create block for q->link.block

q->link.block is not initialized, that leads to EINVAL when one tries to
add filter there. So initialize it properly.

This can be reproduced by:
$ tc qdisc add dev eth0 root handle 1: cbq avpkt 1000 rate 1000Mbit bandwidth 1000Mbit
$ tc filter add dev eth0 parent 1: protocol ip prio 100 u32 match ip protocol 0 0x00 flowid 1:1

Reported-by: Jaroslav Aster <jaster@redhat.com>
Reported-by: Ivan Vecera <ivecera@redhat.com>
Fixes: 6529eaba33f0 ("net: sched: introduce tcf block infractructure")
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Acked-by: Eelco Chaudron <echaudro@redhat.com>
Reviewed-by: Ivan Vecera <ivecera@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/sched/sch_cbq.c