blob: 57793487e0c6dd757f9dfb9ec4743c7ff48a6a84 [file] [log] [blame]
Willy Tarreau7f96a842020-09-15 11:12:44 +02001# This is used to validate the address/port parser using "haproxy -c -f $file".
2# Some errors will be returned, they are expected to match the documented ones.
3
4frontend f1
5 log 127.0.0.1 local0
6 log 127.0.0.1:10000 local0
7 log 127.0.0.1:10001-10010 local0 # port range not permitted here in '127.0.0.1:10001-10010'
8 log 127.0.0.1:+10011 local0 # port offset not permitted here in ':::+10011'
9 log 127.0.0.1:-10012 local0 # port offset not permitted here in ':::-10012'
10
11 bind : # missing port specification in ':'
12 bind :11001
13 bind :::11002
14 bind :::11003-11010
15 bind :::+11011 # port offset not permitted here in ':::+11011'
16 bind :::-11012 # port offset not permitted here in ':::-11012'
Willy Tarreau5e1779a2020-09-16 16:28:08 +020017 bind udp@:11013 # dgram-type socket not acceptable in 'udp@:11013'
Willy Tarreau7f96a842020-09-15 11:12:44 +020018
19frontend f2
20 bind :::0 # invalid port '0'
21 bind :::0-11 # invalid port '0'
22 bind :::65016- # invalid port ''
23 bind :::65016-1024 # invalid port range '65016-1024'
24 bind :::65016--1024 # invalid port '-1024'
25 bind :::66016-1024 # invalid port '66016'
26
27backend b2
28 source :12001
29 source :::12002
30 source :::12003-12010 # port range not permitted here in '127.0.0.1:12003-12010'
31 source :::+12011 # port offset not permitted here in ':::+12011'
32 source :::-12012 # port offset not permitted here in ':::-12012'
33
34backend b3
35 server s1 :
36 server s2 localhost:13001
37 server s3 :13002
38 server s4 :+13003
39 server s5 :-13004
40 server s6 :13005-13010 # port range not permitted here in ':13005-13010'
41
42backend b4
43 server s1 : addr 0.0.0.1:14001 # addr: port specification not permitted here
44
45backend b5
46 server s1 : source localhost:15000
47 server s1 : source 0.0.0.1:15001
48 server s2 : source 0.0.0.1:+15002 # port offset not permitted here in '0.0.0.1:+15002'
49 server s3 : source 0.0.0.1:-15003 # port offset not permitted here in '0.0.0.1:-15003'
50 server s4 : source 0.0.0.1:15004-15010
51
52backend b6
53 server s1 : source 0.0.0.0 usesrc localhost:16000
54 server s1 : source 0.0.0.0 usesrc 0.0.0.1:16001
55 server s2 : source 0.0.0.0 usesrc 0.0.0.1:+16002 # port offset not permitted here in '0.0.0.1:+16002'
56 server s3 : source 0.0.0.0 usesrc 0.0.0.1:-16003 # port offset not permitted here in '0.0.0.1:-16003'
57 server s4 : source 0.0.0.0 usesrc 0.0.0.1:16004-16010 # port range not permitted here in '0.0.0.1:16004-16010'
58
59backend b7
60 server s1 : socks4 0.0.0.1 # missing port specification in '0.0.0.1'
61 server s2 : socks4 localhost:18000
62 server s2 : socks4 0.0.0.1:18001
63 server s3 : socks4 0.0.0.1:+18002 # port offset not permitted here in '0.0.0.1:+18002'
64 server s4 : socks4 0.0.0.1:-18003 # port offset not permitted here in '0.0.0.1:-18003'
65 server s5 : socks4 0.0.0.1:18004-18010 # port range not permitted here in '0.0.0.1:18004-18010'
66
67backend b8
68 tcp-check connect addr 0.0.0.1
69 tcp-check connect addr 0.0.0.1:
70 tcp-check connect addr localhost:19000
71 tcp-check connect addr 0.0.0.1:19001
72 tcp-check connect addr 0.0.0.1:+19002 # port offset not permitted here in '0.0.0.1:+19002'
73 tcp-check connect addr 0.0.0.1:-19003 # port offset not permitted here in '0.0.0.1:-19003'
74 tcp-check connect addr 0.0.0.1:19004-19005 # port range not permitted here in '0.0.0.1:19004-19010'