DF-0736 / build.sh
#!/bin/sh # DF-0736 build.sh — builds the attack module against the live /usr/src tree # on the guest. Must be run on the guest as root AFTER setup.sh has run # (which builds + loads netgraph.ko, ng_socket.ko, ng_ipfw.ko). set -e cd "$(dirname "$0")" mkdir -p netinet ln -sf /usr/src/sys/net/ipfw/ip_fw.h netinet/ip_fw.h cat > Makefile <<EOF KMOD= df736attack SRCS= attack.c WARNS= 0 NO_WERROR=1 KCFLAGS+= -I/usr/src/sys/netgraph7 -I/usr/src/sys/net/ipfw .include <bsd.kmod.mk> EOF make clean make ls -l df736attack.ko |