mirror of
https://gitlab.nic.cz/knot/knot-dns.git
synced 2026-05-28 04:02:31 -04:00
libzscanner: add support for 'dohpath' and 'ohttp' SVCB parameters
This commit is contained in:
parent
bbb887bb47
commit
2e52cfd3b3
6 changed files with 44855 additions and 44098 deletions
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
|
@ -1840,10 +1840,13 @@
|
|||
svcb_key_ipv4hint = ("ipv4hint" %_write16_4);
|
||||
svcb_key_ech = ("ech" %_write16_5);
|
||||
svcb_key_ipv6hint = ("ipv6hint" %_write16_6);
|
||||
svcb_key_dohpath = ("dohpath" %_write16_7);
|
||||
svcb_key_ohttp = ("ohttp" %_write16_8);
|
||||
|
||||
mandat_value_ :=
|
||||
(svcb_key_generic | svcb_key_alpn | svcb_key_ndalpn | svcb_key_port |
|
||||
svcb_key_ipv4hint | svcb_key_ech | svcb_key_ipv6hint
|
||||
svcb_key_ipv4hint | svcb_key_ech | svcb_key_ipv6hint | svcb_key_dohpath |
|
||||
svcb_key_ohttp
|
||||
) >_rdata_2B_check $!_mandat_value_error %_ret . ([,\"] | all_wchar);
|
||||
mandat_value = alpha ${ fhold; fcall mandat_value_; };
|
||||
|
||||
|
|
@ -1857,20 +1860,24 @@
|
|||
svcb_ipv4 = ((ipv4_addr_write . ("," . ipv4_addr_write)*) >_item_length2_init %_item_length2_exit);
|
||||
svcb_ech = (base64_quartet+ >_item_length2_init %_item_length2_exit);
|
||||
svcb_ipv6 = ((ipv6_addr_write . ("," . ipv6_addr_write)*) >_item_length2_init %_item_length2_exit);
|
||||
svcb_dohpath = (text >_item_length2_init %_item_length2_exit);
|
||||
|
||||
svcb_param_generic = (svcb_key_generic . svcb_generic);
|
||||
svcb_param_mandatory = (svcb_key_mandatory . "=" . (svcb_mandat | ('\"' . svcb_mandat . '\"')));
|
||||
svcb_param_alpn = (svcb_key_alpn . "=" . (svcb_alpn | ('\"' . svcb_alpn . '\"')));
|
||||
svcb_param_mandatory = (svcb_key_mandatory . "=" . (svcb_mandat | ('\"' . svcb_mandat . '\"')));
|
||||
svcb_param_alpn = (svcb_key_alpn . "=" . (svcb_alpn | ('\"' . svcb_alpn . '\"')));
|
||||
svcb_param_ndalpn = (svcb_key_ndalpn . svcb_empty);
|
||||
svcb_param_port = (svcb_key_port . "=" . (svcb_port | ('\"' . svcb_port . '\"')));
|
||||
svcb_param_ipv4hint = (svcb_key_ipv4hint . "=" . (svcb_ipv4 | ('\"' . svcb_ipv4 . '\"')));
|
||||
svcb_param_ech = (svcb_key_ech . "=" . (svcb_ech | ('\"' . svcb_ech . '\"')));
|
||||
svcb_param_ipv6hint = (svcb_key_ipv6hint . "=" . (svcb_ipv6 | ('\"' . svcb_ipv6 . '\"')));
|
||||
svcb_param_port = (svcb_key_port . "=" . (svcb_port | ('\"' . svcb_port . '\"')));
|
||||
svcb_param_ipv4hint = (svcb_key_ipv4hint . "=" . (svcb_ipv4 | ('\"' . svcb_ipv4 . '\"')));
|
||||
svcb_param_ech = (svcb_key_ech . "=" . (svcb_ech | ('\"' . svcb_ech . '\"')));
|
||||
svcb_param_ipv6hint = (svcb_key_ipv6hint . "=" . (svcb_ipv6 | ('\"' . svcb_ipv6 . '\"')));
|
||||
svcb_param_dohpath = (svcb_key_dohpath . "=" . (svcb_dohpath | ('\"' . svcb_dohpath . '\"')));
|
||||
svcb_param_ohttp = (svcb_key_ohttp . svcb_empty);
|
||||
|
||||
svcb_param_any =
|
||||
(svcb_param_generic | svcb_param_mandatory | svcb_param_alpn |
|
||||
svcb_param_ndalpn | svcb_param_port | svcb_param_ipv4hint |
|
||||
svcb_param_ech | svcb_param_ipv6hint
|
||||
svcb_param_ech | svcb_param_ipv6hint | svcb_param_dohpath |
|
||||
svcb_param_ohttp
|
||||
) >_svcb_param_init %_svcb_param_exit;
|
||||
svcb_params_ :=
|
||||
((sep . svcb_param_any)* . sep?) >_svcb_params_init
|
||||
|
|
|
|||
|
|
@ -92,3 +92,9 @@ example12 SVCB 1 . alpn=foo\\\092,bar
|
|||
|
||||
example20 SVCB 1 . alpn=\
|
||||
example21 SVCB 1 . alpn=a\ b
|
||||
|
||||
example30 SVCB 1 . dohpath=/q{?dns}
|
||||
example31 SVCB 1 . dohpath="/dns-query{?dns}"
|
||||
|
||||
;example40 SVCB 1 . ohttp
|
||||
example40 SVCB 1 . key8
|
||||
|
|
|
|||
|
|
@ -20,7 +20,10 @@ $TTL 1
|
|||
@ SVCB 1 . ech="Zm9vYg=="
|
||||
@ SVCB 1 . ipv6hint=::1
|
||||
@ SVCB 1 . ipv6hint="::1"
|
||||
@ SVCB 1 . key7
|
||||
@ SVCB 1 . dohpath=/q{?dns}
|
||||
@ SVCB 1 . dohpath="/dns-query{?dns}"
|
||||
@ SVCB 1 . ohttp
|
||||
@ SVCB 1 . key707
|
||||
@ SVCB 1 . key65535
|
||||
@ SVCB 1 . key65535=a
|
||||
@ SVCB 1 . key65535="a"
|
||||
|
|
@ -90,6 +93,10 @@ example.com. SVCB 16 foo.example.org. alpn=f\\\092oo\092,bar,h2
|
|||
@ SVCB 1 . ipv6hint=
|
||||
@ SVCB 1 . ipv6hint=::1,,::2
|
||||
@ SVCB 1 . ipv6hint=::W
|
||||
@ SVCB 1 . dohpath
|
||||
@ SVCB 1 . dohpath=
|
||||
@ SVCB 1 . ohttp=
|
||||
@ SVCB 1 . ohttp=x
|
||||
|
||||
; RFC KO examples
|
||||
example.com. SVCB 1 foo.example.com. (
|
||||
|
|
|
|||
|
|
@ -110,7 +110,25 @@ OWNER=00
|
|||
CLASS=0001
|
||||
RRTTL=00000001
|
||||
RTYPE=0040
|
||||
RDATA=00010000070000
|
||||
RDATA=000100000700082F717B3F646E737D
|
||||
------
|
||||
OWNER=00
|
||||
CLASS=0001
|
||||
RRTTL=00000001
|
||||
RTYPE=0040
|
||||
RDATA=000100000700102F646E732D71756572797B3F646E737D
|
||||
------
|
||||
OWNER=00
|
||||
CLASS=0001
|
||||
RRTTL=00000001
|
||||
RTYPE=0040
|
||||
RDATA=00010000080000
|
||||
------
|
||||
OWNER=00
|
||||
CLASS=0001
|
||||
RRTTL=00000001
|
||||
RTYPE=0040
|
||||
RDATA=00010002C30000
|
||||
------
|
||||
OWNER=00
|
||||
CLASS=0001
|
||||
|
|
@ -300,6 +318,14 @@ WARNG=ZS_BAD_ADDRESS_CHAR
|
|||
------
|
||||
WARNG=ZS_BAD_ADDRESS_CHAR
|
||||
------
|
||||
WARNG=ZS_BAD_SVCB_PARAM
|
||||
------
|
||||
WARNG=ZS_BAD_SVCB_PARAM
|
||||
------
|
||||
WARNG=ZS_BAD_SVCB_PARAM
|
||||
------
|
||||
WARNG=ZS_BAD_SVCB_PARAM
|
||||
------
|
||||
WARNG=ZS_DUPLICATE_SVCB_KEY
|
||||
------
|
||||
WARNG=ZS_BAD_SVCB_PARAM
|
||||
|
|
|
|||
Loading…
Reference in a new issue