aboutsummaryrefslogtreecommitdiff
path: root/networking/udhcp
AgeCommit message (Collapse)Author
2010-03-22udhcpc: merge clientsocket.c into dhcpc.c. +4 bytes.Denys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-03-21dhcpd: apparently, sometimes IP is in ciaddr, not requested_ip...Denys Vlasenko
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-21udhcpd: untangle incredibly messy handling of DHCPREQUESTDenys Vlasenko
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-21udhcp: tweak udhcpd.conf example and comments. no code changesDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-03-21udhcp: code shrink; disable time and log server optionsDenys Vlasenko
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-20udhcpc: make it possible to disable vendor id; improve help textDenys Vlasenko
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-20udhcpd: remove five more options which do not make sense or not supportedDenys Vlasenko
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-20udhcpd: remove redundant code in send_offer()Denys Vlasenko
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-20udhcp: move serverpacket.c into dhcpd.c, no other changesDenys Vlasenko
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-19udhcp: remove support for some really old and odd optionsDenys Vlasenko
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-18*: code shrink and better "died from signal" reporting from wait4pidDenys Vlasenko
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-02-05udhcp[cd]: fix aliasing warningsDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-02-04*: eliminate more aliasing warningsDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-01-30further work on unicodizationDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-01-25whitespace fixesDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-01-24libbb: better unicode width support. Hopefully fixes bug 839.Denys Vlasenko
Also opens up a possibility to make other unicode stuff smaller and more correct later. but: function old new delta static.combining - 516 +516 bb_wcwidth - 328 +328 unicode_cut_nchars - 141 +141 mbstowc_internal - 93 +93 in_table - 78 +78 cal_main 899 961 +62 static.combining0x10000 - 40 +40 unicode_strlen - 31 +31 bb_mbstrlen 31 - -31 bb_mbstowcs 173 102 -71 ------------------------------------------------------------------------------ (add/remove: 7/1 grow/shrink: 1/1 up/down: 1289/-102) Total: 1187 bytes Uses code of Markus Kuhn, which is in public domain: http://www.cl.cam.ac.uk/~mgk25/ucs/wcwidth.c "Permission to use, copy, modify, and distribute this software for any purpose and without fee is hereby granted. The author disclaims all warranties with regard to this software." Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-01-12libbb: introduce and use monotonic_msDenys Vlasenko
function old new delta monotonic_ms - 60 +60 process_stdin 433 443 +10 display_speed 85 90 +5 nmeter_main 672 674 +2 builtin_type 114 116 +2 bb__parsespent 117 119 +2 ifplugd_main 1110 1109 -1 acpid_main 441 440 -1 chat_main 1361 1359 -2 doCommands 2458 2449 -9 arpping 466 450 -16 run_command 268 234 -34 readcmd 1072 1034 -38 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 5/7 up/down: 81/-101) Total: -20 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-01-12*: add/remove safe_, it seems we had a few incorrect usesDenys Vlasenko
function old new delta chat_main 1359 1361 +2 microcom_main 712 713 +1 ifplugd_main 1109 1110 +1 arpping 465 466 +1 acpid_main 440 441 +1 script_main 1069 1067 -2 cgi_io_loop_and_exit 594 591 -3 telnet_main 1475 1469 -6 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 5/3 up/down: 6/-11) Total: -5 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-01-04fold: unicode support. Based on a patch by Tomas Heinrich ↵Denys Vlasenko
<heinrich.tomas@gmail.com> General Unicode support is tweaked to expose unicode_status. function old new delta init_unicode - 77 +77 write2stdout - 19 +19 adjust_column 68 71 +3 unicode_status - 1 +1 unicode_is_enabled 1 - -1 grep_main 780 773 -7 fold_main 619 552 -67 check_unicode_in_env 77 - -77 ------------------------------------------------------------------------------ (add/remove: 3/2 grow/shrink: 1/2 up/down: 100/-152) Total: -52 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-12-11replace APP_xxDHCPxx with xxDHCPxx, it's more consistent with the restDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-11-13*: use "can't" instead of "cannot"Denys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-11-05dumpleases: unicode spportTomas Heinrich
Signed-off-by: Tomas Heinrich <heinrich.tomas@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-11-02udhcpc: log script parameter tooDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-10-08udhcpc: fix bug 629: use bcast receive when we perform rebindingDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-09-06more C standard compat fixes from Dan FandrichDenys Vlasenko
function old new delta docolon 207 204 -3 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-08-13udhcpc: if got IP successfully, disable -n for future renewalsJustin Maggard
Signed-off-by: Justin Maggard <jmaggard10@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-07-19udhcpc: small simplificationDenys Vlasenko
function old new delta udhcpc_main 2401 2398 -3 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-07-19typoDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-07-19udhcpc: add/edit comments, no code changesDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-07-19udhcpc: simplify manual renew (make it more similar to automatic one)Denys Vlasenko
function old new delta udhcp_run_script 669 673 +4 udhcpc_main 2414 2401 -13 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 1/1 up/down: 4/-13) Total: -9 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-07-15remove trailing whitespaceDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-07-10fix fallout from BSD patchesDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-07-07udhcpd: fix a bug in add_lease where it was reading at [-1]Denys Vlasenko
It is not correct when we read lease file! Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-07-05Patches to enable FreeBSD buildDenys Vlasenko
platform.h: fix wrong check for endianness, fix lchown aliasing to chown on uclibc. Code seems to not be affected in my testing. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-07-03udhcpc: support option 0x79 (static routes) (part of bug 341)Denys Vlasenko
function old new delta xmalloc_optname_optval - 583 +583 dhcp_option_strings 258 266 +8 dhcp_options 70 72 +2 len_of_option_as_string 11 12 +1 dhcp_option_lengths 11 12 +1 udhcp_run_script 1187 669 -518 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 4/1 up/down: 595/-518) Total: 77 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-07-03udhcp: dname_dec may return NULL, account for that caseDenys Vlasenko
Other random cleanips included... Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-06-26udhcpc: fix a read error loop (e.g.: device is down) blocking TERMDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-06-19udhcp: fix trivial compile errorDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-06-19getopt: FEATURE_GETOPT_LONG for -l; rename GETOPT_LONG to LONG_OPTSDenys Vlasenko
Signed-off-by: Colin Watson <cjwatson@ubuntu.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-06-17udhcp: cosmetics in arpping.c, no code changesDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-06-17udhcp: convert old-style logging in print_static_leasesDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-06-17udhcp: logging improvements, field and variable renamesDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-06-17udhcpc: fix format of one log messageDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-06-17udhcp: shorten mac len from 16 to 6 in lease fileDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-06-17udhcp: change UDHCP_DEBUG into int, make verbosity selectable with -vDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-06-16udhcp: add a few TODOsDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-06-16udhcp: rename server/client_config.arp to server_mac and client_macDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-06-16udhcp: cleanup of static lease handlingDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-06-16udhcp: rename sprintip to sprint_nip, siaddr to siaddr_nipDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-06-16udhcp: rename giaddr to gateway_nip and server to server_nipDenys Vlasenko
"nip" stands for "IP in network order" Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>