Age | Commit message (Collapse) | Author |
|
SRV lookups are supported since "6b4960155 nslookup: implement support
for SRV records" and should therefore be mentioned as a possible
QUERY_TYPE in the help message.
Signed-off-by: Paul Spooren <mail@aparcar.org>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Only print when there was no answer at all.
function old new delta
send_queries 1834 1813 -21
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
function old new delta
finalize 348 343 -5
parse_resolvconf 306 299 -7
list_i2c_busses_and_exit 495 483 -12
bootchartd_main 1091 1076 -15
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 0/4 up/down: 0/-39) Total: -39 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
text data bss dec hex filename
1021236 559 5052 1026847 fab1f busybox_old
1021120 559 5052 1026731 faaab busybox_unstripped
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
function old new delta
udhcp_str2optset 616 650 +34
setpriv_main 950 975 +25
switch_root_main 688 706 +18
parse 958 970 +12
getopt_main 622 628 +6
parse_resolvconf 302 306 +4
mpstat_main 1139 1142 +3
static.p 4 - -4
cdcmd 717 702 -15
strtok 148 - -148
------------------------------------------------------------------------------
(add/remove: 0/3 grow/shrink: 7/1 up/down: 102/-167) Total: -65 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Add support for querying and parsing SRV DNS records.
function old new delta
send_queries 1711 1865 +154
qtypes 72 80 +8
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Under some circumstances, a DNS reply might contain no resource records,
e.g. when a valid domain is queried that does not have records of the
requested type.
Example with nslookup from BIND dnsutils:
$ nslookup -q=SRV example.org
Server: 10.11.12.13
Address: 10.11.12.13#53
Non-authoritative answer:
*** Can't find example.org: No answer
Currently the busybox nslookup applet simply prints nothing after the
"Non-authoritative answer:" line in the same situation.
This change modifies nslookup to either print "Parse error" or "No answer"
diagnostics, depending on the parse_reply() return value.
function old new delta
send_queries 1676 1711 +35
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Back in 2007, commit 0c97c9d43707 ("'simple' error message functions by
Loic Grenie") introduced bb_simple_perror_msg() to allow for a lower
overhead call to bb_perror_msg() when only a string was being printed
with no parameters. This saves space for some CPU architectures because
it avoids the overhead of a call to a variadic function. However there
has never been a simple version of bb_error_msg(), and since 2007 many
new calls to bb_perror_msg() have been added that only take a single
parameter and so could have been using bb_simple_perror_message().
This changeset introduces 'simple' versions of bb_info_msg(),
bb_error_msg(), bb_error_msg_and_die(), bb_herror_msg() and
bb_herror_msg_and_die(), and replaces all calls that only take a
single parameter, or use something like ("%s", arg), with calls to the
corresponding 'simple' version.
Since it is likely that single parameter calls to the variadic functions
may be accidentally reintroduced in the future a new debugging config
option WARN_SIMPLE_MSG has been introduced. This uses some macro magic
which will cause any such calls to generate a warning, but this is
turned off by default to avoid use of the unpleasant macros in normal
circumstances.
This is a large changeset due to the number of calls that have been
replaced. The only files that contain changes other than simple
substitution of function calls are libbb.h, libbb/herror_msg.c,
libbb/verror_msg.c and libbb/xfuncs_printf.c. In miscutils/devfsd.c,
networking/udhcp/common.h and util-linux/mdev.c additonal macros have
been added for logging so that single parameter and multiple parameter
logging variants exist.
The amount of space saved varies considerably by architecture, and was
found to be as follows (for 'defconfig' using GCC 7.4):
Arm: -92 bytes
MIPS: -52 bytes
PPC: -1836 bytes
x86_64: -938 bytes
Note that for the MIPS architecture only an exception had to be made
disabling the 'simple' calls for 'udhcp' (in networking/udhcp/common.h)
because it made these files larger on MIPS.
Signed-off-by: James Byrne <james.byrne@origamienergy.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
function old new delta
nslookup_main 757 760 +3
send_queries 1690 1677 -13
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
function old new delta
parse_resolvconf - 311 +311
add_query_with_search - 105 +105
nslookup_main 873 757 -116
------------------------------------------------------------------------------
(add/remove: 2/0 grow/shrink: 0/1 up/down: 416/-116) Total: 300 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
function old new delta
nslookup_main 2644 2611 -33
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
function old new delta
add_query 95 89 -6
nslookup_main 2692 2641 -51
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 0/2 up/down: 0/-57) Total: -57 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Usage: nslookup [-type=QUERY_TYPE] [-debug] HOST [DNS_SERVER]
Query DNS about HOST
QUERY_TYPE: soa,ns,a,aaaa,cname,mx,txt,ptr,any
function old new delta
packed_usage 32189 32258 +69
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
function old new delta
packed_usage 32211 32189 -22
nslookup_main 2754 2692 -62
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 0/2 up/down: 0/-84) Total: -84 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
function old new delta
nslookup_main 2715 2754 +39
packed_usage 32179 32211 +32
add_ns 65 66 +1
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 3/0 up/down: 72/0) Total: 72 bytes
text data bss dec hex filename
926262 555 5740 932557 e3acd busybox_old
926239 555 5740 932534 e3ab6 busybox_unstripped
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
function old new delta
nslookup_main 2708 2715 +7
qtypes 80 72 -8
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 1/1 up/down: 7/-8) Total: -1 bytes
text data bss dec hex filename
926277 555 5740 932572 e3adc busybox_old
926262 555 5740 932557 e3acd busybox_unstripped
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
function old new delta
nslookup_main 1837 2708 +871
parse_reply 852 - -852
------------------------------------------------------------------------------
(add/remove: 0/1 grow/shrink: 1/0 up/down: 871/-852) Total: 19 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
function old new delta
nslookup_main 1832 1837 +5
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
function old new delta
nslookup_main 1880 1832 -48
parse_reply 1022 852 -170
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 0/2 up/down: 0/-218) Total: -218 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
function old new delta
rcodes 68 64 -4
nslookup_main 2007 1880 -127
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 0/2 up/down: 0/-131) Total: -131 bytes
text data bss dec hex filename
926735 555 5740 933030 e3ca6 busybox_old
926525 555 5740 932820 e3bd4 busybox_unstripped
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
function old new delta
nslookup_main 2091 2007 -84
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
function old new delta
nslookup_main 2363 2091 -272
add_ns 663 65 -598
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 0/2 up/down: 0/-870) Total: -870 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Needs work on size reduction
function old new delta
nslookup_main 114 2363 +2249
parse_reply - 1022 +1022
add_ns - 663 +663
ns_parserr - 486 +486
ns_initparse - 184 +184
ns_skiprr - 117 +117
add_query - 95 +95
qtypes - 80 +80
rcodes - 68 +68
dn_skipname - 58 +58
ns_name_uncompress - 56 +56
ns_get16 - 13 +13
v4_mapped - 12 +12
ns_get32 - 9 +9
res_init 3 - -3
__res_state 6 - -6
xmalloc_sockaddr2hostonly_noport 10 - -10
gai_strerror 47 - -47
set_default_dns 95 - -95
print_host 199 - -199
static.res 512 - -512
------------------------------------------------------------------------------
(add/remove: 15/10 grow/shrink: 1/0 up/down: 5112/-872) Total: 4240 bytes
text data bss dec hex filename
921944 555 6252 928751 e2bef busybox_old
927375 555 5740 933670 e3f26 busybox_unstripped
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Those two spaces after tab have no effect, and always a nuisance when editing.
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Signed-off-by: Pere Orga <gotrunks@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Signed-off-by: Vitaly Magerya <vmagerya@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
This change retains "or later" state! No licensing _changes_ here,
only form is adjusted (article, space between "GPL" and "v2" and so on).
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
|
|
for DNS server name; allow for port specification.
Tested to work: "nslookup google.com [::1]:5353"
|
|
inet_common: cosmetics, no code changes
|
|
EXTERNALLY_VISIBLE. 5% size reduction of libbusybox.so
|
|
|
|
|
|
stop checking whether setsockopt_reuseaddr(int fd) was successful (it always is)
remove second parameter (sockllen) from xmalloc_sockaddr2xxxxx functions
sockaddr2str 142 156 +14
collect_blk 467 474 +7
xdup2 28 33 +5
singlemount 4456 4454 -2
print_host 214 212 -2
nslookup_main 139 137 -2
ftpgetput_main 414 412 -2
udhcpd_main 1258 1255 -3
udhcpc_main 2405 2402 -3
traceroute_main 4125 4122 -3
nc_main 1072 1069 -3
buffer_fill_and_print 76 73 -3
xmalloc_sockaddr2hostonly_noport 18 14 -4
xmalloc_sockaddr2host_noport 18 14 -4
xmalloc_sockaddr2host 15 11 -4
xmalloc_sockaddr2dotted_noport 18 14 -4
xmalloc_sockaddr2dotted 18 14 -4
wget_main 2618 2614 -4
ping_main 393 389 -4
ip_port_str 120 115 -5
dhcprelay_main 1146 1141 -5
dnsd_main 1531 1525 -6
passwd_main 1110 1102 -8
udhcp_kernel_packet 206 197 -9
udhcp_listen_socket 154 144 -10
getty_main 2576 2566 -10
setup 655 640 -15
xmove_fd 51 34 -17
dolisten 759 742 -17
tcpudpsvd_main 1866 1836 -30
startservice 339 299 -40
|
|
*: s/include "busybox.h"/include "libbb.h"
|
|
|
|
|
|
no preceding prototype
|
|
|
|
and thus save a few bytes.
|
|
|
|
|
|
Bad:
wget http://127.0.0.1:81/fgdg/Makefile
Connecting to 127.0.0.1[127.0.0.1]:81
: HTTP/1.0 404 Not Foundror 404 Not Found
Good:
wget http://127.0.0.1:81/fgdg/Makefile
Connecting to 127.0.0.1[127.0.0.1]:81
get: server returned error: HTTP/1.0 404 Not Found
nslookup: fix my mistake
applets: make Bernhard Fischer <rep.nop@aon.at> happy :)
|
|
|