Commit Graph

1899 Commits

Author SHA1 Message Date
Denys Vlasenko
243ddcbc76 udhcpd: support decoding of option 120 "SIP servers". Closes bug 737
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-04-03 17:34:52 +02:00
Denys Vlasenko
4a1884da53 ftpd: shrink by 33 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-04-03 14:59:12 +02:00
Denys Vlasenko
8a659f6ff9 libbb: make index_in_substrings return -1 on ambiguous matches
function                                             old     new   delta
index_in_substrings                                   67      93     +26

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-04-03 00:52:16 +02:00
Denys Vlasenko
8fc9e6a15d httpd: fix proxy mode bug (annoying but harmless), better help text
function                                             old     new   delta
cgi_io_loop_and_exit                                 594     635     +41
packed_usage                                       26815   26841     +26
handle_incoming_and_exit                            2745    2739      -6

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-04-02 10:40:58 +02:00
Denys Vlasenko
37201213ca ifplugd: more robust interface name match check
function                                             old     new   delta
check_existence_through_netlink                      278     308     +30

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-04-02 07:04:44 +02:00
Denys Vlasenko
5342c3f310 clean up redundant, commented-out and misplaced includes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-04-01 15:09:44 +02:00
Denys Vlasenko
345e093c29 fix Config.in tab usage
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-03-31 16:03:56 +02:00
Maxim Kryzhanovsky
2004fa1bc8 ifplugd: code shrink; expanded comments
Signed-off-by: Maxim Kryzhanovsky <xmaks@email.cz>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-03-30 15:49:57 +02:00
Maxim Kryzhanovsky
fcb84c8bd2 ifplugd: code shrink
text    data     bss     dec     hex filename
 840048     453    6828  847329   cede1 busybox_old
 839915     453    6828  847196   ced5c busybox_unstripped

Signed-off-by: Maxim Kryzhanovsky <xmaks@email.cz>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-03-29 09:09:05 +02:00
Denys Vlasenko
c8a2ab1023 dumpleases: better help text
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-03-28 00:02:20 +01:00
Denys Vlasenko
406bd14416 udhcpd: fix -v/-P mixup
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-03-27 23:24:57 +01:00
Denys Vlasenko
9107b63a7f udhcp: abort if we see unknown option, and show valid options if so
function                                             old     new   delta
udhcp_option_idx                                       -      77     +77
udhcp_str2optset                                     366     351     -15
udhcpc_main                                         2845    2801     -44
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 0/2 up/down: 77/-59)             Total: 18 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-03-27 23:23:41 +01:00
Denys Vlasenko
19158a837d unicode: s/FEATURE_ASSUME_UNICODE/UNICODE_SUPPORT, add UNICODE_USING_LOCALE
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-03-26 14:06:56 +01:00
Denys Vlasenko
385b4562e3 udhcp: cosmetic cleanups; one case of s/full_read/xread/
function                                             old     new   delta
dumpleases_main                                      632     623      -9

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-03-26 10:09:34 +01:00
Denys Vlasenko
7724c766bd udhcp: pass pointer to whole packet to "add option" functions
This is needed for "overflow option" support

function                                             old     new   delta
udhcp_find_option                                      -      34     +34
udhcp_add_binary_option                               94     106     +12
write_leases                                         227     223      -4
udhcp_init_header                                     86      82      -4
send_release                                         104      99      -5
init_packet                                           87      81      -6
add_client_options                                   160     154      -6
add_server_options                                   100      92      -8
udhcpd_main                                         1964    1954     -10
udhcpc_main                                         2859    2837     -22
find_option                                           34       -     -34
------------------------------------------------------------------------------
(add/remove: 1/1 grow/shrink: 1/8 up/down: 46/-99)            Total: -53 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-03-26 09:32:09 +01:00
Denys Vlasenko
a8f6b99987 udhcp: move options.c to common.c; disable unused bool and s16 option code
function                                             old     new   delta
udhcp_add_binary_option                                -      94     +94
udhcp_str2nip                                          -      42     +42
len_of_option_as_string                               12      10      -2
dhcp_option_lengths                                   12      10      -2
udhcpc_main                                         2859    2851      -8
read_nip                                              42       -     -42
xmalloc_optname_optval                               590     536     -54
udhcp_str2optset                                     443     366     -77
udhcp_add_option_string                               86       -     -86
------------------------------------------------------------------------------
(add/remove: 2/2 grow/shrink: 0/5 up/down: 136/-271)         Total: -135 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-03-26 08:35:24 +01:00
Denys Vlasenko
7e6add1dfc udhcpc: add -x OPT:VAL option
function                                             old     new   delta
udhcp_str2optset                                       -     443    +443
add_client_options                                     -     160    +160
udhcpc_main                                         2753    2857    +104
packed_usage                                       26670   26689     +19
attach_option                                        380     385      +5
udhcpd_main                                         1964    1965      +1
udhcp_add_option_string                               94      86      -8
add_param_req_option                                 128       -    -128
read_opt                                             443       -    -443
------------------------------------------------------------------------------
(add/remove: 2/2 grow/shrink: 4/1 up/down: 732/-579)          Total: 153 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-03-25 20:32:38 +01:00
Denys Vlasenko
3d9c69fb4f udhcp: add testing bits to dns en/decoder
we had two bugs there at least, must have testing

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-03-24 16:43:16 +01:00
Denys Vlasenko
702f7d6c0b udhcp: we call DNS name encoder with NULL, this can SEGV. added a check
function                                             old     new   delta
dname_enc                                            418     415      -3

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-03-24 16:11:32 +01:00
Denys Vlasenko
a14a9d73b1 udhcp: fix DNS domanin codec bug: bad compression flag checks
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-03-24 15:06:23 +01:00
Denys Vlasenko
651a2697f7 *: merge some common strings
text   data    bss    dec    hexfilename
 838650   8009      0 846659  ceb43busybox_old
 838519   8009      0 846528  ceac0busybox_unstripped

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-03-23 16:25:17 +01:00
Denys Vlasenko
37a658c4c8 udhcp: handle errors in read_staticlease
also gets rid of ether-aton's static buffer in ether-wake:
   text   data    bss    dec    hexfilename
 838664    441   7572 846677  ceb55busybox_old
 838650    441   7564 846655  ceb3fbusybox_unstripped

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-03-23 15:43:08 +01:00
Maciek Borzecki
30ebd7bd78 brctl: fixing stp parameters incompatibility
function                                             old     new   delta
static.stp_opts                                        -      23     +23
brctl_main                                          1148    1169     +21
packed_usage                                       26786   26794      +8
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 2/0 up/down: 52/0)               Total: 52 bytes

Signed-off-by: Maciek Borzecki <maciek.borzecki@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-03-23 05:18:38 +01:00
Denys Vlasenko
e283413395 udhcp: code shrink
function                                             old     new   delta
attach_option                                          -     380    +380
read_opt                                             859     443    -416
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 0/1 up/down: 380/-416)          Total: -36 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-03-23 04:31:38 +01:00
Denys Vlasenko
6ef8def7cf udhcp: remove two unused fields
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-03-23 02:17:52 +01:00
Denys Vlasenko
6b61629397 udhcp: make rfc derived doc more readable (but it still is contradictory)
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-03-22 15:22:14 +01:00
Denys Vlasenko
dde8bdcc5b udhcp: merge options.h into common.h, script.c into dhcpc.c
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-03-22 14:29:13 +01:00
Denys Vlasenko
8d1144565f udhcpc: do not test for srand init, just do it at the start
function                                             old     new   delta
udhcpc_main                                         2855    2867     +12
static.initialized                                     1       -      -1
client_background                                     32      31      -1
perform_release                                      124     122      -2
random_xid                                            38       -     -38
------------------------------------------------------------------------------
(add/remove: 0/2 grow/shrink: 1/2 up/down: 12/-42)            Total: -30 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-03-22 13:44:09 +01:00
Denys Vlasenko
501e35c474 udhcp: merge clientpacket.c into dhcpc.c
function                                             old     new   delta
udhcpc_main                                         2569    2855    +286
perform_release                                      122     124      +2
client_background                                     31      32      +1
init_packet                                          156      88     -68
send_decline                                         114       -    -114
send_discover                                        121       -    -121
send_select                                          130       -    -130
------------------------------------------------------------------------------
(add/remove: 0/4 grow/shrink: 3/1 up/down: 289/-433)         Total: -144 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-03-22 13:43:12 +01:00
Denys Vlasenko
6b24d5354b udhcpc: merge clientsocket.c into dhcpc.c. +4 bytes.
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-03-22 13:42:13 +01:00
Denys Vlasenko
53f72bb3f0 dhcpd: apparently, sometimes IP is in ciaddr, not requested_ip...
also revert the part which appempted to "fix" that in client

function                                             old     new   delta
udhcpd_main                                         1949    1964     +15
send_renew                                           142     105     -37
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 1/1 up/down: 15/-37)            Total: -22 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-03-21 06:46:09 +01:00
Denys Vlasenko
c7dc79e71d udhcpd: untangle incredibly messy handling of DHCPREQUEST
Also fixes attacks possible via DHCPDECLINE / DHCPRELEASE

function                                             old     new   delta
udhcpd_main                                         1846    1949    +103
send_renew                                           105     142     +37
send_NAK                                              61       -     -61
send_ACK                                             180       -    -180
------------------------------------------------------------------------------
(add/remove: 0/2 grow/shrink: 2/0 up/down: 140/-241)         Total: -101 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-03-21 06:15:28 +01:00
Denys Vlasenko
2e7aa92836 udhcp: tweak udhcpd.conf example and comments. no code changes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-03-21 02:22:07 +01:00
Denys Vlasenko
e5ce91b41b udhcp: code shrink; disable time and log server options
function                                             old     new   delta
add_server_options                                     -     100    +100
udhcp_add_simple_option                               92      90      -2
nobody_responds_to_arp                                88      85      -3
dhcp_options                                          66      62      -4
udhcp_add_option_string                              104      94     -10
udhcp_run_script                                     665     654     -11
dhcp_option_strings                                  203     188     -15
static.blank_chaddr                                   16       -     -16
send_ACK                                             211     180     -31
add_bootp_options                                     61       -     -61
udhcpd_main                                         1925    1846     -79
------------------------------------------------------------------------------
(add/remove: 1/2 grow/shrink: 0/8 up/down: 100/-232)         Total: -132 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-03-21 00:43:11 +01:00
Denys Vlasenko
87fa216e1e udhcpc: make it possible to disable vendor id; improve help text
function                                             old     new   delta
init_packet                                          135     139      +4
packed_usage                                       26789   26786      -3
alloc_dhcp_option                                     67      63      -4
udhcpc_main                                         2467    2447     -20
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 1/3 up/down: 4/-27)             Total: -23 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-03-20 18:06:23 +01:00
Denys Vlasenko
0f62c4d065 udhcpd: remove five more options which do not make sense or not supported
requestip, vendorclass, clientid are client-side variables,
          they do not make sense as udhcpd opts
dhcptype  is the packet type (not interesting, it's always 5)
userclass needs parser support in order to work

function                                             old     new   delta
dhcp_options                                          68      66      -2
read_opt                                             865     859      -6
dhcp_option_strings                                  253     203     -50
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 0/3 up/down: 0/-58)             Total: -58 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-03-20 07:12:21 +01:00
Denys Vlasenko
a953987e77 udhcpd: remove redundant code in send_offer()
static_lease_nip and lease pointer are canculated in the caller,
no need to calculate them again. lease_time_sec calculation
is also redundant: it is assigned to later, w/o being used
in between.

function                                             old     new   delta
udhcpd_main                                         1956    1925     -31

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-03-20 03:49:27 +01:00
Denys Vlasenko
8a7c166ab9 udhcp: move serverpacket.c into dhcpd.c, no other changes
function                                             old     new   delta
udhcpd_main                                         1480    1956    +476
send_inform                                           83       -     -83
send_offer                                           376       -    -376
------------------------------------------------------------------------------
(add/remove: 0/3 grow/shrink: 1/0 up/down: 476/-459)           Total: 17 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-03-20 03:48:11 +01:00
Denys Vlasenko
777706cb23 udhcp: remove support for some really old and odd options
function                                             old     new   delta
dhcp_options                                          72      68      -4
dhcp_option_strings                                  271     253     -18

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-03-19 23:42:23 +01:00
Denys Vlasenko
8531d76a15 *: code shrink and better "died from signal" reporting from wait4pid
function                                             old     new   delta
parse                                                964     967      +3
udhcp_run_script                                     670     665      -5
singlemount                                          911     906      -5
mount_it_now                                         360     355      -5
inotifyd_main                                        521     516      -5
xspawn                                                21       -     -21
------------------------------------------------------------------------------
(add/remove: 0/1 grow/shrink: 1/4 up/down: 3/-41)             Total: -38 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-03-18 22:44:00 +01:00
Bernhard Reutner-Fischer
0c0f1767f0 brctl: Fix comment
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2010-03-17 11:23:04 +01:00
Maciek Borzecki
46abfc0da1 brctl: fix parsing of timespec to allow 0 (setfd, sethello..)
Signed-off-by: Maciek Borzecki <maciek.borzecki@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-03-17 10:25:29 +01:00
Denys Vlasenko
cbcc1236f8 tftp: do not show progress bar if we get error right away. +13 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-03-05 23:38:54 +01:00
Denys Vlasenko
9341fd2d30 ping: do not leak data from stack; shrink
FANCY ping:
function                                             old     new   delta
common_ping_main                                     386    1732   +1346
sendping6                                             98      83     -15
sendping4                                            188     158     -30
ping4                                                575       -    -575
ping6                                                756       -    -756
------------------------------------------------------------------------------
(add/remove: 0/2 grow/shrink: 1/2 up/down: 1346/-1376)        Total: -30 bytes

!FANCY ping:
function                                             old     new   delta
hostname                                               4       -      -4
common_ping_main                                     566     499     -67

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-03-03 01:10:29 +01:00
Denys Vlasenko
88aa558e5c *: do not check for POLLIN/POLLOUT only, just in case it's POLHUP/POLERR
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-03-02 15:02:45 +01:00
Denys Vlasenko
f6b29a2dc9 Merge branch 'master' of git+ssh://vda@busybox.net/var/lib/git/busybox 2010-02-27 23:15:22 +01:00
Denys Vlasenko
99069330a1 *: gethostname-related fixes
function                                             old     new   delta
hostname_main                                        218     231     +13
nfsmount                                            3541    3474     -67

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-02-27 19:38:19 +01:00
Bernhard Reutner-Fischer
45cec1ee89 Config: fix alphabetical ordering
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2010-02-26 19:33:49 +01:00
Bernhard Reutner-Fischer
ca228fb16d reuse a few strings
text    data     bss     dec     hex filename
 839040     453    6828  846321   ce9f1 busybox_old
 839019     453    6828  846300   ce9dc busybox_unstripped

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-02-26 10:09:31 +01:00
Denys Vlasenko
8031848938 typo fixes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-02-24 14:27:55 +01:00