Created
May 12, 2024 14:28
-
-
Save libcrack/458524f17a619451bc054f56669e8c39 to your computer and use it in GitHub Desktop.
Script to enable/disable zerocopy in FreeBSD/pfSense boxes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# [email protected] | |
# Mon Sep 9 21:30:51 CEST 2019 | |
case $1 in | |
enable) | |
echo "[*] Enabling zerocopy" | |
sysctl net.bpf.zerocopy_enable=1 | |
exit $? | |
;; | |
disable) | |
echo "[*] Disabling zerocopy" | |
sysctl net.bpf.zerocopy_enable=0 | |
exit $? | |
;; | |
help) | |
echo "$0 <enable|disable|status>" | |
exit 0 | |
;; | |
status|*) | |
sysctl -a | grep net.bpf.zerocopy_enable | |
exit $? | |
;; | |
esac |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment