aboutsummaryrefslogtreecommitdiff
path: root/networking/udhcp (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* udhcp: code shrinkDenys Vlasenko2013-05-171-17/+13
| | | | | | | | function old new delta attach_option 416 413 -3 allocate_tempopt_if_needed 74 - -74 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* udhcpc: fix a problem with binary-encoded options #2Denys Vlasenko2013-05-171-1/+1
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* udhcpd: also add -I ADDR to help textDenys Vlasenko2013-03-141-1/+1
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* udhcpd: add -I LOCAL_ADDR optionDenys Vlasenko2013-03-131-4/+13
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* udhcpc6: fix port numbers used if !FEATURE_UDHCP_PORTDenys Vlasenko2013-01-283-18/+22
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* whitespace cleanup. no code changesDenys Vlasenko2013-01-141-1/+1
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* udhcpc[6]: allow discover_retries == 0 (infinite)Felix Fietkau2012-09-272-4/+4
| | | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ushcpc: gracefully handle packets with CHECKSUM_PARTIALAlexey Froloff2012-09-171-8/+49
| | | | | | | | | | | function old new delta udhcp_recv_raw_packet 415 579 +164 change_listen_mode 317 370 +53 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 2/0 up/down: 217/0) Total: 217 bytes Signed-off-by: Alexey Froloff <raorn@raorn.name> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* udhcp[cd]: fix binding to network aliases. Closes 5432, 5438Denys Vlasenko2012-08-101-1/+9
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* udhcpc: make -O <numeric_opt> work. Closes 5402Denys Vlasenko2012-07-273-13/+21
| | | | | | | | | | | | | function old new delta udhcpc_main 2642 2685 +43 udhcp_recv_raw_packet 414 415 +1 d6_recv_raw_packet 248 249 +1 udhcpc6_main 2430 2413 -17 add_client_options 239 213 -26 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 3/2 up/down: 45/-43) Total: 2 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* Add yet another missing ALIGN2 on a global declaration.Denys Vlasenko2012-07-261-1/+1
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* dhcpd: write lease file on exitDenys Vlasenko2012-07-241-4/+4
| | | | | | | function old new delta udhcpd_main 1431 1403 -28 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* *: declare strings with ALIGN1, as appropriateMichael Tokarev2012-07-241-2/+2
| | | | | Signed-off-by: Michael Tokarev <mjt@tls.msk.ru> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* udhcpc[6]: show select timeout in logDenys Vlasenko2012-06-022-2/+2
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* udhcpc6: depend on ipv6Mike Frysinger2012-05-021-4/+5
| | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* udhcpc: fix improper size calculation for OPTION_STRING_HOSTDenys Vlasenko2012-04-221-0/+1
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* fix build breakage found by randconfigDenys Vlasenko2012-04-202-1/+5
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* udhcp: make arpping code resistant to time jumpsDenys Vlasenko2012-04-171-2/+7
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* udhcp: finish support of classless static routes (now the correct patch!)Michael McTernan2011-12-161-18/+37
| | | | | Signed-off-by: Michael McTernan <Michael.McTernan.2001@cs.bris.ac.uk> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* udhcpc: sanitize hostnames in incoming packets. Closes 3979.Denys Vlasenko2011-12-083-5/+73
| | | | | | | | | | | | | | | | The following options are replaced with string "bad" if they contain malformed hostname: HOST_NAME, DOMAIN_NAME, NIS_DOMAIN, TFTP_SERVER_NAME function old new delta xmalloc_optname_optval 850 888 +38 attach_option 440 443 +3 len_of_option_as_string 13 14 +1 dhcp_option_lengths 13 14 +1 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 4/0 up/down: 43/0) Total: 43 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* udhcpc: shrink code by setting xid more economicallyDenys Vlasenko2011-11-181-4/+8
| | | | | | | | function old new delta send_decline 90 82 -8 udhcpc_main 2649 2640 -9 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* udhcpc6: rudimentary code to export data to script; fix IAADDR parsingDenys Vlasenko2011-11-165-40/+131
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* udhcpc[6]: tweak help text, remove -B from udhcpc6 and "--version" from bothDenys Vlasenko2011-11-082-13/+9
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* udhcpc6: set hop limit to 1 in emitted raw packetsDenys Vlasenko2011-11-071-7/+11
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* udhcpc6: fix endiannessDenys Vlasenko2011-11-072-10/+10
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* udhcpc6: new applet. Not yet functional.Denys Vlasenko2011-11-074-0/+1724
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It builds. It sends Solicit packets. Not sure these packets are well-formed. I have no server to test it against. function old new delta udhcpc6_main - 2426 +2426 d6_send_raw_packet - 428 +428 d6_send_kernel_packet - 274 +274 d6_recv_raw_packet - 248 +248 send_d6_discover - 177 +177 packed_usage 28795 28966 +171 d6_run_script - 156 +156 send_d6_renew - 140 +140 send_d6_release - 126 +126 d6_recv_kernel_packet - 116 +116 send_d6_select - 95 +95 perform_d6_release - 78 +78 d6_find_option - 74 +74 init_d6_packet - 54 +54 d6_copy_option - 48 +48 d6_mcast_from_client_config_ifindex - 42 +42 d6_dump_packet - 24 +24 static.FF02__1_2 - 16 +16 d6_store_blob - 13 +13 applet_names 2432 2440 +8 applet_main 1412 1416 +4 applet_nameofs 706 708 +2 add_d6_client_options - 1 +1 ------------------------------------------------------------------------------ (add/remove: 21/0 grow/shrink: 4/0 up/down: 4721/0) Total: 4721 bytes text data bss dec hex filename 879080 493 7584 887157 d8975 busybox_old 884585 497 7584 892666 d9efa busybox_unstripped Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* udhcpc: trim help text, rename badly-named variableDenys Vlasenko2011-11-072-15/+14
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* udhcpc: code shrinkDenys Vlasenko2011-11-071-22/+18
| | | | | | | | function old new delta udhcpc_main 2646 2649 +3 udhcp_run_script 816 802 -14 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* udhcpc: remove workaround for bugs in Win98 dhcp server ("MSFT 98" vendor ↵Denys Vlasenko2011-11-051-31/+3
| | | | | | | | | | | | | | | | | | | string) Stats for last three commits: function old new delta udhcpc_main 2635 2646 +11 udhcp_recv_raw_packet 425 414 -11 udhcp_recv_kernel_packet 210 134 -76 packed_usage 28940 28857 -83 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 1/3 up/down: 11/-170) Total: -159 bytes text data bss dec hex filename 879524 493 7584 887601 d8b31 busybox_old 879340 493 7584 887417 d8a79 busybox_unstripped Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* udhcpc: reuse string constant; remove unneeded memset(0)Denys Vlasenko2011-11-051-2/+1
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* udhcpc: deprecate --hostname NAMEDenys Vlasenko2011-11-051-5/+20
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* getty: reset tty attrs on Ctrl-C and Ctrl-D tooDenys Vlasenko2011-10-231-1/+1
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* udhcpc: add comment about server IPDenys Vlasenko2011-10-201-1/+19
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* udhcpc: in fill_envp, export BOOTP fields firstDenys Vlasenko2011-10-201-18/+36
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* dhcpc: fix the case where we might add extra space at the end of envvar.Denys Vlasenko2011-10-202-9/+13
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* udhcpc: fix 6rd option formatting (was using 4 more bytes than there is)Denys Vlasenko2011-10-201-27/+23
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* udhcpc: remove unused argument in sprint_nip6Denys Vlasenko2011-10-201-4/+4
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* udhcpc: small code shrinkDenys Vlasenko2011-10-201-6/+9
| | | | | | | function old new delta udhcp_recv_raw_packet 430 425 -5 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* typo fix in commentDenys Vlasenko2011-10-201-1/+1
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* udhcpc: add support for DHCP option 212 (RFC 5969)Denys Vlasenko2011-10-193-2/+82
| | | | | | | | | | | | | | | The patch is from OpenWRT people. function old new delta xmalloc_optname_optval 637 874 +237 dhcp_option_strings 237 243 +6 dhcp_optflags 68 70 +2 len_of_option_as_string 12 13 +1 dhcp_option_lengths 12 13 +1 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 5/0 up/down: 247/0) Total: 247 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* udhcpc: on SIGUSR1, limit renew attempts time to 20 seconds; then do total ↵Vladislav Grishenko2011-10-181-1/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | reconfig Scenario: 1. udhcpc gets lease for 86400 secs and sleeps for 43200 before renew attempt 2. PC gets physically disconnected and connected to another network 3. some phy control software sends SIGUSR1 to renew the lease, SIGUSR2 isn't used because newly connected network could be the same as before 4. udhcpc sends unicast renew requests until lease timeout fall to 60 sec. They are ignored by new network dhcp servers 5. udhcpc sends broadcast rebind requests for 60 seconds, which are NAKed or ignored too 6. udhcpc deconfigs and starting from discover state, gets new lease for the new network So, pt.4+5 it could take up to 86400 secs without correct lease, which is too long and not acceptable. Second SIGUSR1 will immediately run into deconfig/discover state, which is not preferable in case of the same subnet replugged. This patch makes sure after SIGUSR1 timeout is no more than -A NUM (usually 20 sec). It means that renew will be requested via broadcast, and if no replies come back, full deconf/reconf cycle will be initiated in 20 seconds. Signed-off-by: Vladislav Grishenko <themiron@mail.ru> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* udhcp: IF_UDHCP_VERBOSE() macro - improve code readabilityLeonid Lisovskiy2011-10-183-11/+5
| | | | | Signed-off-by: Leonid Lisovskiy <lly.dev@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* udhcp: remove the declaration of non-existent udhcp_checksumBaruch Siach2011-09-091-2/+0
| | | | | Signed-off-by: Baruch Siach <baruch@tkos.co.il> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* networking: consolidate the IP checksum code. -129 bytes.Baruch Siach2011-09-072-33/+5
| | | | | Signed-off-by: Baruch Siach <baruch@tkos.co.il> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* *: simplify Ethernet header includesDan Fandrich2011-06-103-28/+6
| | | | | Signed-off-by: Dan Fandrich <dan@coneharvesters.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* *: remove "Options:" string from help textsDenys Vlasenko2011-06-051-1/+0
| | | | | | | function old new delta packed_usage 28706 28623 -83 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* udhcpc: allow -O OPT take numeric paramsDenys Vlasenko2011-06-041-2/+5
| | | | | | | function old new delta udhcpc_main 2623 2654 +31 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* udhcp: fix some default values from "" to NULLDenys Vlasenko2011-05-031-3/+3
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* udhcp: add FEATURE_UDHCP_8021Q optionNigel Hathaway2011-04-263-0/+18
| | | | | | | | | function old new delta dhcp_option_strings 217 237 +20 dhcp_optflags 64 68 +4 Signed-off-by: Nigel Hathaway <Nigel.Hathaway@ubiquisys.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* dhcpc: export unrecognized options in "optNN=XXXXXXXXX" formNigel Hathaway2011-04-261-10/+47
| | | | | | | | function old new delta udhcp_run_script 609 818 +209 Signed-off-by: Nigel Hathaway <Nigel.Hathaway@ubiquisys.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>