Re: take PRU_ATTACH out of usrreq

2017-03-06 Thread Alexander Bluhm
On Sun, Mar 05, 2017 at 10:54:39AM +0100, Claudio Jeker wrote: > Here is an updated version of the PRU_ATTACH diff. I looked at the pfkey > code and decided to only do the minimum now. I will go in afterwards and > kill the dynamic fiddling in there. There is no reason for all this > complication

Re: take PRU_ATTACH out of usrreq

2017-02-28 Thread Alexander Bluhm
On Tue, Feb 28, 2017 at 10:33:53AM +0100, Martin Pieuchot wrote: > On 28/02/17(Tue) 07:15, Claudio Jeker wrote: > > On Mon, Feb 27, 2017 at 10:22:03PM +0100, Alexander Bluhm wrote: > > [...] > > > > +int > > > > +pfkey_attach(struct socket *so, int proto) > > > > { > > > > > > I think you

Re: take PRU_ATTACH out of usrreq

2017-02-28 Thread Claudio Jeker
On Tue, Feb 28, 2017 at 10:33:53AM +0100, Martin Pieuchot wrote: > On 28/02/17(Tue) 07:15, Claudio Jeker wrote: > > On Mon, Feb 27, 2017 at 10:22:03PM +0100, Alexander Bluhm wrote: > > [...] > > > > +int > > > > +pfkey_attach(struct socket *so, int proto) > > > > { > > > > > > I think you

Re: take PRU_ATTACH out of usrreq

2017-02-28 Thread Martin Pieuchot
On 28/02/17(Tue) 07:15, Claudio Jeker wrote: > On Mon, Feb 27, 2017 at 10:22:03PM +0100, Alexander Bluhm wrote: > [...] > > > +int > > > +pfkey_attach(struct socket *so, int proto) > > > { > > > > I think you forgot the check from pfkey_usrreq() here. > > > > if

Re: take PRU_ATTACH out of usrreq

2017-02-27 Thread Claudio Jeker
On Mon, Feb 27, 2017 at 10:22:03PM +0100, Alexander Bluhm wrote: > On Sun, Feb 26, 2017 at 10:56:16AM +0100, Claudio Jeker wrote: > > This diff works for me but I did not test each and every protocol (TCP, > > UDP, ICMP, AF_UNIX work). > > I am currently running it with all regression tests. > >

Re: take PRU_ATTACH out of usrreq

2017-02-27 Thread Alexander Bluhm
On Sun, Feb 26, 2017 at 10:56:16AM +0100, Claudio Jeker wrote: > This diff works for me but I did not test each and every protocol (TCP, > UDP, ICMP, AF_UNIX work). I am currently running it with all regression tests. > Also not sure if I should renumber the PRU_* defines... in a way this can >

Re: take PRU_ATTACH out of usrreq

2017-02-26 Thread Claudio Jeker
On Sun, Feb 26, 2017 at 07:51:14AM -0700, Todd C. Miller wrote: > On Sun, 26 Feb 2017 10:56:16 +0100, Claudio Jeker wrote: > > > Attaching a PCB to a socket is currently done via PRU_ATTACH but in most > > cases this does not need the network / socket lock since no packets can be > > received or

Re: take PRU_ATTACH out of usrreq

2017-02-26 Thread Todd C. Miller
On Sun, 26 Feb 2017 10:56:16 +0100, Claudio Jeker wrote: > Attaching a PCB to a socket is currently done via PRU_ATTACH but in most > cases this does not need the network / socket lock since no packets can be > received or sent over this socket (needs a bind or connect first) > It also cleans up

take PRU_ATTACH out of usrreq

2017-02-26 Thread Claudio Jeker
Attaching a PCB to a socket is currently done via PRU_ATTACH but in most cases this does not need the network / socket lock since no packets can be received or sent over this socket (needs a bind or connect first) It also cleans up a few other ugly things like how the proto is passed. This diff