Commit Graph

2253 Commits

Author SHA1 Message Date
Patrick McHardy
a7ecbed56b ip link: add VLAN support
function                                             old     new   delta
do_add_or_delete                                       -    1073   +1073
get_u16                                                -      62     +62
static.protocols                                       -      16     +16
do_iplink                                           1235    1232      -3
do_change                                            495       -    -495
------------------------------------------------------------------------------
(add/remove: 3/1 grow/shrink: 0/1 up/down: 1151/-498)         Total: 653 bytes

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-07-15 05:16:13 +02:00
Denys Vlasenko
9b58fe9c0b ip: code shrink
function                                             old     new   delta
do_ipaddr                                             78      81      +3
do_iprule                                            140     139      -1
do_iptunnel                                          283     278      -5
iprule_modify                                        851     841     -10
ipaddr_modify                                       1293    1236     -57
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 1/4 up/down: 3/-73)             Total: -70 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-07-15 05:15:46 +02:00
Denys Vlasenko
ea267d518f wget: do not abort if "_" is encountered in a HTTP header
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-07-01 15:05:09 +02:00
Denys Vlasenko
26a7e2ecbf ping: code shrink
function                                             old     new   delta
unpack_tail                                          262     243     -19

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-06-28 01:33:47 +02:00
Denys Vlasenko
59f46676a9 Move create_icmp[6]_socket to its only user, and simplify it
function                                             old     new   delta
run_applet_and_exit                                  711     714      +3
sendping_tail                                        239     236      -3
common_ping_main                                    1798    1770     -28
create_icmp_socket                                    65       -     -65
create_icmp6_socket                                   65       -     -65
------------------------------------------------------------------------------
(add/remove: 0/4 grow/shrink: 1/2 up/down: 3/-161)           Total: -158 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-06-28 00:30:46 +02:00
Denys Vlasenko
d66eb9042d nslookup: set default DNS server again. Hopefully helps with 675
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-06-27 01:09:51 +02:00
Denys Vlasenko
5a7e3376b7 ntpd: set offset to 0.0 in "usync" event
function                                             old     new   delta
ntpd_main                                           1030    1026      -4

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-05-23 16:06:59 +02:00
Denys Vlasenko
07c5987498 ntpd: set G.last_script_run even if script isn't configured
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-05-22 18:18:51 +02:00
Denys Vlasenko
5ffdd1d981 ntpd: make "unsync" code actually work.
While at it: don't run "periodic" if interrupted by a signal.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-05-22 18:16:34 +02:00
Denys Vlasenko
d99ef636f6 ntpd: drop delay outliers; run "unsync" handler if no replies for some time
function                                             old     new   delta
ntpd_main                                            960    1029     +69
recv_and_process_peer_pkt                            834     892     +58
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 2/0 up/down: 127/0)             Total: 127 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-05-22 17:48:19 +02:00
Denys Vlasenko
b443a3780d udhcp: code shrink
function                                             old     new   delta
attach_option                                        416     413      -3
allocate_tempopt_if_needed                            74       -     -74

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-05-17 15:19:47 +02:00
Denys Vlasenko
c133fa66f3 udhcpc: fix a problem with binary-encoded options #2
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-05-17 15:13:38 +02:00
Denys Vlasenko
f76fd17d74 telnet: code shrink
function                                             old     new   delta
telnet_main                                         1519    1515      -4
con_escape                                           296     285     -11

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-05-12 02:13:24 +02:00
Denys Vlasenko
8f2cb7ab26 libbb: introduce and use strftime_[YYYYMMDD]HHMMSS()
function                                             old     new   delta
strftime_fmt                                           -      53     +53
strftime_YYYYMMDDHHMMSS                                -      12     +12
strftime_HHMMSS                                        -      12     +12
human_time                                            44      43      -1
fmtstr_t                                               9       -      -9
step_time                                            361     345     -16
watch_main                                           261     232     -29
------------------------------------------------------------------------------
(add/remove: 3/1 grow/shrink: 0/3 up/down: 77/-55)             Total: 22 bytes
   text	   data	    bss	    dec	    hex	filename
 919203	    932	  17692	 937827	  e4f63	busybox_old
 919209	    932	  17692	 937833	  e4f69	busybox_unstripped

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-03-29 12:30:33 +01:00
Denys Vlasenko
85daa67bc2 httpd: don't allow tabs and multiple spaces in request string
HTTP standard doesn't allow it and no sane clients should ever use it.

function                                             old     new   delta
handle_incoming_and_exit                            2795    2785     -10

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-03-25 23:27:00 +01:00
Denys Vlasenko
c56d12505b nc: fix build failure ("subscripted value is neither array nor pointer")
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-03-17 22:59:51 +01:00
Guilherme Maciel Ferreira
4a600f8777 traceroute: free some memory allocated by xzalloc()
Signed-off-by: Guilherme Maciel Ferreira <guilherme.maciel.ferreira@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-03-15 01:23:48 +01:00
Denys Vlasenko
af4a07a244 ping[6]: accept and ignore -n. Code shrink
function                                             old     new   delta
print_stats_and_exit                                 270     232     -38

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-03-15 00:11:35 +01:00
Denys Vlasenko
7b5d5c1bdb udhcpd: also add -I ADDR to help text
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-03-14 02:18:52 +01:00
Denys Vlasenko
e3f5b73ad0 udhcpd: add -I LOCAL_ADDR option
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-03-13 22:27:37 +01:00
Mike Frysinger
445e7543e8 platform: use KERNEL_VERSION to simplify uClibc version checking
This makes reading the logic (as well as adding new code) a lot simpler,
and fixes one or two cases that were broken due to incorrect sub-version
tests.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2013-03-12 11:13:22 -04:00
Denys Vlasenko
fb03663619 ifupdown: support "source" stanza in /etc/network/interfaces
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-02-28 19:01:28 +01:00
Denys Vlasenko
216e952fb8 ifplugd: make -k send SIGINT, not SIGQUIT
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-02-28 12:50:09 +01:00
Denys Vlasenko
ed954b6855 Fix config help text
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-02-28 12:39:27 +01:00
Denys Vlasenko
de6f148006 nc_bloaty: support -ll and -lk. Closes 2245
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-02-28 12:20:06 +01:00
Denys Vlasenko
a14f319805 nc: don't redirect stderr to network in -e PROG mode
This in incompatible with nc-1.10, but makes a lot of sense.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-02-28 11:09:14 +01:00
Thomas De Schampheleire
bc0ffc0e97 nameif: fix use-after-free in ENABLE_FEATURE_CLEAN_UP code
Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-02-28 10:31:54 +01:00
Denys Vlasenko
06af569f44 arp: code shrink
function                                             old     new   delta
packed_usage                                       29257   29252      -5
arp_main                                            1487    1471     -16

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-02-04 16:18:58 +01:00
Kuleshov Aleksey
a8816dafc4 arp: fix -H/-t handling.
While at it, shrank code.
function                                             old     new   delta
arp_main                                            1558    1487     -71

Signed-off-by: Kuleshov Aleksey <rndfax@yandex.ru>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-02-04 15:14:20 +01:00
Denys Vlasenko
04ac6e03c3 udhcpc6: fix port numbers used if !FEATURE_UDHCP_PORT
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-01-28 15:25:35 +01:00
Denys Vlasenko
31dc8603ee ifconfig: do not accept "ifconfig eth0 up 1.2.3.4/17" (ip with mask). Closes 5786
function                                             old     new   delta
ifconfig_main                                       1221    1237     +16

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-01-20 18:10:12 +01:00
Denys Vlasenko
60cb48ca50 whitespace cleanup. no code changes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-01-14 15:57:44 +01:00
Paul Marks
b7841cf7b9 ntpd: fix incorrect m_status field in outgoing packets. Closes 5120
When using busybox ntpd with an NTPv3 client and NTPv4 server (or vice
versa), the version numbers can be incorrectly ORed together, yielding
the bogus value of "NTPv7".  This makes ntpd unusable with clients
such as Chrony and Windows "Internet Time".

This patch avoids the version mangling, by copying only the Leap
Indicator bits from the server's status field.

Signed-off-by: Paul Marks <paul@pmarks.net>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-01-14 02:39:10 +01:00
Denys Vlasenko
6967578728 whitespace fixes. no code changes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-01-14 01:34:48 +01:00
Mike Frysinger
a38f9faa9f ifenslave: fix missing close paren
Reported-by: David J Cozatt <ygdrasil@comcast.net>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-12-26 17:12:26 -05:00
Anthony G. Basile
12677acf0a CONFIG_PID_FILE_PATH: new configuration option for pidfile paths
We set a default path for the directory where pidfiles are create
when FEATURE_PIDFILE is selected.  The default has no effect on
applets which must specify a pidfile path on the command line to
run, and it can be overridden by applets which optionally allow
the user to specify the pidfile path.

We also add pidfile write/remove support for klogd, ntpd and watchdog.
For syslogd, we add a missing remove_pidfile() for better cleanup
on daemon exit.

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-12-19 15:53:33 -05:00
Denys Vlasenko
3f21044f20 ifupdown: code shrink
function                                             old     new   delta
execute                                              571     548     -23

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-11-09 17:16:40 +01:00
Denys Vlasenko
a803bfa0f0 ifupdown: remove unused errno assignments
function                                             old     new   delta
execute                                              607     571     -36

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-11-05 14:18:36 +01:00
Denys Vlasenko
11181335f9 ifupdown: simple code shrink
function                                             old     new   delta
execute                                              631     607     -24

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-11-05 13:22:56 +01:00
Nicolas Thill
f47ce07b26 brctl: fix description and usage
brctl uncorrectly displays the "showmacs" command as being supported while
it is not, remove it from the usage and Config.src file.

Signed-off-by: Nicolas Thill <nico@openwrt.org>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-09-29 16:43:33 +02:00
Felix Fietkau
1c7a58dfb8 udhcpc[6]: allow discover_retries == 0 (infinite)
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-09-27 16:22:24 +02:00
Alexey Froloff
3c62bbae94 ushcpc: gracefully handle packets with CHECKSUM_PARTIAL
function                                             old     new   delta
udhcp_recv_raw_packet                                415     579    +164
change_listen_mode                                   317     370     +53
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 2/0 up/down: 217/0)             Total: 217 bytes

Signed-off-by: Alexey Froloff <raorn@raorn.name>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-09-17 16:02:44 +02:00
Denys Vlasenko
0ffd63ca9a telnet: convert Enter -> CR LF in line mode too
function                                             old     new   delta
handle_net_output                                     87      98     +11

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-09-17 11:54:35 +02:00
Denys Vlasenko
57f07bfcb2 telnet: shrink literal string size
text	   data	    bss	    dec	    hex	filename
 888483	    497	   7584	 896564	  dae34	busybox_old
 888450	    497	   7584	 896531	  dae13	busybox_unstripped

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-09-17 11:53:09 +02:00
Denys Vlasenko
aca464ddac telnet: convert CR -> CR LF, not CR -> CR NUL when sending data to server
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-09-13 13:00:49 +02:00
Denys Vlasenko
b7812ce0f7 wget: reorder fread and poll: poll only if fread returns EAGAIN. Closes 5426
function                                             old     new   delta
retrieve_file_data                                   451     427     -24

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-09-03 12:49:30 +02:00
Denys Vlasenko
168f87c531 httpd_indexcgi.c: fix compile failure
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-09-03 12:20:10 +02:00
Denys Vlasenko
5f10fdf1dd Fix compile failure in ll_proto.c
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-09-03 11:41:30 +02:00
Denys Vlasenko
405dafffbb ll_proto.c: code shrink
text    data     bss     dec     hex filename
    762       0       0     762     2fa ll_proto.o.old
    526       0       0     526     20e ll_proto.o

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-09-02 14:29:45 +02:00
Denys Vlasenko
a0fd4a789c style fixes, no code changes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-09-02 14:29:14 +02:00