-# $OpenBSD: Makefile,v 1.222 2014/11/13 17:35:30 pelikan Exp $
+# $OpenBSD: Makefile,v 1.223 2015/05/19 17:16:20 mikeb Exp $
# TARGETS
# pf: feed pfNN.in through pfctl and check whether the output matches pfNN.ok
PFTESTS+=28 29 30 31 32 34 35 36 38 39 40 41 44 46 47 48 49 50
PFTESTS+=52 53 54 55 56 57 60 61 65 66 67 68 69 70 71 72 73
PFTESTS+=74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96
-PFTESTS+=97 98 99 100 101 102 103
+PFTESTS+=97 98 99 100 101 102 103 104
PFFAIL=1 2 3 4 5 6 7 8 11 12 13 14 15 16 17 19 20 23 25 27
-PFFAIL+=30 37 38 39 40 41 42 43 47 48 49 50 51 52 53 54
+PFFAIL+=30 37 38 39 40 41 42 43 47 48 49 50 51 52 53 54 55 56
PFSIMPLE=1 2
PFSETUP=1 4
PFLOAD=1 2 3 4 5 7 8 9 10 11 12 13 14 15 16 17 18 19 20 23 24 25 26 27 28 29
--- /dev/null
+# This test assumes that localhost points to 127.0.0.1 first
+pass in proto tcp to port 25 divert-to localhost port 8025
+# Test IPv4 addresses
+pass in proto tcp to port 25 divert-to 127.0.0.1 port 8025
+pass in inet proto tcp to port 25 divert-to 127.0.0.1 port 8025
+pass in inet proto tcp to port 25 divert-to localhost port 8025
+# Test IPv6 addresses
+pass in proto tcp to port 25 divert-to ::1 port 8025
+pass in inet6 proto tcp to port 25 divert-to ::1 port 8025
+pass in inet6 proto tcp to port 25 divert-to localhost port 8025
--- /dev/null
+pass in inet proto tcp from any to any port = 25 flags S/SA divert-to 127.0.0.1 port 8025
+pass in inet proto tcp from any to any port = 25 flags S/SA divert-to 127.0.0.1 port 8025
+pass in inet proto tcp from any to any port = 25 flags S/SA divert-to 127.0.0.1 port 8025
+pass in inet proto tcp from any to any port = 25 flags S/SA divert-to 127.0.0.1 port 8025
+pass in inet6 proto tcp from any to any port = 25 flags S/SA divert-to ::1 port 8025
+pass in inet6 proto tcp from any to any port = 25 flags S/SA divert-to ::1 port 8025
+pass in inet6 proto tcp from any to any port = 25 flags S/SA divert-to ::1 port 8025
--- /dev/null
+pass in inet6 proto tcp to port 25 divert-to 127.0.0.1 port 8025
--- /dev/null
+stdin:1: address family mismatch for divert
--- /dev/null
+pass in inet proto tcp to port 25 divert-to ::1 port 8025
--- /dev/null
+stdin:1: address family mismatch for divert