patch-2.4.27 linux-2.4.27/net/sched/sch_dsmark.c

Next file: linux-2.4.27/net/sched/sch_hfsc.c
Previous file: linux-2.4.27/net/sched/sch_delay.c
Back to the patch index
Back to the overall index

diff -urN linux-2.4.26/net/sched/sch_dsmark.c linux-2.4.27/net/sched/sch_dsmark.c
@@ -324,7 +324,8 @@
 	__u16 tmp;
 
 	DPRINTK("dsmark_init(sch %p,[qdisc %p],opt %p)\n",sch,p,opt);
-	if (rtattr_parse(tb,TCA_DSMARK_MAX,RTA_DATA(opt),RTA_PAYLOAD(opt)) < 0 ||
+	if (!opt ||
+	    rtattr_parse(tb,TCA_DSMARK_MAX,RTA_DATA(opt),RTA_PAYLOAD(opt)) < 0 ||
 	    !tb[TCA_DSMARK_INDICES-1] ||
 	    RTA_PAYLOAD(tb[TCA_DSMARK_INDICES-1]) < sizeof(__u16))
                 return -EINVAL;

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)