Commit Graph

2082 Commits

Author SHA1 Message Date
Denys Vlasenko
ca18311d0a libbb: make set_nport accept pointer to sockaddr, not to len_and_sockaddr.
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-04-07 17:52:20 +02:00
Denys Vlasenko
8e23fafade ntpd: decrease ntpd -q "no response" timeout to 10 sec
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-04-07 01:45:20 +02:00
Peter Korsgaard
95755181b8 httpd: don't send error messages with gzip encoding
If CONFIG_FEATURE_HTTPD_GZIP is enabled and request contained
'Accept-Encoding: gzip', then errors were sent with 'Content-Encoding: gzip'
even though they aren't.

Fix it by clearing content_gzip before sending the headers.

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-03-27 23:26:33 +02:00
Vitaly Magerya
700fbc308d wget: --post-data=STR should not encode STR, should send it verbatim
This matches GNU Wget 1.12 behavior.

Signed-off-by: Vitaly Magerya <vmagerya@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-03-27 22:33:13 +02:00
Vitaly Magerya
7f4b769c42 don't call freeaddinfo(NULL)
Signed-off-by: Vitaly Magerya <vmagerya@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-03-22 20:14:26 +01:00
Denys Vlasenko
e2e55b0eb5 wget: move help text to .c file
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-03-21 00:37:05 +01:00
Denys Vlasenko
625f218d43 wget: fix fname_out usage wrt redirects
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-03-21 00:29:37 +01:00
Denys Vlasenko
9ac5596a51 udhcpc: emit "correct" secs field
In theory, sending secs set to constant zero should be ok too.
But some bleeping servers can actually be configured to answer ONLY
if secs is bigger than a preset value (!!)
http://developer.apple.com/library/mac/#documentation/Darwin/Reference/ManPages/man8/bootpd.8.html
grep for "reply_threshold_seconds"

function                                             old     new   delta
udhcpc_main                                         2573    2623     +50

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-03-12 05:37:54 +01:00
Denys Vlasenko
681efe20d3 use user's shell instead of hardwired "/bin/sh" (android needs this)
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-03-08 21:00:36 +01:00
Denys Vlasenko
115c35d68e ftpd: better usage text
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-03-08 03:01:10 +01:00
Keith Young
e6bb8d339f udhcpc: add -B option
function                                             old     new   delta
udhcpc_longopts                                        -     262    +262
add_client_options                                   218     239     +21
packed_usage                                       28149   28163     +14
static.udhcpc_longopts                               250       -    -250
------------------------------------------------------------------------------
(add/remove: 1/1 grow/shrink: 2/0 up/down: 297/-250)           Total: 47 bytes

Signed-off-by: Keith Young <stripydog7@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-03-07 03:19:42 +01:00
Phil Sutter
293a8f250d nameif: add matching by phy_address=NUM; extend help text
function                                             old     new   delta
nameif_main                                          618     686     +68
packed_usage                                       28095   28149     +54
prepend_new_eth_table                                295     338     +43
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 3/0 up/down: 165/0)             Total: 165 bytes

Signed-off-by: Phil Sutter <phil.sutter@viprinet.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-03-06 19:42:51 +01:00
Phil Sutter
2adc0e6d8b nameif: fix parsing of /proc/net/dev; small code shrink
function                                             old     new   delta
nameif_main                                          628     618     -10

Signed-off-by: Phil Sutter <phil.sutter@viprinet.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-03-06 19:15:30 +01:00
Alexey Fomenko
1df0af7670 don't leak malloced variables in the loop; remove double alloc
Signed-off-by: Alexey Fomenko <ext-alexey.fomenko@nokia.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-03-02 04:13:21 +01:00
Denys Vlasenko
940c7206c2 convert "do {...} while (1);" -> "while (1) {...}"
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-03-02 04:07:14 +01:00
Alexey Fomenko
708dd4c986 add missing fclose's
Signed-off-by: Alexey Fomenko <ext-alexey.fomenko@nokia.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-03-02 04:01:24 +01:00
Pere Orga
251962f207 whois: new applet
function                                             old     new   delta
whois_main                                             -     118    +118
pipe_out                                               -      80     +80
packed_usage                                       28084   28095     +11
applet_names                                        2385    2391      +6
applet_main                                         1388    1392      +4
applet_nameofs                                       694     696      +2
------------------------------------------------------------------------------
(add/remove: 3/0 grow/shrink: 4/0 up/down: 221/0)             Total: 221 bytes

Signed-off-by: Pere Orga <gotrunks@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-02-27 23:38:52 +01:00
Denys Vlasenko
e3b1a1fd28 Replace "depends on PLATFORM_LINUX" with "select PLATFORM_LINUX"
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-02-26 22:24:08 +01:00
Stefan Seyfried
da4441c44f fix libiproute compile with kernel headers < 2.6.17
Signed-off-by: Stefan Seyfried <seife+dev@b1-systems.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-02-26 20:11:47 +01:00
Denys Vlasenko
3bb235c3b5 iproute: fix parsing and matching of of "short" IP addrs like 10/8
function                                             old     new   delta
print_route                                         1613    1813    +200
get_addr_1                                           209     258     +49
get_prefix                                           393     356     -37
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 2/1 up/down: 249/-37)           Total: 212 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-02-23 01:20:44 +01:00
Pere Orga
5369563bf9 wget: reduce bloat
Signed-off-by: Pere Orga <gotrunks@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-02-19 23:56:39 +01:00
Vladislav Grishenko
5827167338 udhcpd: optional IP selection based on MAC hash
function                                             old     new   delta
find_free_or_expired_nip                             153     225     +72

Signed-off-by: Vladislav Grishenko <themiron@mail.ru>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-02-16 13:31:30 +01:00
Denys Vlasenko
28556b95fe wget: check for final write errors for -O FILE too
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-02-15 11:03:53 +01:00
Denys Vlasenko
2384a357f4 wget: make "wget -O FILE URL1 URL2" concatenate output
Also fixes a few cases where URL1's data (like start pos)
was leaking into URL2

function                                             old     new   delta
wget_main                                           2303    2321     +18
progress_meter                                       140     152     +12
retrieve_file_data                                   397     396      -1
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 2/1 up/down: 30/-1)              Total: 29 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-02-15 00:58:36 +01:00
Pere Orga
57b4909db9 wget: fix SEGV with multiple urls and redirection
Signed-off-by: Pere Orga <gotrunks@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-02-14 23:56:07 +01:00
Vladislav Grishenko
713e6d78e1 udhcpc: use more correct, and more importantly, more understandable BPF code
Signed-off-by: Vladislav Grishenko <themiron@mail.ru>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-02-14 04:50:30 +01:00
Denys Vlasenko
9a5b7f636d wget: support multiple URLs on command line even without -O :)
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-02-13 02:49:43 +01:00
Denys Vlasenko
a3661096f2 wget: support multiple URLs on command line
function                                             old     new   delta
wget_main                                           2190    2310    +120
progress_meter                                       124     140     +16
parse_url                                            288     304     +16
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 3/0 up/down: 152/0)             Total: 152 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-02-13 02:33:11 +01:00
Denys Vlasenko
a84eadf9bf typo fix in comment
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-02-12 23:40:31 +01:00
Denys Vlasenko
88ad9da65e wget: display 100% at the _end_ of chunked download
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-02-11 23:06:21 +01:00
Denys Vlasenko
c60f4460bb wget: chunked mode fix. Closes bug 3229
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-02-11 22:23:23 +01:00
Denys Vlasenko
f9af375668 wget: explain clearerr more clearly
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-02-11 22:01:33 +01:00
Denys Vlasenko
8766a791e8 wget: correctly handle rare case when we get EAGAIN _on first_ read
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-02-11 21:42:00 +01:00
Denys Vlasenko
ab8d00d64f progress meter: fix bugs found in stall detection and unknown size logic
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-02-11 19:09:30 +01:00
Denys Vlasenko
d55e139649 progress meter: move file name to bb_progress_t. +20 bytes
We were doing expensive unicode conversion on every update

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-02-11 18:56:13 +01:00
Denys Vlasenko
f836f01cc3 wget: shrink progress meter code; strink wget and add debug logging
function                                             old     new   delta
fgets_and_trim                                         -      73     +73
retrieve_file_data                                   367     349     -18
bb_progress_update                                   723     699     -24
wget_main                                           2220    2190     -30
ftpcmd                                               133      87     -46
gethdr                                               200     153     -47
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 0/5 up/down: 73/-165)           Total: -92 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-02-10 23:02:28 +01:00
Denys Vlasenko
9213a55bf0 wget: use closed HTTP/1.1 connection, stop when we dl'ed $content_len bytes
function                                             old     new   delta
retrieve_file_data                                   353     367     +14

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-02-10 13:23:45 +01:00
Denys Vlasenko
dee0fc9da1 save 10 bytes on strings
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-02-10 10:01:49 +01:00
Denys Vlasenko
0fac2f7b5b wget: remove functions which retry on EINTR
function                                             old     new   delta
retrieve_file_data                                   392     353     -39
safe_fgets                                            58       -     -58
------------------------------------------------------------------------------
(add/remove: 0/1 grow/shrink: 0/1 up/down: 0/-97)             Total: -97 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-02-10 09:55:05 +01:00
Denys Vlasenko
e3ece7878b fix trivial build failure
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-02-10 09:50:07 +01:00
Denys Vlasenko
df4e16c9af wget: use FEATURE_COPYBUF_KB-sized buffer. Much faster for local transfers
function                                             old     new   delta
base64enc                                              -      53     +53
gethdr                                               190     200     +10
ftpcmd                                               129     133      +4
progress_meter                                       160     122     -38
retrieve_file_data                                   431     392     -39
base64enc_512                                         46       -     -46
wget_main                                           2456    2220    -236
------------------------------------------------------------------------------
(add/remove: 1/1 grow/shrink: 2/3 up/down: 67/-359)          Total: -292 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-02-10 06:29:06 +01:00
Denys Vlasenko
77350aa933 tc: less ugly check for bad sizeof(G)
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-02-10 06:28:09 +01:00
Denys Vlasenko
f133471302 iproute: fix handling of "dev IFACE" selector
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-02-09 04:39:09 +01:00
Denys Vlasenko
fbea220560 udhcpc: fix a problem with binary-encoded options
function                                             old     new   delta
attach_option                                        395     413     +18

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-02-06 18:00:58 +01:00
Denys Vlasenko
281e7b8848 ping: trivial simplification. -2 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-02-06 17:51:45 +01:00
Denys Vlasenko
1bb52a9b73 ping: fix IPv6 pinging. Closes bug 3187
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-02-05 03:58:43 +01:00
Denys Vlasenko
b7c9fb27cb whitespace fixes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-02-03 00:05:48 +01:00
Denys Vlasenko
8d0e0cdadf move utmp.h include to libbb.h
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-01-25 23:21:46 +01:00
Denys Vlasenko
dd169e8468 eliminate aliasing warnings in traceroute.c and udhcp/socket.c
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-01-20 12:13:23 +01:00
Denys Vlasenko
b3b6c8bdf2 eliminate aliasing warning in networking/route.c
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-01-20 11:29:00 +01:00