spamd: speed up blacklist lookups

2017-10-17 Thread Todd C. Miller
The blacklists are stored as arrays and lookups are O(n). Sorting the blacklist allows us to use a binary search which means, at worst, O(log n). Since spamd-setup already sorts the lists it sends (in host byte order), this uses mergesort() which performs well on partially (or fully) sorted

spamd: make blacklists override learned whitelist

2017-10-17 Thread Todd C. Miller
When running spamd in greylisting mode, it is not uncommon for an IP to get whitelisted that later shows up on a spam blacklist. However, that blacklist entry never takes effect because the IP is already whitelisted and thus appears in the spamd-white of table, bypassing spamd. This is

Remove .depend leftovers from Makefiles

2017-10-17 Thread Christian Weisgerber
As far as I can tell, nothing in the build system generates .depend files any longer, nor do they appear as prerequisites in any make rules. The patch below removes all remaining mentions of .depend (lists of files to clean, spurious .depend targets, etc) from the src Makefiles. This passed a

Re: Remove .depend leftovers from Makefiles

2017-10-17 Thread Marc Espie
On Tue, Oct 17, 2017 at 01:51:25PM +0200, Christian Weisgerber wrote: > As far as I can tell, nothing in the build system generates .depend > files any longer, nor do they appear as prerequisites in any make > rules. The patch below removes all remaining mentions of .depend > (lists of files to

Re: sshd(8) logging of client disconnect from ClientAliveInterval

2017-10-17 Thread Lars Noodén
On 10/17/17, Darren Tucker wrote: [snip] > probably better to use fmt_connection_id() instead of hand-rolling the > format. Ok. I have added fmt_connection_id() to serverloop.c from packet.c /Lars Index: src/usr.bin/ssh/serverloop.c

Re: libfuse: improved command line parsing

2017-10-17 Thread Helg Bredow
On Mon, 16 Oct 2017 15:33:45 +0200 Martin Pieuchot wrote: > On 14/10/17(Sat) 01:23, Helg Bredow wrote: > > The attached patch vastly improves fuse argument and option parsing. For > > example, all sshfs options will now be parsed successfully. It's a > > substantial patch and

Re: spamd: speed up blacklist lookups

2017-10-17 Thread Craig Skinner
On Tue, 17 Oct 2017 05:38:33 -0600 "Todd C. Miller" wrote: > an upcoming diff that performs more lookups. Superb. -- Craig Skinner | http://twitter.com/Craig_Skinner | http://linkd.in/yGqkv7

libfuse: patch to prevent fuse-zip from dumping core

2017-10-17 Thread Helg Bredow
If you execute "fuse-zip -V" it prints the version and then dumps core. This is because fuse-zip does not initialise the mount point pointer to NULL. This patch ensures that it's always initialised to NULL. Index: fuse.c === RCS

Re: sshd(8) logging of client disconnect from ClientAliveInterval

2017-10-17 Thread Lars Noodén
Here is a replacement patch. /Lars Index: serverloop.c === RCS file: /cvs/src/usr.bin/ssh/serverloop.c,v retrieving revision 1.198 diff -u -p -u -r1.198 serverloop.c --- serverloop.c12 Sep 2017 06:35:32 - 1.198 +++

Re: route warning

2017-10-17 Thread Alexander Bluhm
On Mon, Oct 16, 2017 at 01:18:27PM +0200, Martin Pieuchot wrote: > Removing the if () block should do it. This diff is not quite right. /usr/src/regress/sbin/route rttest20 shows that there is an additional +get net 2001:ee0:2001:c0::/64 each time you call route get. You only want such a line

queue packet in loopback

2017-10-17 Thread Alexander Bluhm
Hi, markus@ has found a possible stack overrun in the network as we have removed some queueing. Now lo(4) output calls the ip input routines without a queue. So if a packet loops through the kernel, the kernel stack fills up. root@q70:.../~# route add 1.2.3.4 127.0.0.1 add host 1.2.3.4:

Re: sshd(8) logging of client disconnect from ClientAliveInterval

2017-10-17 Thread Darren Tucker
On Tue, Oct 17, 2017 at 09:10:38PM +0300, Lars Noodén wrote: > Here is a replacement patch. I meant reusing the existing function rather than cloning it. It's currently static so it needs to be exported but IMO that's better than duplicating the code. Index: packet.c

Re: sshd(8) logging of client disconnect from ClientAliveInterval

2017-10-17 Thread Damien Miller
ok by me On Wed, 18 Oct 2017, Darren Tucker wrote: > On Tue, Oct 17, 2017 at 09:10:38PM +0300, Lars Noodén wrote: > > Here is a replacement patch. > > I meant reusing the existing function rather than cloning it. It's > currently static so it needs to be exported but IMO that's better than >