pfsync in rdomain

2013-11-14 Thread Erik Lax
This patch seems to fix running pfsync in rdomains. --- sys/net/if_pfsync.c.origThu Nov 14 15:58:00 2013 +++ sys/net/if_pfsync.c Thu Nov 14 16:51:30 2013 @@ -1682,6 +1682,8 @@ sc-sc_if.if_opackets++; sc-sc_if.if_obytes += m-m_pkthdr.len; + m-m_pkthdr.rdomain =

setpassent(1) not working

2013-11-14 Thread Erik Lax
Hi, I noticed that setpassent(1) probably doesn't work as intended, as this program should open the spwd.db file once, not four times? int main() { setpassent(1); getpwnam(root); getpwnam(root); getpwuid(0); getpwuid(0); return 0; } It seems to be due to faulty logic in

relayd: crash with two listen on (one is ssl)

2013-11-19 Thread Erik Lax
Hi, In relayd, if a relay is configured with two listen on directives, one with ssl and one without. In the relay_inherit function the ssl pointers (cert and key) are copied to the latter, and used/freed even if F_SSL is not set. This causes a double free later in purge_relay. relay http {

libpthread fork and malloc

2011-12-12 Thread Erik Lax
Hi, I recently encountered a similar bug like this one http://www.freebsd.org/cgi/query-pr.cgi?pr=76690 in openbsds pthread library. It seems that if the malloc lock is not obtained before the fork bad things may happen on following free's in the forked child. This is my take at fixing this

tcpbench: setpgid

2012-01-31 Thread Erik Lax
attached a patch (against 5.0) to remove the code :) Regards Erik Lax Index: usr.bin/tcpbench/tcpbench.c === RCS file: /cvs/src/usr.bin/tcpbench/tcpbench.c,v retrieving revision 1.22 diff -u -r1.22 tcpbench.c --- usr.bin/tcpbench/tcpbench.c

relayd: statistics are broken

2012-03-07 Thread Erik Lax
Hi, There is a bug in relayd's handling of statistics collected from each prefork (0,1,2,3,4,..). Once received over IMSG, statistics should be saved in a rl_stats[RELAY_MAXPROC + 1] array per relay (rlay-rl_stats). However all ends up in rlay-rl_stats[0] overwriting other children's

Re: relayd: statistics are broken [resend patches]

2012-03-09 Thread Erik Lax
On 3/7/12 11:53 AM, Erik Lax wrote: ... Two patches attached below. Sorry for the noise, apparently the patches got broken in transit, blaming the MUA. -- cut -- Index: relay.c === RCS file: /cvs/src/usr.sbin/relayd/relay.c,v

tcpbench: crash with -n and -b

2012-05-04 Thread Erik Lax
Hi, I noticed that tcpbench sometimes crashes when using -n and -b combined, this is because of a double-free in the client initialization loop. See patch below Erik Index: usr.bin/tcpbench/tcpbench.c === RCS file:

[patch] em: interrupt starvation

2012-05-10 Thread Erik Lax
Hi, I came across a real-world scenario where network traffic stopped due to interrupt starvation with the em driver, tested with a few different cards (on a network/interface where no packets were received). This is what caused it. I had two computers with a cable directly connected on a small

Re: [patch] em: interrupt starvation

2012-05-10 Thread Erik Lax
On 5/10/12 3:41 PM, Mike Belopuhov wrote: That's a great find. In fact, you're right, em_start() a few lines up should be done after em_update_link_status because of the link_active. The following diff makes it work the same way ix(4) does. Please verify that it fixes the problem. Thanks,

relayd: statistics are broken [patches]

2012-07-10 Thread Erik Lax
Hi, There is a bug in relayd's handling of statistics collected from each prefork (0,1,2,3,4,..). Once received over IMSG, statistics should be saved in a rl_stats[RELAY_MAXPROC + 1] array per relay (rlay-rl_stats). However all ends up in rlay-rl_stats[0] overwriting other children's statistics

httpd with fcgi send garbage after non-chunked response

2015-01-12 Thread Erik Lax
Hi, In the case where httpds fcgi module handles the end marker, it should abort if fcgi_chunked is not true. Now it sends 8 bytes of garbage after each request (it's often NUL terminated so it doesn't seem to show up in browsers). This patched fixed it for me. Index:

if_pfsync error counter

2015-06-22 Thread Erik Lax
Hi, I noticed by looking at the code that in sys/net/if_pfsync.c : pfsync_sendout() a failed ip_output() does not increment sc-sc_if.if_oerrors++ only pfsyncstats.pfsyncs_oerrors++. Similar pattern do in eg. if_pflow.c. Should it?

Proxy ARP and npppd (tun)

2016-12-09 Thread Erik Lax
Hi, In previous OpenBSD versions (5.9 and eariler) it was possible to do proxy-arp with the npppd server if the proxy-arp was setup before the npppd connection was made. As of 6.0 (and todays snapshots) proxy arp and npppd (tun interfaces) seems to be broken. The behavior is now as such; - if