Skip to content

Commit

Permalink
inet_dns: FORMERR if more than one EDNS(0) option is present
Browse files Browse the repository at this point in the history
  • Loading branch information
jimdigriz committed Mar 2, 2023
1 parent 07cf1c5 commit 99815ee
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/kernel/src/inet_dns.erl
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,8 @@ decode_rr_section(Bin, N, Buffer, RRs) ->
RR =
case Type of
?S_OPT ->
% RFC 6891: 6.1.1. Return FORMERR if more than one EDNS(0) option
lists:keymember(dns_rr_opt, 1, RRs) andalso throw(?DECODE_ERROR),
<<ExtRcode,Version,Z:16>> = TTL,
#dns_rr_opt{
domain = Name,
Expand Down

0 comments on commit 99815ee

Please sign in to comment.