Subject: [PATCH PKT_SCHED 9/17]: Return -EOPNOTSUPP if gact probability is requested but not compiled in

From: Patrick McHardy <[email-masked]>
Date: Thu, 30 Dec 2004 04:40:12 +0100

Return -EOPNOTSUPP if gact probability is requested but not compiled in.

# This is a BitKeeper generated diff -Nru style patch.
#
# ChangeSet
#   2004/12/30 02:34:11+01:00 [email-masked] 
#   [PKT_SCHED]: Return -EOPNOTSUPP if gact probability is requested but not compiled in
#   
#   Signed-off-by: Patrick McHardy <[email-masked]>
# 
# net/sched/gact.c
#   2004/12/30 02:34:04+01:00 [email-masked] +3 -1
#   [PKT_SCHED]: Return -EOPNOTSUPP if gact probability is requested but not compiled in
#   
#   Signed-off-by: Patrick McHardy <[email-masked]>
# 
diff -Nru a/net/sched/gact.c b/net/sched/gact.c
--- a/net/sched/gact.c	2004-12-30 04:01:33 +01:00
+++ b/net/sched/gact.c	2004-12-30 04:01:33 +01:00
@@ -88,9 +88,11 @@
 		return -EINVAL;
 
 	parm = RTA_DATA(tb[TCA_GACT_PARMS - 1]);
-#ifdef CONFIG_GACT_PROB
 	if (tb[TCA_GACT_PROB - 1] != NULL)
+#ifdef CONFIG_GACT_PROB
 		p_parm = RTA_DATA(tb[TCA_GACT_PROB - 1]);
+#else
+		return -EOPNOTSUPP;
 #endif
 	p = tcf_hash_check(parm, a, ovr, bind);
 	if (p == NULL) {