pfsync if_get conversion

2017-03-08 Thread Stefan Sperling
This diff converts a struct ifnet pointer in pfsync's softc into an ifindex with corresponding if_get()/if_put() calls. Seems to still work fine and fixes the following panic reported by double-p: ifconfig pfsync0 syncdev vlan5 up ifconfig vlan5 destroy ifconfig pfsync0 destroy -> crash because o

Re: integer overflow in PF may lead to dropped connections

2017-03-08 Thread Claudio Jeker
On Fri, Mar 03, 2017 at 04:58:18PM +0100, mathieu.bl...@cea.fr wrote: > Hi, > > here is a patch which fixes an integer overflow in the computation of > adaptive timeouts. The effect of this integer overflow is that > depending on timeout values, legitimate established connection states > can be ev

Re: routing sockets & splsoftnet()

2017-03-08 Thread Claudio Jeker
On Tue, Mar 07, 2017 at 10:44:56AM +0100, Martin Pieuchot wrote: > Remove unnecessary splsoftnet()/splx() dances. Routing sockets do not > need the NET_LOCK() and in the code below the SPL has been raised to > shut up an assert, so they are no longer needed. > > ok? I agree that the splsoftnet()

Re: routing sockets & splsoftnet()

2017-03-08 Thread Alexander Bluhm
On Wed, Mar 08, 2017 at 11:06:22AM +0100, Martin Pieuchot wrote: > Then better put KERNEL_ASSERT_LOCKED() in the places mentioned above. > > I still think we should remove them, they don't help. Thanks for the explanation, then remove them. OK bluhm@

regmap: device tree reachover

2017-03-08 Thread Mark Kettenis
Most devices integrated on SoCs have a well-defined block of registers. But sometimes a driver for such a device needs to touch a register outside that block. In those cases the device tree contains a reference to the device that "owns" the registers. The diff below implements a way to access th

Re: ip_ipip.c / gif(4) percpu counters

2017-03-08 Thread Alexander Bluhm
On Wed, Mar 08, 2017 at 12:03:12PM +0100, Jeremie Courreges-Anglas wrote: > So here's a refreshed diff that initializes the counters directly from > ip_init(). I remove the ipip_init() wrapper to make it clear that > ip_init() is responsible for the job. > > (Still) ok? File netinet/ip_ipip.c is

Re: Question regarding (portable) OpenNTPD adjfreq

2017-03-08 Thread Christian Weisgerber
Patrik Lundin: > By looking around in the code I notice that adjfreq is only performed if > openntpd considers itself synced. This makes me wonder: what happens if > the frequency is so off target that the skew introduced by adjtime() is > unable to overcome it? Then ntpd cannot maintain the time

Re: Question regarding (portable) OpenNTPD adjfreq

2017-03-08 Thread Patrik Lundin
Ugh, sorry about the garbled layout of the previous message. I should not attempt to do these write ups on the road away from mutt :(. -- Patrik Lundin

Question regarding (portable) OpenNTPD adjfreq

2017-03-08 Thread Patrik Lundin
Hello, I have a virtual (VMware) Debian 8.3 (Jessie) machine running portable openntpd where the system clock had drifted quite far over some time. The daemon is repeatedly stating "adjusting local clock by " where the keeps getting more and more wrong. By looking around in the c

Re: ip_ipip.c / gif(4) percpu counters

2017-03-08 Thread Martin Pieuchot
On 08/03/17(Wed) 12:03, Jeremie Courreges-Anglas wrote: > [...] > So here's a refreshed diff that initializes the counters directly from > ip_init(). I remove the ipip_init() wrapper to make it clear that > ip_init() is responsible for the job. > > (Still) ok? I'm against adding more "#if PEUDO

Re: ip_ipip.c / gif(4) percpu counters

2017-03-08 Thread Jeremie Courreges-Anglas
Alexander Bluhm writes: > On Tue, Mar 07, 2017 at 06:16:30PM +0100, Jeremie Courreges-Anglas wrote: >> >> I failed to find a nice place where to initialize the counters. The >> code that uses counters is reachable even if gif(4) isn't compiled in. >> >> I can think of 3 obvious ways to call th

Re: routing sockets & splsoftnet()

2017-03-08 Thread Martin Pieuchot
On 07/03/17(Tue) 19:28, Alexander Bluhm wrote: > On Tue, Mar 07, 2017 at 10:44:56AM +0100, Martin Pieuchot wrote: > > Remove unnecessary splsoftnet()/splx() dances. Routing sockets do not > > need the NET_LOCK() and in the code below the SPL has been raised to > > shut up an assert, so they are no

Re: ip_ipip.c / gif(4) percpu counters

2017-03-08 Thread Martin Pieuchot
On 07/03/17(Tue) 18:16, Jeremie Courreges-Anglas wrote: > [...] > 1. call ipip_init() through .pr_init. The idea would be to call >ipip_init() once per protosw entry that needs it, so the function >should return early if it was already run. Only one protosw entry uses ipip_sysctl, I'd pu