diff options
Diffstat (limited to 'net/sched')
| -rw-r--r-- | net/sched/sch_atm.c | 5 | ||||
| -rw-r--r-- | net/sched/sch_cbq.c | 4 | ||||
| -rw-r--r-- | net/sched/sch_htb.c | 8 | 
3 files changed, 12 insertions, 5 deletions
diff --git a/net/sched/sch_atm.c b/net/sched/sch_atm.c index f52255fea652..4a981ca90b0b 100644 --- a/net/sched/sch_atm.c +++ b/net/sched/sch_atm.c @@ -393,10 +393,13 @@ static int atm_tc_enqueue(struct sk_buff *skb, struct Qdisc *sch,  				result = tcf_classify(skb, NULL, fl, &res, true);  				if (result < 0)  					continue; +				if (result == TC_ACT_SHOT) +					goto done; +  				flow = (struct atm_flow_data *)res.class;  				if (!flow)  					flow = lookup_flow(sch, res.classid); -				goto done; +				goto drop;  			}  		}  		flow = NULL; diff --git a/net/sched/sch_cbq.c b/net/sched/sch_cbq.c index 6568e17c4c63..36db5f6782f2 100644 --- a/net/sched/sch_cbq.c +++ b/net/sched/sch_cbq.c @@ -230,6 +230,8 @@ cbq_classify(struct sk_buff *skb, struct Qdisc *sch, int *qerr)  		result = tcf_classify(skb, NULL, fl, &res, true);  		if (!fl || result < 0)  			goto fallback; +		if (result == TC_ACT_SHOT) +			return NULL;  		cl = (void *)res.class;  		if (!cl) { @@ -250,8 +252,6 @@ cbq_classify(struct sk_buff *skb, struct Qdisc *sch, int *qerr)  		case TC_ACT_TRAP:  			*qerr = NET_XMIT_SUCCESS | __NET_XMIT_STOLEN;  			fallthrough; -		case TC_ACT_SHOT: -			return NULL;  		case TC_ACT_RECLASSIFY:  			return cbq_reclassify(skb, cl);  		} diff --git a/net/sched/sch_htb.c b/net/sched/sch_htb.c index e5b4bbf3ce3d..2238edece1a4 100644 --- a/net/sched/sch_htb.c +++ b/net/sched/sch_htb.c @@ -199,8 +199,14 @@ static unsigned long htb_search(struct Qdisc *sch, u32 handle)  {  	return (unsigned long)htb_find(handle, sch);  } + +#define HTB_DIRECT ((struct htb_class *)-1L) +  /**   * htb_classify - classify a packet into class + * @skb: the socket buffer + * @sch: the active queue discipline + * @qerr: pointer for returned status code   *   * It returns NULL if the packet should be dropped or -1 if the packet   * should be passed directly thru. In all other cases leaf class is returned. @@ -211,8 +217,6 @@ static unsigned long htb_search(struct Qdisc *sch, u32 handle)   * have no valid leaf we try to use MAJOR:default leaf. It still unsuccessful   * then finish and return direct queue.   */ -#define HTB_DIRECT ((struct htb_class *)-1L) -  static struct htb_class *htb_classify(struct sk_buff *skb, struct Qdisc *sch,  				      int *qerr)  {  | 
