mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00
Parse SVCB/HTTPS SvcParams list
Add full support for RFC 9460's SvcParams list. Amend the existing `dns_svcb_rr` record by a vector of new `dns_svcb_param` records containing aptly typed SvcParamKey and SvcParamValue pairs. Example output: ``` @load base/protocols/dns event dns_HTTPS( c: connection , msg: dns_msg , ans: dns_answer , https: dns_svcb_rr ) { for (_, param in https$svc_params) print to_json(param); # filter uninitialised values } ``` ``` $ dig https cloudflare-ech.com +short | tr [:space:] \\n 1 . alpn="h3,h2" ipv4hint=104.18.10.118,104.18.11.118 ech=AEX+DQBBHgAgACBGL2e9TiFwjK/w1Zg9AmRm7mgXHz3PjffP0mTFNMxmDQAEAAEAAQASY2xvdWRmbGFyZS1lY2guY29tAAA= ipv6hint=2606:4700::6812:a76,2606:4700::6812:b76 ``` ``` {"key":1,"alpn":["h3","h2"]} {"key":4,"hint":["104.18.10.118","104.18.11.118"]} {"key":5,"ech":"AEX+DQBBHgAgACBGL2e9TiFwjK/w1Zg9AmRm7mgXHz3PjffP0mTFNMxmDQAEAAEAAQASY2xvdWRmbGFyZS1lY2guY29tAAA="} {"key":6,"hint":["2606:4700::6812:a76","2606:4700::6812:b76"]} ``` Values with malformed data or belonging to invalid/reserved keys are passed raw bytes in network order for script-level inspection. Follow up to "Initial Support to DNS SVCB/HTTPS RR" https://github.com/zeek/zeek/pull/1808
This commit is contained in:
parent
f38ac30418
commit
397f7e5c0e
9 changed files with 214 additions and 32 deletions
|
@ -1,2 +1,2 @@
|
|||
### BTest baseline data generated by btest-diff. Do not edit. Use "btest -U/-u" to update. Requires BTest >= 0.63.
|
||||
[svc_priority=1, target_name=.]
|
||||
[svc_priority=1, target_name=., svc_params=[[key=1, mandatory=<uninitialized>, alpn=[h3, h3-29, h3-28, h3-27, h2], p=<uninitialized>, hint=<uninitialized>, ech=<uninitialized>, raw=<uninitialized>], [key=4, mandatory=<uninitialized>, alpn=<uninitialized>, p=<uninitialized>, hint=[104.16.132.229, 104.16.133.229], ech=<uninitialized>, raw=<uninitialized>], [key=6, mandatory=<uninitialized>, alpn=<uninitialized>, p=<uninitialized>, hint=[2606:4700::6810:84e5, 2606:4700::6810:85e5], ech=<uninitialized>, raw=<uninitialized>]]]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue