Skip to content

Instantly share code, notes, and snippets.

@libcrack
Created May 12, 2024 14:28
Show Gist options
  • Save libcrack/458524f17a619451bc054f56669e8c39 to your computer and use it in GitHub Desktop.
Save libcrack/458524f17a619451bc054f56669e8c39 to your computer and use it in GitHub Desktop.
Script to enable/disable zerocopy in FreeBSD/pfSense boxes
#!/bin/sh
# devnull@libcrack.so
# 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