Open herenickname opened 2 weeks ago
Found another flaw in definitions:
export interface ClientSubnetOptionData {
code: 'CLIENT_SUBNET';
ip: string;
family?: 1 | 2;
sourcePrefixLength?: number;
scopePrefixLength?: number;
}
Here 'CLIENT_SUBNET' is in the code
field, in reality it is in the type
field
I tried to set NXDOMAIN as rcode, but it was ignored. The problem seems to be that there is no type serialization at all in this part of the code: https://github.com/dnsquery/dns-packet/blob/main/index.mjs#L137
Example code:
Decoded packet:
As you can see, the true path to the EDNS ECS is
packet.additionals[].options[]
, but the typescript says:Property 'options' does not exist on type 'OptAnswer'.
Because the current typescript definition for the
additionals
field is:with
data
field, notoptions