Re: [PATCH] net: split sk_reuse into sk_reuse and sk_force_reuse

2018-06-14 Thread Andrei Vagin
On Wed, Jun 13, 2018 at 06:17:41PM -0700, Eric Dumazet wrote: > On Wed, Jun 13, 2018 at 5:56 PM Andrei Vagin wrote: > > > The commit f396922d862a added a check to not allow changing > > SO_REUSEADDR/SO_REUSEPORT on bound sockets. First, it doesn't > > take into account that TCP_REPAIR changes SO_

Re: [PATCH] net: split sk_reuse into sk_reuse and sk_force_reuse

2018-06-13 Thread Maciej Żenczykowski
> Hi Andrey > > This commit was reverted, do we still need this patch ? I think it still makes things easier to understand...

Re: [PATCH] net: split sk_reuse into sk_reuse and sk_force_reuse

2018-06-13 Thread Maciej Żenczykowski
> #define SK_NO_REUSE0 > #define SK_CAN_REUSE 1 since it's a boolean now these should go away too I believe. should there simply/also be a separate privileged socket option to set/get force reuse?

[PATCH] net: split sk_reuse into sk_reuse and sk_force_reuse

2018-06-13 Thread Andrei Vagin
The commit f396922d862a added a check to not allow changing SO_REUSEADDR/SO_REUSEPORT on bound sockets. First, it doesn't take into account that TCP_REPAIR changes SO_REUSEADDR. Second, now it is impossible to restore a socket state and set SO_REUSEADDR, because the kernel always sets SO_REUSEADDR