aboutsummaryrefslogtreecommitdiff
path: root/networking/udhcp/leases.c
AgeCommit message (Collapse)Author
2015-10-24dumpleases: make host names sanitized to shell-friendly conditionDenys Vlasenko
function old new delta add_lease 271 298 +27 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2014-10-30udhcpd: add option for tweaking arppingMichel Stam
Some clients have a very short timeout for sending the DHCP DISCOVER, shorter than the arpping timeout of 2000 milliseconds that udhcpd uses by default. This patch allows tweaking the timeout, or disabling of arpping altogether, at the risk of handing out addresses which are already in use. function old new delta udhcpd_main 1460 1501 +41 udhcpc_main 2814 2851 +37 packed_usage 29957 29974 +17 arpping 477 493 +16 find_free_or_expired_nip 161 174 +13 send_offer 285 292 +7 nobody_responds_to_arp 85 89 +4 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 7/0 up/down: 135/0) Total: 135 bytes Signed-off-by: Michel Stam <m.stam@fugro.nl> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-02-16udhcpd: optional IP selection based on MAC hashVladislav Grishenko
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>
2010-08-16*: make GNU licensing statement forms more regularDenys Vlasenko
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>
2010-05-02udhcpd: fix hostname truncation bug 1663Denys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-03-26udhcp: cosmetic cleanups; one case of s/full_read/xread/Denys Vlasenko
function old new delta dumpleases_main 632 623 -9 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-03-26udhcp: pass pointer to whole packet to "add option" functionsDenys Vlasenko
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-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-01-25whitespace fixesDenys 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-06-17udhcp: logging improvements, field and variable renamesDenys 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-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 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>
2009-06-16udhcp: rename fields in struct dhcpOfferedAddrDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-06-16udhcpd: don't fail ARP check if returned MAC matches client's oneDenys Vlasenko
Also, do not unicast replies to yiaddr. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-04-21udhcpc: fix truncation of last char in client hostnamesDenis Vlasenko
2009-04-01more of pointless whitespace fixesDenis Vlasenko
2009-04-01dhcpd: remember and record hostnames; optimize get_optionDenis Vlasenko
dumpleases: show hostnames function old new delta add_lease 230 292 +62 send_offer 403 421 +18 send_ACK 232 249 +17 read_leases 249 258 +9 dumpleases_main 604 609 +5 nobody_responds_to_arp 84 86 +2 udhcp_end_option 32 30 -2 udhcp_get_option 222 171 -51 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 6/2 up/down: 113/-53) Total: 60 bytes
2009-01-01udhcpd: disable opton to have absolute lease times in lease fileDenis Vlasenko
(that does not work with dumpleases) dumpleases: fix -a option. networking/udhcp/*: code shrink, more compact static leases struture, better comments, etc function old new delta find_free_or_expired_address - 147 +147 nobody_responds_to_arp - 84 +84 read_opt 781 830 +49 dumpleases_main 435 447 +12 send_ACK 229 232 +3 read_staticlease 90 93 +3 addStaticLease 60 61 +1 getIpByMac 46 43 -3 reservedIp 31 20 -11 keywords 304 288 -16 send_offer 428 403 -25 write_leases 225 193 -32 read_leases 184 143 -41 read_yn 64 - -64 find_address 191 - -191 ------------------------------------------------------------------------------ (add/remove: 2/2 grow/shrink: 5/6 up/down: 299/-383) Total: -84 bytes
2008-12-07Fix forgotten license commentsDenis Vlasenko
2008-09-26dhcp: add FAST_FUNC as appropriate. -160 bytes.Denis Vlasenko
2007-11-29dhcp: heed TODO item - divorced options from their string descriptionsDenis Vlasenko
code shrink while at it. function old new delta dhcp_option_strings - 258 +258 udhcp_run_script 1135 1174 +39 dhcp_option_lengths - 11 +11 udhcp_add_simple_option 93 92 -1 packet_num 4 - -4 read_opt 746 739 -7 udhcp_option_lengths 11 - -11 udhcpc_main 2590 2494 -96 dhcp_options 490 70 -420 ------------------------------------------------------------------------------ (add/remove: 2/2 grow/shrink: 1/4 up/down: 308/-539) Total: -231 bytes text data bss dec hex filename 775309 929 9100 785338 bfbba busybox_old 775098 929 9084 785111 bfad7 busybox_unstripped
2007-08-09udhcpd: fix bug: s/memcmp() != 0/memcmp() == 0/Denis Vlasenko
(by David Updegraff <dave@cray.com>)
2007-07-17remove accumulated stray trailing whitespaceDenis Vlasenko
2007-07-03udhcp: many small fixes:Denis Vlasenko
* arpping(): smaller and even probably fixed * lots of variables/params converted: ulong -> uint32_t * uptime() nuked in favor of monotonic_sec() * udhcp_get_packet(): only one "bad vendor", simplify function old new delta reservedIp 36 35 -1 udhcpc_main 2462 2460 -2 addStaticLease 64 62 -2 static.broken_vendors 16 - -16 uptime 19 - -19 udhcpd_main 1273 1238 -35 udhcp_get_packet 223 184 -39 .rodata 144162 144106 -56 arpping 690 609 -81 ------------------------------------------------------------------------------ (add/remove: 0/2 grow/shrink: 0/7 up/down: 0/-251) Total: -251 bytes text data bss dec hex filename 734241 3028 14400 751669 b7835 busybox_old 734005 3028 14400 751433 b7749 busybox_unstripped
2007-07-01udhcp: new config option "Rewrite the lease file at every new acknowledge"Denis Vlasenko
(Mats Erik Andersson <mats@blue2net.com> (Blue2Net AB)) udhcp: consistently treat server_config.start/end IPs as host-order fix IP parsing for 64bit machines fix unsafe hton macro usage in read_opt() do not chdir("/") when daemonizing fix help text
2007-04-07udhcp: MAC_BCAST_ADDR and blank_chaddr are in fact constant, move to rodata.Denis Vlasenko
a few global variables reduced to smallints function old new delta add_lease 75 227 +152 static.blank_chaddr - 16 +16 MAC_BCAST_ADDR - 6 +6 sockfd 4 8 +4 udhcp_run_script 1153 1155 +2 state 8 5 -3 listen_mode 4 1 -3 perform_release 152 148 -4 fd 8 4 -4 blank_chaddr 16 - -16 udhcpc_main 2518 2497 -21 .rodata 131864 131832 -32 oldest_expired_lease 61 - -61 clear_lease 127 - -127 ------------------------------------------------------------------------------ (add/remove: 2/3 grow/shrink: 3/6 up/down: 180/-271) Total: -91 bytes
2006-11-18udhcp: fix indentation and style.Denis Vlasenko
Eliminate (group) a lot of smallish *.h files Remove lots of unneeded #includes
2006-09-06Implement optional syslog logging using ordinaryDenis Vlasenko
bb_xx_msg calls, and convert networking/* to it. The rest of bbox will be converted gradually.
2006-07-02Standardize on the vi editing directives being on the first line."Robert P. J. Day"
2006-05-08add back in udhcp supportMike Frysinger
2006-03-23remove in place of external linkMike Frysinger
2006-01-25just whitespaceTim Riker
2004-10-08Wade Berrier writes:Eric Andersen
Hello, Here's a patch for a first attempt at static leases for udhcpd. Included in the tarball are 2 files (static_leases.c, static_leases.h) and a patch against the latest cvs. In the config file you can configure static leases with the following format: static_lease 00:60:08:11:CE:4E 192.168.0.54 static_lease 00:60:08:11:CE:3E 192.168.0.44 Comments/suggestions/improvements are welcome. Wade
2004-03-15Remove trailing whitespace. Update copyright to include 2004.Eric Andersen
2004-01-30Use standard C99 typesEric Andersen
2003-12-18Finish remerging busybox udhcp and udhcp. Some cleanups as well.Russ Dill
2003-12-16include headers with prototypes to make sure prototypes matchRuss Dill
2003-06-10Vodz, last_patch_88Glenn L McGrath
2002-10-14added full udhcp integrationRuss Dill