diff options
Diffstat (limited to 'regress/sbin/ipsecadm')
-rw-r--r-- | regress/sbin/ipsecadm/Makefile | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/regress/sbin/ipsecadm/Makefile b/regress/sbin/ipsecadm/Makefile new file mode 100644 index 00000000000..3b72f88bcc9 --- /dev/null +++ b/regress/sbin/ipsecadm/Makefile @@ -0,0 +1,47 @@ +# $OpenBSD: Makefile,v 1.1 2004/05/23 16:04:18 markus Exp $ + +SRC=192.0.2.0 +DST=192.0.2.1 +SPI=1000 +EK=eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee +AK=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa + +IPCOMP_ENABLE!= sysctl -n net.inet.ipcomp.enable +ESP_ENABLE!= sysctl -n net.inet.esp.enable +AH_ENABLE!= sysctl -n net.inet.ah.enable + +.INTERRUPT: + -@${SUDO} sysctl -q net.inet.ipcomp.enable=${IPCOMP_ENABLE} + -@${SUDO} sysctl -q net.inet.esp.enable=${ESP_ENABLE} + -@${SUDO} sysctl -q net.inet.ah.enable=${AH_ENABLE} + +.END: + -@${SUDO} sysctl -q net.inet.ipcomp.enable=${IPCOMP_ENABLE} + -@${SUDO} sysctl -q net.inet.esp.enable=${ESP_ENABLE} + -@${SUDO} sysctl -q net.inet.ah.enable=${AH_ENABLE} + +ipcomp: + @${SUDO} sysctl -q net.inet.ipcomp.enable=1 + ${SUDO} ipsecadm ipcomp -cpi ${SPI} -dst ${DST} -comp deflate + ${SUDO} ipsecadm delspi -spi ${SPI} -dst ${DST} -proto ipcomp + +tcpmd5: + ${SUDO} ipsecadm tcpmd5 -spi ${SPI} -src ${SRC} -dst ${DST} -key deadbeef + ${SUDO} ipsecadm delspi -spi ${SPI} -dst ${DST} -proto tcpmd5 + +esp: + @${SUDO} sysctl -q net.inet.esp.enable=1 + ${SUDO} ipsecadm new esp -spi ${SPI} -src ${SRC} -dst ${DST} \ + -enc aes -key ${EK} -auth sha1 -authkey ${AK} + ${SUDO} ipsecadm delspi -spi ${SPI} -dst ${DST} -proto esp + +ah: + @${SUDO} sysctl -q net.inet.ah.enable=1 + ${SUDO} ipsecadm new ah -spi ${SPI} -src ${SRC} -dst ${DST} \ + -key ${AK} -auth sha1 + ${SUDO} ipsecadm delspi -spi ${SPI} -dst ${DST} -proto ah + +REGRESS_TARGETS=ipcomp tcpmd5 esp ah +.PHONY: ${REGRESS_TARGETS} + +.include <bsd.regress.mk> |