macOS: Adjust maxdgram to allow for large UDP packets

This commit is contained in:
Michael Vines 2018-08-03 15:17:17 -07:00 committed by Grimes
parent 40ea3e3e61
commit e7d3069f58
1 changed files with 11 additions and 0 deletions

View File

@ -159,6 +159,17 @@ tune_networking() {
sudo sysctl -w net.core.rmem_default=26214400 1>/dev/null 2>/dev/null
) || true
fi
if [[ $(uname) = Darwin ]]; then
(
if [[ $(sysctl net.inet.udp.maxdgram | cut -d\ -f2) != 65535 ]]; then
echo "Adjusting maxdgram to allow for large UDP packets, see BLOB_SIZE in src/packet.rs:"
set -x
sudo sysctl net.inet.udp.maxdgram=65535
fi
)
fi
}
SOLANA_CONFIG_DIR=${SNAP_DATA:-$PWD}/config