Update pfkey_open() function to set socket's write buffer size to
authorae <ae@FreeBSD.org>
Sun, 11 Mar 2018 19:26:34 +0000 (19:26 +0000)
committerae <ae@FreeBSD.org>
Sun, 11 Mar 2018 19:26:34 +0000 (19:26 +0000)
commit98de5b3e005119f5d356a139157b0456a0ee52eb
tree9e1b04048d4e7e2c88bd9ea52fbae0c7d6ebe8d2
parent00abf0e72de49c05544fed28688abb5d3a1db224
Update pfkey_open() function to set socket's write buffer size to
128k and receive buffer size to 2MB. In case if system has bigger
default values, do not lower them.

This should partially solve the problem, when setkey(8) returns
EAGAIN error on systems with many SAs or SPs.

PR: 88336
Obtained from: NetBSD/ipsec-tools
MFC after: 2 weeks
lib/libipsec/pfkey.c