On 6/7/19 4:05 PM, Wei Wang wrote:
>> @@ -1835,6 +1848,24 @@ static int fib6_nh_remove_exception(const struct 
>> fib6_nh *nh, int plen,
>>         return err;
>>  }
>>
>> +struct fib6_nh_excptn_arg {
>> +       struct rt6_info *rt;
>> +       int             plen;
>> +       bool            found;
>> +};
>> +
>> +static int rt6_nh_remove_exception_rt(struct fib6_nh *nh, void *_arg)
>> +{
>> +       struct fib6_nh_excptn_arg *arg = _arg;
>> +       int err;
>> +
>> +       err = fib6_nh_remove_exception(nh, arg->plen, arg->rt);
>> +       if (err == 0)
>> +               arg->found = true;
>> +
>> +       return 0;
>> +}
>> +
> Hi David,
> Why not return 1 here to break the loop when
> fib6_nh_remove_exception() successfully removed the rt?
> 

will change. update will drop the found arg and let rc == 1 indicate an
entry was found.

Reply via email to