Re: [DNSOP] I-D Action: draft-ietf-dnsop-rrserial-00.txt

Stephane Bortzmeyer <bortzmeyer@nic.fr> Fri, 18 June 2021 12:33 UTC

Return-Path: <stephane@sources.org>
X-Original-To: dnsop@ietfa.amsl.com
Delivered-To: dnsop@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 577863A192F for <dnsop@ietfa.amsl.com>; Fri, 18 Jun 2021 05:33:15 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.65
X-Spam-Level:
X-Spam-Status: No, score=-1.65 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, HEADER_FROM_DIFFERENT_DOMAINS=0.249, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=no autolearn_force=no
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 3y_WFhjY6RW8 for <dnsop@ietfa.amsl.com>; Fri, 18 Jun 2021 05:33:10 -0700 (PDT)
Received: from ayla.bortzmeyer.org (ayla.bortzmeyer.org [92.243.4.211]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 1CE203A16B0 for <dnsop@ietf.org>; Fri, 18 Jun 2021 05:33:09 -0700 (PDT)
Received: by ayla.bortzmeyer.org (Postfix, from userid 10) id 1404DA0278; Fri, 18 Jun 2021 14:33:07 +0200 (CEST)
Received: by mail.sources.org (Postfix, from userid 1000) id EE688190B87; Fri, 18 Jun 2021 14:30:52 +0200 (CEST)
Date: Fri, 18 Jun 2021 14:30:52 +0200
From: Stephane Bortzmeyer <bortzmeyer@nic.fr>
To: Hugo Salgado <hsalgado@nic.cl>
Cc: dnsop@ietf.org
Message-ID: <20210618123052.GA20671@sources.org>
References: <162342216090.6059.5920585323129043595@ietfa.amsl.com> <20210613161540.GA14433@sources.org> <20210614140322.GA3276@pepino>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="KsGdsel6WgEHnImy"
Content-Disposition: inline
In-Reply-To: <20210614140322.GA3276@pepino>
X-Transport: UUCP rules
X-Operating-System: Debian GNU/Linux 10.9
X-Charlie: Je suis Charlie
User-Agent: Mutt/1.10.1 (2018-07-13)
Archived-At: <https://mailarchive.ietf.org/arch/msg/dnsop/t_wIZRstRxRBMAZlz49CvrfXzto>
Subject: Re: [DNSOP] I-D Action: draft-ietf-dnsop-rrserial-00.txt
X-BeenThere: dnsop@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: IETF DNSOP WG mailing list <dnsop.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/dnsop>, <mailto:dnsop-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/dnsop/>
List-Post: <mailto:dnsop@ietf.org>
List-Help: <mailto:dnsop-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/dnsop>, <mailto:dnsop-request@ietf.org?subject=subscribe>
X-List-Received-Date: Fri, 18 Jun 2021 12:33:15 -0000

On Mon, Jun 14, 2021 at 10:03:22AM -0400,
 Hugo Salgado <hsalgado@nic.cl> wrote 
 a message of 55 lines which said:

> In the case of NXDOMAIN, the reason for not adding RRSERIAL is
> because the response already has the SOA in the AUTHORITY, which
> would make it redundant.

OK, I see. Here are two implementations of the client part, in Python
and in Go, using this algorithm (RRSERIAL if NOERROR or SERVFAIL, and
the SOA record if NXDOMAIN).

Python :

% ./test-rrserial.py 200.1.122.30 dateserial.example.com TXT
dateserial.example.com. 43200 IN TXT "Test zone for RRSERIAL record"      
Serial of the answer is 2018081401

% ./test-rrserial.py 200.1.122.30 dateserial.example.com LOC
No value for dateserial.example.com/LOC
Serial found from SOA record: 2018081401

Go :

%   ./test-rrserial 200.1.122.30 incserial.example.com  MX
incserial.example.com.	43200	IN	MX	10 mail.incserial.example.com.
EDNS rrserial found, "1"

%   ./test-rrserial 200.1.122.30 incserial.example.com  SSHFP
Empty answer received
EDNS rrserial found, "1"

Note that you can do it with dig alone but the display of unknown data
is less pretty:

% dig +ednsopt=65024 @200.1.122.30 dateserial.example.com
...
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags: do; udp: 4096
; OPT=65024: 78 49 7a 79 ("xIzy")

Note also there is a bug in your server: when the name does not exist,
it sends incorrect messages. dig says "Message parser reports
malformed message packet" and the Python library "DNS message is
malformed". And the Go library:

%   ./test-rrserial 200.1.122.30 doesnotexist.incserial.example.com
Error in query: dns: overflowing header size