[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAOJe8K1=xZ03Oo10Oi-U-e2Qz+yJL-zk5Yu1WDy9cOtovbA7iw@mail.gmail.com>
Date: Wed, 3 Jun 2015 09:56:18 +0300
From: Denis Kirjanov <kda@...ux-powerpc.org>
To: Hannes Frederic Sowa <hannes@...essinduktion.org>
Cc: netdev@...r.kernel.org
Subject: Re: [net-next v2] ipv4: inet_bind: check the addr_len first
On 6/3/15, Hannes Frederic Sowa <hannes@...essinduktion.org> wrote:
>
>
> On Tue, Jun 2, 2015, at 17:13, Denis Kirjanov wrote:
>> On 6/2/15, Hannes Frederic Sowa <hannes@...essinduktion.org> wrote:
>> > Hello,
>> >
>> > On Tue, Jun 2, 2015, at 14:21, Denis Kirjanov wrote:
>> >> Perform the address length check first, before calling
>> >> the proto specific bind() function
>> >
>> > Can you give more detail why you did this change and what bug it fixes?
>> I've sent the v2 version with the net-next tag. The idea is simple:
>> check the error condition first and then do the useful work.
>
> Hmm, IMHO the specific proto->bind handlers have to take care of the
> check themselves. You could argue that we should do the checks always in
> inet_bind but then you have to remove the addr_len checks from the raw
> and ping bind handlers, otherwise people become confused if they modify
> the code. I am in favor of leaving the current logic as is, sorry.
Yeah, right, but if we can do the check a bit earlier, why not..
>
> Thanks,
> Hannes
>
--
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