Subject: Re: net_sched 02/07: make cls_ops->tcf_chain() optional

From: Patrick McHardy <[email-masked]>
Date: Sat, 05 Sep 2009 19:03:02 +0200

Jarek Poplawski wrote:
> Jarek Poplawski wrote, On 09/05/2009 01:57 PM:
> 
>>>> diff --git a/net/sched/cls_api.c b/net/sched/cls_api.c
>>>> index 09cdcdf..eaa8f43 100644
>>>> --- a/net/sched/cls_api.c
>>>> +++ b/net/sched/cls_api.c
>>>> @@ -181,6 +181,9 @@ replay:
>>>>  	if ((cops = q->ops->cl_ops) == NULL)
>>>>  		return -EINVAL;
>>>>  
>>>> +	if (cops->tcf_chain == NULL)
>>>> +		return -EOPNOTSUPP;
>>>> +
>>> You should probably repeat this in tc_dump_tfilter.
>>  
>>
>> ...In case somebody finds the way to list a filter before
>> adding it. ;-) But, since it's quite unlikely, let's foget it.
> 
> 
> ...or simply tries to do it instead of meditating the code.
> So this change is definitely needed in tc_dump_tfilter too.

Thanks Jarek. I'm on my way out the door, but I'll fix that tommorrow.