File 1768-inet_dns-support-NOTIFY-by-name.patch of Package erlang
From 1c5cb8f4a6c1c235b03ea66bb3a9891b144d795f Mon Sep 17 00:00:00 2001
From: Alexander Clouter <alex@digriz.org.uk>
Date: Wed, 19 Apr 2023 16:21:14 +0100
Subject: [PATCH 08/10] inet_dns: support NOTIFY by name
---
lib/kernel/src/inet_dns.erl | 3 +++
lib/kernel/src/inet_dns.hrl | 1 +
2 files changed, 4 insertions(+)
diff --git a/lib/kernel/src/inet_dns.erl b/lib/kernel/src/inet_dns.erl
index d7400c706c..fc38e437aa 100644
--- a/lib/kernel/src/inet_dns.erl
+++ b/lib/kernel/src/inet_dns.erl
@@ -23,6 +23,7 @@
%%
%% RFC 1035: Domain Names - Implementation and Specification
%% RFC 1995: Incremental Zone Transfer in DNS
+%% RFC 1996: A Mechanism for Prompt Notification of Zone Changes (DNS NOTIFY)
%% RFC 2181: Clarifications to the DNS Specification
%% RFC 2782: A DNS RR for specifying the location of services (DNS SRV)
%% RFC 2915: The Naming Authority Pointer (NAPTR) DNS Resource Rec
@@ -477,6 +478,7 @@ decode_opcode(Opcode) ->
?QUERY -> 'query';
?IQUERY -> iquery;
?STATUS -> status;
+ ?NOTIFY -> notify;
_ when is_integer(Opcode) -> Opcode %% non-standard opcode
end.
@@ -485,6 +487,7 @@ encode_opcode(Opcode) ->
'query' -> ?QUERY;
iquery -> ?IQUERY;
status -> ?STATUS;
+ notify -> ?NOTIFY;
_ when is_integer(Opcode) -> Opcode %% non-standard opcode
end.
diff --git a/lib/kernel/src/inet_dns.hrl b/lib/kernel/src/inet_dns.hrl
index ced8bb321c..39cdd4252f 100644
--- a/lib/kernel/src/inet_dns.hrl
+++ b/lib/kernel/src/inet_dns.hrl
@@ -27,6 +27,7 @@
-define(QUERY, 16#0). %% standard query
-define(IQUERY, 16#1). %% inverse query
-define(STATUS, 16#2). %% nameserver status query
+-define(NOTIFY, 16#4). %% notify
%%
%% Currently defined response codes
--
2.35.3