aboutsummaryrefslogtreecommitdiff
path: root/networking/udhcp/leases.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* udhcpd: optional IP selection based on MAC hashVladislav Grishenko2011-02-161-6/+34
| | | | | | | | 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>
* *: make GNU licensing statement forms more regularDenys Vlasenko2010-08-161-1/+1
| | | | | | | 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>
* udhcpd: fix hostname truncation bug 1663Denys Vlasenko2010-05-021-0/+2
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* udhcp: cosmetic cleanups; one case of s/full_read/xread/Denys Vlasenko2010-03-261-11/+1
| | | | | | | function old new delta dumpleases_main 632 623 -9 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* udhcp: pass pointer to whole packet to "add option" functionsDenys Vlasenko2010-03-261-0/+1
| | | | | | | | | | | | | | | | | | | | | 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>
* udhcp: code shrink; disable time and log server optionsDenys Vlasenko2010-03-211-17/+16
| | | | | | | | | | | | | | | | | | | 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>
* whitespace fixesDenys Vlasenko2010-01-251-1/+1
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* udhcpd: fix a bug in add_lease where it was reading at [-1]Denys Vlasenko2009-07-071-12/+11
| | | | | | It is not correct when we read lease file! Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* udhcp: logging improvements, field and variable renamesDenys Vlasenko2009-06-171-29/+29
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* udhcp: shorten mac len from 16 to 6 in lease fileDenys Vlasenko2009-06-171-12/+12
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* udhcp: add a few TODOsDenys Vlasenko2009-06-161-2/+2
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* udhcp: rename server/client_config.arp to server_mac and client_macDenys Vlasenko2009-06-161-2/+3
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* udhcp: cleanup of static lease handlingDenys Vlasenko2009-06-161-2/+2
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* udhcp: rename giaddr to gateway_nip and server to server_nipDenys Vlasenko2009-06-161-1/+1
| | | | | | "nip" stands for "IP in network order" Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* udhcp: rename fields in struct dhcpOfferedAddrDenys Vlasenko2009-06-161-10/+10
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* udhcpd: don't fail ARP check if returned MAC matches client's oneDenys Vlasenko2009-06-161-5/+7
| | | | | | Also, do not unicast replies to yiaddr. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* udhcpc: fix truncation of last char in client hostnamesDenis Vlasenko2009-04-211-1/+2
|
* more of pointless whitespace fixesDenis Vlasenko2009-04-011-1/+1
|
* dhcpd: remember and record hostnames; optimize get_optionDenis Vlasenko2009-04-011-2/+18
| | | | | | | | | | | | | | | | | 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
* udhcpd: disable opton to have absolute lease times in lease fileDenis Vlasenko2009-01-011-33/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | (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
* Fix forgotten license commentsDenis Vlasenko2008-12-071-0/+2
|
* dhcp: add FAST_FUNC as appropriate. -160 bytes.Denis Vlasenko2008-09-261-5/+5
|
* dhcp: heed TODO item - divorced options from their string descriptionsDenis Vlasenko2007-11-291-1/+3
| | | | | | | | | | | | | | | | | | | | | 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
* udhcpd: fix bug: s/memcmp() != 0/memcmp() == 0/Denis Vlasenko2007-08-091-11/+10
| | | | | (by David Updegraff <dave@cray.com>)
* remove accumulated stray trailing whitespaceDenis Vlasenko2007-07-171-1/+1
|
* udhcp: many small fixes:Denis Vlasenko2007-07-031-13/+14
| | | | | | | | | | | | | | | | | | | | | | | | * 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
* udhcp: new config option "Rewrite the lease file at every new acknowledge"Denis Vlasenko2007-07-011-2/+2
| | | | | | | | | | (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
* udhcp: MAC_BCAST_ADDR and blank_chaddr are in fact constant, move to rodata.Denis Vlasenko2007-04-071-33/+35
| | | | | | | | | | | | | | | | | | | | | | 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
* udhcp: fix indentation and style.Denis Vlasenko2006-11-181-28/+14
| | | | | Eliminate (group) a lot of smallish *.h files Remove lots of unneeded #includes
* Implement optional syslog logging using ordinaryDenis Vlasenko2006-09-061-1/+1
| | | | | | bb_xx_msg calls, and convert networking/* to it. The rest of bbox will be converted gradually.
* Standardize on the vi editing directives being on the first line."Robert P. J. Day"2006-07-021-0/+1
|
* add back in udhcp supportMike Frysinger2006-05-081-0/+158
|
* remove in place of external linkMike Frysinger2006-03-231-158/+0
|
* just whitespaceTim Riker2006-01-251-1/+1
|
* Wade Berrier writes:Eric Andersen2004-10-081-0/+7
| | | | | | | | | | | | | | | | | | | 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
* Remove trailing whitespace. Update copyright to include 2004.Eric Andersen2004-03-151-15/+15
|
* Use standard C99 typesEric Andersen2004-01-301-8/+8
|
* Finish remerging busybox udhcp and udhcp. Some cleanups as well.Russ Dill2003-12-181-0/+1
|
* include headers with prototypes to make sure prototypes matchRuss Dill2003-12-161-0/+1
|
* Vodz, last_patch_88Glenn L McGrath2003-06-101-18/+16
|
* added full udhcp integrationRuss Dill2002-10-141-0/+151