aboutsummaryrefslogtreecommitdiffstats
path: root/tests/mslookup/mdns_test.err
blob: 51e5afe63b7ea675c3b01103a21435a16e9a86c4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
-- test_enc_dec_rfc_qname --
domain: "hlr.1234567.imsi"
exp: "\3hlr\a1234567\4imsi"
res: "\3hlr\a1234567\4imsi"
=> OK

qname: "\3hlr\a1234567\4imsi"
exp: "hlr.1234567.imsi"
res: "hlr.1234567.imsi"
=> OK

domain: "hlr..imsi"
exp: NULL
res: NULL
=> OK

domain: "hlr"
exp: "\3hlr"
res: "\3hlr"
=> OK

qname: "\3hlr"
exp: "hlr"
res: "hlr"
=> OK

domain: "hlr."
exp: NULL
res: NULL
=> OK

domain: ".hlr"
exp: NULL
res: NULL
=> OK

domain: ""
exp: NULL
res: NULL
=> OK

domain: "123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.12345"
exp: "\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\512345"
res: "\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\512345"
=> OK

qname: "\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\512345"
exp: "123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.12345"
res: "123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.12345"
=> OK

domain: "123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.123456789.12345toolong"
exp: NULL
res: NULL
=> OK

qname: "\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\t123456789\
exp: NULL
res: NULL
=> OK

qname: "\3hlr\a1234567\5imsi"
exp: NULL
res: NULL
=> OK

qname: "\2hlr\a1234567\4imsi"
exp: NULL
res: NULL
=> OK

qname: "\3hlr\3"
exp: NULL
res: NULL
=> OK

qname_max_len: 17
qname: "\3hlr\a1234567\4imsi"
exp: NULL
res: NULL
=> OK

-- test_enc_dec_rfc_header --
header in:
.id = 1337
.qr = 0
.opcode = 0
.aa = 0
.tc = 0
.rd = 0
.ra = 0
.z = 0
.rcode = 0
.qdcount = 1
.ancount = 0
.nscount = 0
.arcount = 0
encoded: 05 39 00 00 00 01 00 00 00 00 00 00 
header out:
.id = 1337
.qr = 0
.opcode = 0
.aa = 0
.tc = 0
.rd = 0
.ra = 0
.z = 0
.rcode = 0
.qdcount = 1
.ancount = 0
.nscount = 0
.arcount = 0
in (hexdump):  39 05 00 00 01 00 00 00 00 00 00 00 
out (hexdump): 39 05 00 00 01 00 00 00 00 00 00 00 
=> OK

header in:
.id = 42
.qr = 1
.opcode = 2
.aa = 1
.tc = 1
.rd = 1
.ra = 1
.z = 2
.rcode = 3
.qdcount = 1234
.ancount = 1111
.nscount = 2222
.arcount = 3333
encoded: 00 2a 97 a3 04 d2 04 57 08 ae 0d 05 
header out:
.id = 42
.qr = 1
.opcode = 2
.aa = 1
.tc = 1
.rd = 1
.ra = 1
.z = 2
.rcode = 3
.qdcount = 1234
.ancount = 1111
.nscount = 2222
.arcount = 3333
in (hexdump):  2a 00 97 a3 d2 04 57 04 ae 08 05 0d 
out (hexdump): 2a 00 97 a3 d2 04 57 04 ae 08 05 0d 
=> OK

-- test_enc_dec_rfc_header_einval --
=> OK

-- test_enc_dec_rfc_question --
question in:
.domain = hlr.1234567.imsi
.qtype = 255
.qclass = 1
encoded: 03 68 6c 72 07 31 32 33 34 35 36 37 04 69 6d 73 69 00 00 ff 00 01 
question out:
.domain = hlr.1234567.imsi
.qtype = 255
.qclass = 1
=> OK

question in:
.domain = hlr.1234567.imsi
.qtype = 1
.qclass = 255
encoded: 03 68 6c 72 07 31 32 33 34 35 36 37 04 69 6d 73 69 00 00 01 00 ff 
question out:
.domain = hlr.1234567.imsi
.qtype = 1
.qclass = 255
=> OK

question in:
.domain = hlr.1234567.imsi
.qtype = 28
.qclass = 255
encoded: 03 68 6c 72 07 31 32 33 34 35 36 37 04 69 6d 73 69 00 00 1c 00 ff 
question out:
.domain = hlr.1234567.imsi
.qtype = 28
.qclass = 255
=> OK

-- test_enc_dec_rfc_question_null --
=> OK

-- test_enc_dec_rfc_record --
question in:
.domain = hlr.1234567.imsi
.type = 1
.class = 1
.ttl = 1234
.rdlength = 9
.rdata = "10.42.2.1"
encoded: 03 68 6c 72 07 31 32 33 34 35 36 37 04 69 6d 73 69 00 00 01 00 01 00 00 04 d2 00 09 31 30 2e 34 32 2e 32 2e 31 
record_len: 37
question out:
.domain = hlr.1234567.imsi
.type = 1
.class = 1
.ttl = 1234
.rdlength = 9
.rdata = "10.42.2.1"
=> OK

-- test_result_from_answer --
---
test: IPv4
error: false
records:
- TXT age=3
- A 42.42.42.42
- TXT port=444
exp:  -> ipv4: 23.42.47.11:444 (age=3) (not-last)
res:  -> ipv4: 23.42.47.11:444 (age=3) (not-last)
=> OK
---
test: IPv6
error: false
records:
- TXT age=3
- AAAA 1122:3344:5566:7788:99aa:bbcc:ddee:ff00
- TXT port=666
exp:  -> ipv6: [1122:3344:5566:7788:99aa:bbcc:ddee:ff00]:666 (age=3) (not-last)
res:  -> ipv6: [1122:3344:5566:7788:99aa:bbcc:ddee:ff00]:666 (age=3) (not-last)
=> OK
---
test: IPv4 + IPv6
error: false
records:
- TXT age=3
- A 42.42.42.42
- TXT port=444
- AAAA 1122:3344:5566:7788:99aa:bbcc:ddee:ff00
- TXT port=666
exp:  -> ipv4: 23.42.47.11:444 -> ipv6: [1122:3344:5566:7788:99aa:bbcc:ddee:ff00]:666 (age=3) (not-last)
res:  -> ipv4: 23.42.47.11:444 -> ipv6: [1122:3344:5566:7788:99aa:bbcc:ddee:ff00]:666 (age=3) (not-last)
=> OK
---
test: A twice
error: true
records:
- TXT age=3
- A 42.42.42.42
- TXT port=444
- A 42.42.42.42
DLGLOBAL ERROR 'A' record found twice in mDNS answer
=> OK
---
test: AAAA twice
error: true
records:
- TXT age=3
- AAAA 1122:3344:5566:7788:99aa:bbcc:ddee:ff00
- TXT port=444
- AAAA 1122:3344:5566:7788:99aa:bbcc:ddee:ff00
DLGLOBAL ERROR 'AAAA' record found twice in mDNS answer
=> OK
---
test: invalid TXT: no key/value pair
error: true
records:
- TXT age=3
- AAAA 1122:3344:5566:7788:99aa:bbcc:ddee:ff00
- TXT 12345
DLGLOBAL ERROR failed to decode txt record
=> OK
---
test: age twice
error: true
records:
- TXT age=3
- TXT age=3
DLGLOBAL ERROR duplicate 'TXT' record for 'age'
=> OK
---
test: port as first record
error: true
records:
- TXT port=444
DLGLOBAL ERROR 'TXT' record for 'port' without previous 'A' or 'AAAA' record
=> OK
---
test: port without previous ip record
error: true
records:
- TXT age=3
- TXT port=444
DLGLOBAL ERROR 'TXT' record for 'port' without previous 'A' or 'AAAA' record
=> OK
---
test: invalid TXT: invalid key
error: true
records:
- TXT age=3
- AAAA 1122:3344:5566:7788:99aa:bbcc:ddee:ff00
- TXT hello=world
DLGLOBAL ERROR unexpected key 'hello' in TXT record
=> OK
---
test: unexpected record type
error: true
records:
- TXT age=3
- (invalid)
DLGLOBAL ERROR unexpected record type
=> OK
---
test: missing record: age
error: true
records:
- A 42.42.42.42
- TXT port=444
DLGLOBAL ERROR missing resource records in mDNS answer
=> OK
---
test: missing record: port for ipv4
error: true
records:
- TXT age=3
- A 42.42.42.42
DLGLOBAL ERROR missing resource records in mDNS answer
=> OK
---
test: missing record: port for ipv4 #2
error: true
records:
- TXT age=3
- AAAA 1122:3344:5566:7788:99aa:bbcc:ddee:ff00
- TXT port=666
- A 42.42.42.42
DLGLOBAL ERROR missing resource records in mDNS answer
=> OK