[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20140708.193357.143714071345442602.davem@davemloft.net>
Date: Tue, 08 Jul 2014 19:33:57 -0700 (PDT)
From: David Miller <davem@...emloft.net>
To: lucien.xin@...il.com
Cc: cwang@...pensource.com, netdev@...r.kernel.org
Subject: Re: [PATCH] return the right retcode when add a unreachable route
From: lucien xin <lucien.xin@...il.com>
Date: Wed, 9 Jul 2014 09:51:02 +0800
> On Wed, Jul 9, 2014 at 2:49 AM, Cong Wang <cwang@...pensource.com> wrote:
>> On Sun, Jul 6, 2014 at 4:01 AM, Xin Long <lucien.xin@...il.com> wrote:
>>
>> This would potentially break user-space applications.
>
> yes, you are right. if I only handle the -ESRCH , like:
>
> - return __fib_lookup(net, flp, res);
> +
> + err = __fib_lookup(net, flp, res);
> + if(err == -ESRCH)
> + return -ENETUNREACH;
> +
> + return err;
>
> I think it will be ok, after all, it looks confused that err is *No
> such process* when add a route.
It doesn't matter, if applications want to work on all kernels they
will test whatever error code is being provided now.
Therefore, by changing it you will break those applications.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists