Skip Menu |

This queue is for tickets about the Net-DNS CPAN distribution.

Report information
The Basics
Id: 119679
Status: resolved
Priority: 0/
Queue: Net-DNS

People
Owner: Nobody in particular
Requestors: gbrown [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: PATCH: UpdateHandler for responding to UPDATE packets
Attached is a trivial patch (against the current trunk) to add support for handling UPDATE packets. In case copyright is an issue I hereby release it into the Public Domain.
Subject: net-dns-update-handler-2017-01-03.patch
diff --git a/lib/Net/DNS/Nameserver.pm b/lib/Net/DNS/Nameserver.pm index bf5ba26..0639843 100644 --- a/lib/Net/DNS/Nameserver.pm +++ b/lib/Net/DNS/Nameserver.pm @@ -233,6 +233,14 @@ sub make_reply { $rcode = "NOTIMP"; } + } elsif ( $opcode eq "UPDATE" ) { #RFC2136 + if ( ref $self->{UpdateHandler} eq "CODE" ) { + ( $rcode, $ans, $auth, $add, $headermask ) = + &{$self->{UpdateHandler}}(@arglist); + } else { + $rcode = "NOTIMP"; + } + } else { print "ERROR: opcode $opcode unsupported\n" if $self->{Verbose}; $rcode = "FORMERR"; @@ -575,6 +583,9 @@ Attributes are: NotifyHandler Reference to reply-handling subroutine for queries with opcode NOTIFY (RFC1996) + UpdateHandler Reference to reply-handling + subroutine for queries with + opcode UPDATE (RFC2136) Verbose Print info about received queries. Defaults to 0 (off). Truncate Truncates UDP packets that
From: rwfranks [...] acm.org
On Tue Jan 03 17:38:19 2017, GBROWN wrote: Show quoted text
> Attached is a trivial patch (against the current trunk) to add support > for handling UPDATE packets.
Patch included in Net::DNS 1.07_01. Thank you for your contribution.