GNU bug report logs - #26820
26.0.50; DNS mode and IPv6 reverse zones

Previous Next

Package: emacs;

Reported by: peder <at> klingenberg.no (Peder O. Klingenberg)

Date: Sun, 7 May 2017 18:52:01 UTC

Severity: wishlist

Tags: patch

Found in version 26.0.50

Fixed in version 26.1

Done: Glenn Morris <rgm <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 26820 in the body.
You can then email your comments to 26820 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#26820; Package emacs. (Sun, 07 May 2017 18:52:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to peder <at> klingenberg.no (Peder O. Klingenberg):
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sun, 07 May 2017 18:52:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: peder <at> klingenberg.no (Peder O. Klingenberg)
To: bug-gnu-emacs <at> gnu.org
Subject: 26.0.50; DNS mode and IPv6 reverse zones
Date: Sun, 07 May 2017 20:51:03 +0200
Last week I was trying to set up reverse delegations for some newly
assigned IPv6 address space.  It was... painful.

IPv6 addresses are ugly enough in their normal format, but when used in
a reverse zone, they need to be converted to individual nibbles
separated by dots, reversed, and have .ip6.arpa. appended.  The result
is less than human friendly.

So I've written a new feature for dns-mode.el that allows me to mostly
relate to the normal IPv6 format, and convert automatically to the
nibble format.  I can for instance do this in a (part of a) zone file,
where I'm only interested in defining hosts in the last 16 bits of the
address:

$ORIGIN 2a0a:3dc0:10::/112
::1/-112 IN PTR www.example.com.

And then, by pressing C-c C-e on each of the IPv6 addresses, end up with
the necessary

$ORIGIN 0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.1.0.0.0.c.d.3.a.0.a.2.ip6.arpa. 
1.0.0.0 IN PTR www.example.com.

Assuming I'm doing this as I type, I can then yank the last
standard-format address, do a minimal edit, C-c C-e again, and continue
typing to define the next PTR record.

I'm hoping this sounds useful to other people as well.  I'll pass along
the patch as soon as I get a bug# to attach to it. :)




Severity set to 'wishlist' from 'normal' Request was from peder <at> klingenberg.no (Peder O. Klingenberg) to control <at> debbugs.gnu.org. (Sun, 07 May 2017 18:53:01 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#26820; Package emacs. (Sun, 07 May 2017 19:00:02 GMT) Full text and rfc822 format available.

Message #10 received at 26820 <at> debbugs.gnu.org (full text, mbox):

From: peder <at> klingenberg.no (Peder O. Klingenberg)
To: 26820 <at> debbugs.gnu.org
Subject: Re: bug#26820: 26.0.50; DNS mode and IPv6 reverse zones
Date: Sun, 07 May 2017 20:58:59 +0200
[Message part 1 (text/plain, inline)]
peder <at> klingenberg.no (Peder O. Klingenberg) writes:

> I'll pass along the patch as soon as I get a bug# to attach to it. :)

As promised, here's the patch.  I even wrote tests, which is a first for
me.  I couldn't find dns-mode documented in any manual, so I haven't
written any info docs, but the docstrings should hopefully give enough
information to use the feature.

[0001-Command-to-convert-IPv6-addresses-in-zone-files.patch (text/x-patch, attachment)]

Added tag(s) patch. Request was from peder <at> klingenberg.no (Peder O. Klingenberg) to control <at> debbugs.gnu.org. (Sun, 07 May 2017 19:00:03 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#26820; Package emacs. (Sun, 21 May 2017 00:24:02 GMT) Full text and rfc822 format available.

Message #15 received at 26820 <at> debbugs.gnu.org (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: peder <at> klingenberg.no (Peder O. Klingenberg)
Cc: 26820 <at> debbugs.gnu.org
Subject: Re: bug#26820: 26.0.50; DNS mode and IPv6 reverse zones
Date: Sat, 20 May 2017 20:22:59 -0400
Thanks, but:
    
    In dns-mode-reverse-and-expand-ipv6:
    ~/dns-mode.el:330:41:Warning: reference to free variable ‘with’
    ~/dns-mode.el:330:46:Warning: reference to free variable ‘filler-done’
    ~/dns-mode.el:330:58:Warning: reference to free variable ‘=’
    ~/dns-mode.el:331:41:Warning: reference to free variable ‘for’
    ~/dns-mode.el:331:45:Warning: reference to free variable ‘chunk’
    ~/dns-mode.el:331:51:Warning: reference to free variable ‘in’
    ~/dns-mode.el:332:41:Warning: reference to free variable ‘if’
    ~/dns-mode.el:334:41:Warning: reference to free variable ‘append’
    ~/dns-mode.el:335:58:Warning: reference to free variable ‘repeat’
    ~/dns-mode.el:336:58:Warning: reference to free variable ‘collect’
    ~/dns-mode.el:337:56:Warning: assignment to free variable ‘filler-done’
    ~/dns-mode.el:338:41:Warning: reference to free variable ‘else’
    ~/dns-mode.el:346:17:Warning: reference to free variable ‘char’
    ~/dns-mode.el:346:22:Warning: reference to free variable ‘across’
    ~/dns-mode.el:347:13:Warning: reference to free variable ‘do’
    
    In end of data:
    ~/dns-mode.el:360:1:Warning: the following functions are not known to be
        defined: loop, minusp

which is due to using stuff from cl.el without requiring it.
And in any case, the cl-lib versions should be used instead these days.
Please could you revise that? TIA.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#26820; Package emacs. (Sun, 21 May 2017 19:57:02 GMT) Full text and rfc822 format available.

Message #18 received at 26820 <at> debbugs.gnu.org (full text, mbox):

From: peder <at> klingenberg.no (Peder O. Klingenberg)
To: Glenn Morris <rgm <at> gnu.org>
Cc: 26820 <at> debbugs.gnu.org
Subject: Re: bug#26820: 26.0.50; DNS mode and IPv6 reverse zones
Date: Sun, 21 May 2017 21:56:32 +0200
[Message part 1 (text/plain, inline)]
Glenn Morris <rgm <at> gnu.org> writes:

> And in any case, the cl-lib versions should be used instead these days.
> Please could you revise that? TIA.

Revised patch attached, using the cl-lib versions.  dns-mode.el now
compiles without warnings in emacs -Q.  Thank you for taking an
interest.

[0001-Command-to-convert-IPv6-addresses-in-zone-files.patch (text/x-patch, attachment)]

Reply sent to Glenn Morris <rgm <at> gnu.org>:
You have taken responsibility. (Wed, 24 May 2017 00:37:01 GMT) Full text and rfc822 format available.

Notification sent to peder <at> klingenberg.no (Peder O. Klingenberg):
bug acknowledged by developer. (Wed, 24 May 2017 00:37:02 GMT) Full text and rfc822 format available.

Message #23 received at 26820-done <at> debbugs.gnu.org (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: 26820-done <at> debbugs.gnu.org
Subject: Re: bug#26820: 26.0.50; DNS mode and IPv6 reverse zones
Date: Tue, 23 May 2017 20:36:04 -0400
Version: 26.1

Thanks; tweaked and applied as 8f6550b.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 21 Jun 2017 11:24:03 GMT) Full text and rfc822 format available.

This bug report was last modified 8 years and 58 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.