Test invalid divert combinations and adapt error messages.
authorbluhm <bluhm@openbsd.org>
Wed, 29 Nov 2017 13:37:08 +0000 (13:37 +0000)
committerbluhm <bluhm@openbsd.org>
Wed, 29 Nov 2017 13:37:08 +0000 (13:37 +0000)
13 files changed:
regress/sbin/pfctl/Makefile
regress/sbin/pfctl/pfail55.ok
regress/sbin/pfctl/pfail56.ok
regress/sbin/pfctl/pfail63.in [new file with mode: 0644]
regress/sbin/pfctl/pfail63.ok [new file with mode: 0644]
regress/sbin/pfctl/pfail64.in [new file with mode: 0644]
regress/sbin/pfctl/pfail64.ok [new file with mode: 0644]
regress/sbin/pfctl/pfail65.in [new file with mode: 0644]
regress/sbin/pfctl/pfail65.ok [new file with mode: 0644]
regress/sbin/pfctl/pfail66.in [new file with mode: 0644]
regress/sbin/pfctl/pfail66.ok [new file with mode: 0644]
regress/sbin/pfctl/pfail67.in [new file with mode: 0644]
regress/sbin/pfctl/pfail67.ok [new file with mode: 0644]

index 281f282..51fa483 100644 (file)
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.229 2017/11/29 00:24:32 sashan Exp $
+# $OpenBSD: Makefile,v 1.230 2017/11/29 13:37:08 bluhm Exp $
 
 # TARGETS
 # pf: feed pfNN.in through pfctl and check whether the output matches pfNN.ok
@@ -19,6 +19,7 @@ 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 104 105 106 107 108 109 110 111
 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 55 56 57 58 59 60 61 62
+PFFAIL+=63 64 65 66 67
 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
index eec355a..6bd0879 100644 (file)
@@ -1 +1 @@
-stdin:1: address family mismatch for divert
+stdin:1: divert-to address family mismatch
index eec355a..6bd0879 100644 (file)
@@ -1 +1 @@
-stdin:1: address family mismatch for divert
+stdin:1: divert-to address family mismatch
diff --git a/regress/sbin/pfctl/pfail63.in b/regress/sbin/pfctl/pfail63.in
new file mode 100644 (file)
index 0000000..9834c00
--- /dev/null
@@ -0,0 +1 @@
+pass divert-to 127.0.0.1 port 1 divert-reply
diff --git a/regress/sbin/pfctl/pfail63.ok b/regress/sbin/pfctl/pfail63.ok
new file mode 100644 (file)
index 0000000..5c57e65
--- /dev/null
@@ -0,0 +1 @@
+stdin:1: more than one divert option
diff --git a/regress/sbin/pfctl/pfail64.in b/regress/sbin/pfctl/pfail64.in
new file mode 100644 (file)
index 0000000..6d1c5d0
--- /dev/null
@@ -0,0 +1 @@
+pass divert-reply divert-packet port 1234
diff --git a/regress/sbin/pfctl/pfail64.ok b/regress/sbin/pfctl/pfail64.ok
new file mode 100644 (file)
index 0000000..5c57e65
--- /dev/null
@@ -0,0 +1 @@
+stdin:1: more than one divert option
diff --git a/regress/sbin/pfctl/pfail65.in b/regress/sbin/pfctl/pfail65.in
new file mode 100644 (file)
index 0000000..ca71003
--- /dev/null
@@ -0,0 +1 @@
+pass divert-packet port 12345 divert-to 127.0.0.1 port 1
diff --git a/regress/sbin/pfctl/pfail65.ok b/regress/sbin/pfctl/pfail65.ok
new file mode 100644 (file)
index 0000000..5c57e65
--- /dev/null
@@ -0,0 +1 @@
+stdin:1: more than one divert option
diff --git a/regress/sbin/pfctl/pfail66.in b/regress/sbin/pfctl/pfail66.in
new file mode 100644 (file)
index 0000000..f701d77
--- /dev/null
@@ -0,0 +1 @@
+pass out divert-to 127.0.0.1 port 1
diff --git a/regress/sbin/pfctl/pfail66.ok b/regress/sbin/pfctl/pfail66.ok
new file mode 100644 (file)
index 0000000..49580a8
--- /dev/null
@@ -0,0 +1 @@
+stdin:1: divert-to used with outgoing rule
diff --git a/regress/sbin/pfctl/pfail67.in b/regress/sbin/pfctl/pfail67.in
new file mode 100644 (file)
index 0000000..5011c1e
--- /dev/null
@@ -0,0 +1 @@
+pass in divert-reply
diff --git a/regress/sbin/pfctl/pfail67.ok b/regress/sbin/pfctl/pfail67.ok
new file mode 100644 (file)
index 0000000..8fad713
--- /dev/null
@@ -0,0 +1 @@
+stdin:1: divert-reply used with incoming rule