aboutsummaryrefslogtreecommitdiff
path: root/networking
AgeCommit message (Collapse)Author
2015-05-25typo fixesManinder Singh
Signed-off-by: Maninder Singh <maninder1.s@samsung.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2015-05-24tc: fix print_rateDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2015-03-31ftpd: change_identity() must be after chroot()Denys Vlasenko
Otherwise chroot() doesn't work for non-root Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2015-03-22zcip: fix wrong comparison of source IP with our IPVladislav Grishenko
Commit "zcip: fix link-local IP conflict detection" has introduced wrong comparsion of source IP with our IP. This leads to a new IP being picked unnecessarily on every incoming ARP packet. Signed-off-by: Vladislav Grishenko <themiron@mail.ru> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2015-03-22ifupdown: shrink a messageDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2015-03-22ifupdown: correct ifstate update during 'ifup -a'. Closes 6212Frank Bergmann
When 'if -a' runs into an failure on an interface all further interfaces won't be correctly updated in ifstate. This patch inserts a new variable that only tracks the current interfaces failure so that the write to ifstate can rely on this and not the one for the functions return value. Fixes https://bugs.busybox.net/show_bug.cgi?id=6212 Signed-off-by: Frank Bergmann <frank.frajasalo@googlemail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2015-03-12Use chomp to remove newlinesRon Yorston
function old new delta unix_do_one 548 540 -8 process_timer_stats 508 500 -8 process_irq_counts 532 524 -8 lpd_main 839 831 -8 hwclock_main 502 494 -8 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 0/6 up/down: 0/-50) Total: -40 bytes Signed-off-by: Ron Yorston <rmy@tigress.co.uk> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2015-03-12libbb: introduce and use is_prefixed_with()Denys Vlasenko
function old new delta is_prefixed_with - 18 +18 complete_username 78 77 -1 man_main 737 735 -2 fsck_device 429 427 -2 unpack_ar_archive 80 76 -4 strip_unsafe_prefix 105 101 -4 singlemount 1054 1050 -4 rtc_adjtime_is_utc 90 86 -4 resolve_mount_spec 88 84 -4 parse_one_line 1029 1025 -4 parse_conf 1460 1456 -4 may_wakeup 83 79 -4 loadkmap_main 219 215 -4 get_irqs_from_stat 103 99 -4 get_header_cpio 913 909 -4 findfs_main 79 75 -4 fbsplash_main 1230 1226 -4 load_crontab 776 771 -5 expand_vars_to_list 1151 1146 -5 date_main 881 876 -5 skip_dev_pfx 30 24 -6 make_device 2199 2193 -6 complete_cmd_dir_file 773 767 -6 run_applet_and_exit 715 708 -7 uudecode_main 321 313 -8 pwdx_main 197 189 -8 execute 568 560 -8 i2cdetect_main 1186 1176 -10 procps_scan 1242 1230 -12 procps_read_smaps 1017 1005 -12 process_module 746 734 -12 patch_main 1903 1891 -12 nfsmount 3572 3560 -12 stack_machine 126 112 -14 process_timer_stats 449 435 -14 match_fstype 111 97 -14 do_ipaddr 1344 1330 -14 open_list_and_close 359 343 -16 get_header_tar 1795 1779 -16 prepend_new_eth_table 340 323 -17 fsck_main 1811 1794 -17 find_iface_state 56 38 -18 dnsd_main 1321 1303 -18 base_device 179 158 -21 find_keyword 104 82 -22 handle_incoming_and_exit 2785 2762 -23 parse_and_put_prompt 774 746 -28 modinfo 347 317 -30 find_action 204 171 -33 update_passwd 1470 1436 -34 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 0/49 up/down: 18/-540) Total: -522 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2015-03-12arping: fix iface name in error messagesAlexander Korolkov
arping: interface eth0 not found: No such device ^^^^ This is because error template is formed before parsing command line arguments, so it always uses default interface name "eth0". Signed-off-by: Alexander Korolkov <alexander.korolkov@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2015-03-05ntpd: tweak help textDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2015-03-03inetd: fix order of array index check and array accessDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2015-03-02ntpd: chnage help text about -l to say that it doesn't disable client codeDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2015-02-18wget: fix --header to not append duplicate headersBernhard Reutner-Fischer
function old new delta wget_main 2551 2715 +164 wget_user_headers - 62 +62 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 1/0 up/down: 226/0) Total: 226 bytes Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2015-02-18trivial code shrinkDenys Vlasenko
function old new delta rdate_main 246 251 +5 show_entry 291 287 -4 daytime_stream 44 39 -5 packed_usage 30176 30168 -8 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 1/3 up/down: 5/-17) Total: -12 bytes text data bss dec hex filename 929453 932 17684 948069 e7765 busybox_old 929411 932 17684 948027 e773b busybox_unstripped Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2015-02-04route: fix bogus read error when route table is emptyDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2015-02-03route: improve -A inet6Denys Vlasenko
Upstream route command shows non-up routes, it shows reject and nonexthop flags. And we had "ref" and "use" values mixed up... function old new delta flagvals 32 44 +12 flagchars 9 12 +3 INET_setroute 767 768 +1 INET6_setroute 495 496 +1 set_flags 43 39 -4 flags_ipvx 16 8 -8 route_main 632 623 -9 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 4/3 up/down: 17/-21) Total: -4 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2015-02-03ifconfig: fix double free fatal error in INET_sprintDenys Vlasenko
Based on the patch by Zheng Junling <zhengjunling@huawei.com> and Chen Gang <cg.chen@huawei.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2015-01-30telnetd: we only need CONFIG_UNIX98_PTYS from the Linux kernelMartin Kaiser
(re-sending this as it got ignored completey and the format of the previous mail was probably not correct - please let me know if there's anything else I can do to get this trivial fix applied) for telnetd to work, we only need CONFIG_UNIX98_PTYS to be enabled in the Linux kernel - DEVPTS_FS has been obsolete for some time Signed-off-by: Martin Kaiser <lists@kaiser.cx> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2015-01-29ntpd: get rid of G.initial_poll_completeDenys Vlasenko
This speeds up syncing - now happens only just two replies from a peer. Especially useful for "ntpd -q". Shouldn't have ill effects: if we chose a bad peer, we will discover it later and switch to another one. The code is even smaller this way. Suggested by Miroslav Lichvar <mlichvar@redhat.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2015-01-27dhcpd: fix an improper widening conversionDenys Vlasenko
We wanted to detect when tv_sec = unsigned1 - unsigned2 underflows by looking at tv_sec's sign. But if tv_sec is long and it is wider than unsigned, we get unsigned -> long conversion which is in this case never negative. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2015-01-26ftpd: prevent zombies. closes 7832Denys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2015-01-05libbb: code shrink by factoring out common update_utmp_DEAD_PROCESSDenys Vlasenko
function old new delta update_utmp_DEAD_PROCESS - 17 +17 telnetd_main 1685 1674 -11 mark_terminated 56 45 -11 handle_sigchld 74 63 -11 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2015-01-05deleting unused ntpd_simple.cDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2015-01-04ntpd: relicense ntpd applet to ISC-style licenseAdam Tkac
OpenNTPd is licensed under ISC-style license so it's good idea to keep ntpd applet under same license to avoid mess, instead of having our changes to be under GPL. Names of original code's authors are added. Signed-off-by: Adam Tkac <vonsch@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2014-12-25udhcpd: account for script delay in leaseJohn Schroeder
Prevent nasty surprises if script runs longer than lease time / 2. Signed-off-by: John Schroeder <jschroed@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2014-12-21udhcpc: account for script run timeDenys Vlasenko
Based on the following user report: I ran into an issue where I was seeing a long delay in the scripts called in udhcp_run_script. I was using an old version of OpenWrt (kamikaze) and a satellite modem. An NTP script was being called and the modem would sometimes take a long time to respond to the DNS lookup when it was offline. This delay started affecting my lease time. The lease that I would get from my satellite modem before it was online would be short: only 60 seconds. The delay with NTP and the modem would typically be about 18 seconds. This would cause the first DHCP renew request from dhcpc to be a little late. Under certain circumstances, I could even see the first DHCP renew to occur after the lease had expired! function old new delta udhcpc_main 2816 2837 +21 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2014-11-27libbb: use sendfile() to copy data between file descriptorsBartosz Golaszewski
Busybox already uses sendfile in httpd. This patch proposes to use it globally to copy data between file descriptors. It speeds up the copying on slow systems a lot - below are the times needed to copy a 450Mb file with and without this option enabled on a BeagleBone Black: sendfile: user 0m0.000s sys 0m8.170s read/write 4k: user 0m0.470s sys 0m16.300s function old new delta bb_full_fd_action 394 474 +80 Signed-off-by: Bartosz Golaszewski <bartekgola@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2014-11-25udhcpd: if a lease from lease file coincides with a static one, ignore itDenys Vlasenko
function old new delta read_leases 269 328 +59 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2014-11-17iproute: support onelink route option and print route flagsMichael Tokarev
function old new delta print_route 1797 1865 +68 do_iproute 2097 2112 +15 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 2/0 up/down: 83/0) Total: 83 bytes Signed-off-by: Michael Tokarev <mjt@tls.msk.ru> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2014-11-04zcip: Add environment variable for overriding log functionalityMichel Stam
function old new delta bb_logenv_override - 70 +70 packed_usage 29969 30033 +64 zcip_main 1426 1431 +5 ------------------------------------------------------------------------------ (add/remove: 2/0 grow/shrink: 2/0 up/down: 139/0) Total: 139 bytes Signed-off-by: Michel Stam <m.stam@fugro.nl> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2014-10-30zcip: allow our own class B range to be used for ZeroConfMichel Stam
169.254 may already be used by a local network. This patch allows specifying your own IP range. Our particular use case is a mesh network, in which the nodes partaking were using an IP range specifically assigned for the meshing purpose. As the LAN side of the mesh node could use 169.254, this default range was not an option. function old new delta zcip_main 1342 1426 +84 pick_nip - 40 +40 packed_usage 29974 29969 -5 pick 34 - -34 ------------------------------------------------------------------------------ (add/remove: 1/1 grow/shrink: 1/1 up/down: 124/-39) Total: 85 bytes Signed-off-by: Michel Stam <m.stam@fugro.nl> 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>
2014-10-05ntpd: calculate offset to jitter ratio before updating jitterMiroslav Lichvar
The offset to jitter ratio is now calculated before updating jitter to make the test more sensitive. function old new delta ntp_init 460 474 +14 update_local_clock 752 764 +12 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 2/0 up/down: 26/0) Total: 26 bytes Signed-off-by: Miroslav Lichvar <mlichvar@redhat.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2014-10-02ntpd: don't stay at short polling intervalMiroslav Lichvar
To avoid polling servers frequently slowly increase the interval up to BIGPOLL when - no replies are received from a peer - no source can be selected - peer claims to be unsynchronized (e.g. we are polling it too frequently) When recv() returns with an error, drop code to try to continue on network errors: I'm not convinced those cases happen in real life. function old new delta recv_and_process_peer_pkt 919 838 -81 Signed-off-by: Miroslav Lichvar <mlichvar@redhat.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2014-09-27ntpd: be less eager to use shorter poll intervalsDenys Vlasenko
* on step, poll interval drops to 8.5 mins instead of 32 seconds * on total loss of all replies (no replies from any peer for last 8 requests), also drop poll interval to 8.5 mins instead of 32 seconds * on send abd recv errors, RETRY_INTERVAL is now 32 seconds, not 5 seconds * on timing out listening to reply, instead of unconditional shortening poll interval by x4, clamp it to NOREPLY_INTERVAL (512 seconds) * if a largish offset is seen, clamp nexp poll interval to 128 seconds, not 64 seconds function old new delta clamp_pollexp_and_set_MAXSTRAT - 37 +37 recv_and_process_peer_pkt 861 869 +8 poll_interval 52 48 -4 update_local_clock 762 752 -10 ntpd_main 1063 1050 -13 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 1/3 up/down: 45/-27) Total: 18 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2014-09-24ntpd: split out poll adjusting codeMiroslav Lichvar
Signed-off-by: Miroslav Lichvar <mlichvar@redhat.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2014-09-24ntpd: don't wait for good offset before disabling burst modeMiroslav Lichvar
The burst mode needs to be stopped even when no replies are received. Signed-off-by: Miroslav Lichvar <mlichvar@redhat.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2014-09-15ftpd: make LIST command show dotfiles tooDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2014-09-04tftpd: tweak HP PA-RISC firmware bug compatibilityDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2014-09-03tftpd: support full 512-byte requestsDenys Vlasenko
Some HP PA-RISC firmware always sends fixed 512-byte requests, with trailing garbage. function old new delta tftpd_main 578 572 -6 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2014-08-27ping: add -p to specify data patternFlorian Fainelli
function old new delta common_ping_main 1788 1831 +43 sendping6 56 82 +26 sendping4 82 108 +26 packed_usage 29959 29938 -21 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 3/1 up/down: 95/-21) Total: 74 bytes Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2014-08-05ftpd: add optional support for authenticationMorten Kvistgaard
function old new delta cmdio_get_cmd_and_arg - 237 +237 get_passwd - 97 +97 check_password - 82 +82 ftpd_main 2297 2178 -119 ask_and_check_password_extended 206 84 -122 ------------------------------------------------------------------------------ (add/remove: 3/0 grow/shrink: 0/2 up/down: 416/-241) Total: 175 bytes Signed-off-by: Morten Kvistgaard <MK@pch-engineering.dk> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2014-07-20zcip: fix link-local IP conflict detectionKen Sharp
During link-local IP resolution, if a regular ARP request is received during the ARP probe period, it will incorrectly cause a target IP conflict. This then leads to a new IP being picked unnecessarily. Per RFC 3927, section 2.2.1, we should flag a target IP conflict only if the source IP is null, the target IP matches our IP, and the source hw addr does not match our hw addr. function old new delta zcip_main 1354 1322 -32 Signed-off-by: Ken Sharp <ken.sharp@ni.com> Signed-off-by: Ben Shelton <ben.shelton@ni.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2014-07-16udhcp: add PXELINUX path prefix option (code 210) definitionJeremy Kerr
Like d3092c99, this change adds support for the DHCP "path-prefix" option, as defined in RFC 5071. We use the string identifer "pxepathprefix". Adding this option makes string parsing in the hook scripts simpler. function old new delta dhcp_option_strings 255 269 +14 dhcp_optflags 72 74 +2 Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2014-07-15ntpd: add support for -I IFACEDenys Vlasenko
function old new delta packed_usage 29908 29947 +39 ntp_init 428 460 +32 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 2/0 up/down: 71/0) Total: 71 bytes Signed-off-by: Nikolaus Froehlich <nikolaus@mathematik.uni-marburg.de> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2014-06-27ftpd: do not use root_fd if we are not in chrootDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2014-06-27ftpd: for LIST, open current directory *in the child*Denys Vlasenko
Last change introduced an open fd leak. This is the fix. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2014-06-27ftpd: escape chroot prior to re-executing ls helperDenys Vlasenko
When we merely chdir to saved "real" root fd, exec("proc/self/exe") works for static executables but not for dynamic ones (they can't find their interpreter). With this patch, we also *chroot* to real root. As a bonus, this gives us proper usernames, timezone conversion etc. function old new delta popen_ls 203 259 +56 ftpd_main 2362 2366 +4 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2014-06-26ftpd: optimize writes of LIST results a bitDenys Vlasenko
function old new delta handle_dir_common 201 207 +6 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2014-06-25ftpd: support deprecated XPWD commandDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>