[prev in list] [next in list] [prev in thread] [next in thread] 

List:       busybox
Subject:    [PATCH 0/3] nslookup: add -class option (query class)
From:       Henrique de Moraes Holschuh <henrique () nic ! br>
Date:       2021-12-08 14:19:57
Message-ID: cover.1629297592.git.henrique () nic ! br
[Download RAW message or body]

This patch series adds support for nslookup -class=<class>, an standard
feature that is present in other major implementations of nslookup.

If there are any suggestions for changes that are required for this
patch set to be accepted in BusyBox, I am willing to implement them.


Rationale:

Class CH (chaos) is used in dnsops (DNS operations) to publish metadata
about the DNS server (this includes recursive resolvers too).  It is
mainly used to query the remote DNS server's software/version, and to
identify which node is answering queries in anycast/cluster setups.
When you need this, you *need* this.  Moreso when you're doing it
remotely (think busybox installed inside a network appliance).

Class HS (hesiod) and ANY (wildcard) are of far more limited use right
now.  Added for completeness (but see coments about the last patch,
which is optional and removes them).

NIC.br wrote this patch because we'd like to see class CH query support
become a bit more generally available in network appliances using
embedded BusyBox, such as OpenWRT routers.


Patch breakdown:

PATCH 1/3: The first patch implements the full feature, and increases
code size of the nslookup applet by 209 bytes in AMD64.  This is the
patch I'd like to see applied to BusyBox.

PATCH 2/3: The second patch is optional, and increases BSS size by the
size of an int, in order to reduce the overall code size increase (in
AMD64) by 36 bytes.  If this is considered a good tradeoff, it could be
applied.

PATCH 3/3: The last patch is *very* optional, to be used only if it is
the only way this additional nslookup feature would be accepted into
busybox.  It removes support for class HS and ANY, and uses some ugly
coding to further reduce size by 19 bytes in AMD64.



Code size changes were measured using "make bloatcheck" on a Debian 10
AMD64 host, default compiler (gcc).

Henrique de Moraes Holschuh (3):
  nslookup: add support for DNS query class
  nslookup: query class: move query_class to a global
  nslookup: query class: remove support for class HS and ANY

 networking/nslookup.c | 21 ++++++++++++++++-----
 1 file changed, 16 insertions(+), 5 deletions(-)

-- 
2.20.1

_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic