aboutsummaryrefslogtreecommitdiff
path: root/networking (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Apply post-1.22.0 patches, bump version to 1.22.11_22_1Denys Vlasenko2014-01-201-0/+2
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* hostname: do not use gethostbyname() for "hostname -s"Michael Tokarev2013-12-171-2/+5
| | | | | | | | | | | | | | | | | | | | There's no reason to call gethostbyname() on the value returned by uname() when asked just for a short name of a host. This may also be wrong, when uname is set to one value, but in /etc/hosts (or elsewhere) the "canonical" name is different. This is often the case for localhost entry in /etc/hosts: 127.0.0.1 localhost myname With this content of /etc/hosts, and uname being set to myname, busybox hostname -s will return localhost, while regular hostname utility returns myname. Fix this by not calling gethostbyname() for the simple 'hostname -s' use. Signed-off-by: Michael Tokarev <mjt@tls.msk.ru> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* wget: user-friendly fallback to httpLauri Kasanen2013-12-171-5/+12
| | | | | | | | | | | GNU wget: wget google.com // ok bb before: wget google.com // wget: not an http or ftp url function old new delta parse_url 317 339 +22 Signed-off-by: Lauri Kasanen <curaga@operamail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ntpd: speed up resyncing if our clock is seriously offDenys Vlasenko2013-12-081-7/+39
| | | | | | | function old new delta recv_and_process_peer_pkt 892 922 +30 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ntpd: do not invalidate datapoints after stepDenys Vlasenko2013-12-071-2/+14
| | | | | | | | | | | | | | | | | | Used to set p->filter_datapoint[i].d_dispersion = MAXDISP and clear reachable bits, but this proved to be too agressive: after step (tested with suspinding laptop for ~30 secs), this caused all previous data to be considered invalid, making us needing to collect full ~8 datapoins per peer after step in order to start trusting them. In turn, this was making poll interval decrease even after step was done. (Poll interval decreases already before step in this scenario, because we see large offsets and end up with no good peer to select). function old new delta reset_peer_stats 157 139 -18 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ntpd: comment out "spike detection" codeDenys Vlasenko2013-12-041-4/+9
| | | | | | | function old new delta update_local_clock 982 835 -147 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ntpd: promote log level 3 to productionDenys Vlasenko2013-12-041-45/+54
| | | | | | | | | | | | | | | | Without it, peer selection logic is hard to debug function old new delta update_local_clock 861 982 +121 select_and_cluster 962 1065 +103 common_ping_main 1788 1821 +33 huft_build 1287 1296 +9 chpst_main 708 704 -4 INET6_resolve 127 119 -8 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 4/2 up/down: 266/-12) Total: 254 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ntpd: let user know if spike was detectedDenys Vlasenko2013-12-041-4/+7
| | | | | | | function old new delta update_local_clock 861 943 +82 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* Use unsigned printf/scanf conversion where more appropriateDenys Vlasenko2013-11-293-7/+7
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* fix assorted unused code and wrong format specs found by cppchekc (bug 6716)Denys Vlasenko2013-11-292-3/+4
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ping: try SOCK_DGRAM if no root privilegesDaniel Borca2013-11-281-3/+16
| | | | | Signed-off-by: Daniel Borca <dborca@yahoo.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* udhcp: add PXELINUX config file option (code 209) definitionJeremy Kerr2013-11-122-2/+5
| | | | | | | | | This change adds a definition for DHCP option 209. RFC 5071 defines code 209 as a configuration file for a PXE bootloader; this change uses the string "pxeconffile" as its text identifier. Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* udhcpc: allow zero server-id. Closes 6614.Denys Vlasenko2013-11-031-11/+25
| | | | | | | | | | | | | | function old new delta bcast_or_ucast - 47 +47 udhcp_send_kernel_packet 271 295 +24 udhcpc_main 2696 2705 +9 udhcp_send_raw_packet 456 459 +3 send_release 90 76 -14 send_renew 105 77 -28 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 3/2 up/down: 83/-42) Total: 41 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* udhcpc: make DHCP packets to have at least 300 DHCP bytesJohannes Stezenbach2013-10-281-0/+9
| | | | | | | | | | | | | | | | | | Commit b8b72f02 removed all padding from DHCP packets to fix operation with buggy servers which can't handle maximum sized packets. But it introduced a regression with buggy routers which drop DHCP packets smaller than 300 bytes (i.e. 342 byte ethernet packets). Add back some padding to work around. function old new delta udhcp_send_kernel_packet 268 292 +24 udhcp_send_raw_packet 462 473 +11 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 2/0 up/down: 35/0) Total: 35 bytes Signed-off-by: Johannes Stezenbach <js@sig21.net> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* wget: if FEATURE_CLEAN_UP, free(ptr_to_globals)Guilherme Maciel Ferreira2013-10-161-0/+8
| | | | | Signed-off-by: Guilherme Maciel Ferreira <guilherme.maciel.ferreira@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* Fix some compiler warnings emitted by gcc-4.8.0Denys Vlasenko2013-10-161-1/+1
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ether-wake: shorten help text, reduce packet buffer sizeDenys Vlasenko2013-10-141-9/+10
| | | | | | | | function old new delta ether_wake_main 726 727 +1 packed_usage 29468 29434 -34 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* wget: add support for connect timeoutLauri Kasanen2013-10-122-10/+30
| | | | | | | | | function old new delta open_socket 33 64 +31 wget_main 2182 2194 +12 Signed-off-by: Lauri Kasanen <curaga@operamail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* httpd: make sire pfd[TO_CGI].revents is cleared before poll()Denys Vlasenko2013-09-181-5/+13
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* httpd: treat errors from stdin correctly.Denys Vlasenko2013-09-111-8/+13
| | | | | | | | | | | | | | | | | | Fron bug report: If a CGI or proxied connection is rudely aborted (SIG_{KILL,BUS,SEGV}) then httpd will spin madly the poll loop in: networking/httpd.c:1080 cgi_io_loop_and_exit() Upon investigation I found that pfd[0].revents == 0x0018 (POLLHUP|POLLERR), which leads to empty read, but the pfd[0].fd (STDIN_FILENO) is left open, and in the FD list given to poll() which immediately returns to once again inform the loop of (POLLHUP|POLLERR) condition of pfd[0].fd. This continues until pfd[FROM_CGI].revents != 0 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* iplink: comment out include <net/if_packet.h>Denys Vlasenko2013-08-161-1/+1
| | | | | | | | | iplink.c includes net/if_packet.h, which (on GLIBC) only defines struct sockaddr_pkt. this struct is not used anywhere in the code, and removing the #include makes compilation succeed with musl libc. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* fix build error with musl libc due to if_slip.hDenys Vlasenko2013-08-151-1/+1
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* networking: fix potential overflow in ife_print6()Nicolas Dichtel2013-08-141-1/+1
| | | | | | | | | | | | | | | | devname is used by fscanf to store a string specified by '%20s'. Extract from the man for the '%s' specifier: Matches a sequence of non-white-space characters; the next pointer must be a pointer to character array that is long enough to hold the input sequence and the terminating null byte ('\0'), which is added automatically. The input string stops at white space or at the maximum field width, whichever occurs first. Hence, the right length is 20 + 1 for the '\0'. Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* udhcpc: tweak help text moreDenys Vlasenko2013-08-081-17/+17
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* udhcpc: tweak help textDenys Vlasenko2013-08-081-14/+15
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* udhcpc: tweak help textDenys Vlasenko2013-08-051-4/+4
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ifplugd: use a larger netlink bufferTito Ragusa2013-08-041-4/+10
| | | | | | | | function old new delta check_existence_through_netlink 310 321 +11 Signed-off-by: Tito Ragusa <farmatito@tiscali.it> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* Whitespace fixesDenys Vlasenko2013-07-304-12/+12
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* nc: remove unnecessary "errno = 0"Denys Vlasenko2013-07-291-5/+4
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* iplink: fix build error (IFLA_VLAN_PROTOCOL defined before include)Denys Vlasenko2013-07-281-4/+4
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* nc: remove some dead codeDenys Vlasenko2013-07-281-24/+12
| | | | | | | function old new delta readwrite 887 841 -46 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* nc: exit when both stdin and network are closed.Denys Vlasenko2013-07-281-19/+31
| | | | | | | | function old new delta nc_main 1051 1042 -9 readwrite 943 887 -56 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* nc: use symbolic SHUT_WR instead of literal 1Denys Vlasenko2013-07-281-1/+1
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* networking: code shrinkBartosz Golaszewski2013-07-252-97/+1
| | | | | | | | | | | | | function old new delta in_ether - 124 +124 hexchar2int 42 - -42 ifconfig_main 1237 1106 -131 ether_input 141 - -141 ------------------------------------------------------------------------------ (add/remove: 2/2 grow/shrink: 0/1 up/down: 124/-314) Total: -190 bytes Signed-off-by: Bartosz Golaszewski <bartekgola@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ip link: add VLAN supportPatrick McHardy2013-07-151-9/+128
| | | | | | | | | | | | | | function old new delta do_add_or_delete - 1073 +1073 get_u16 - 62 +62 static.protocols - 16 +16 do_iplink 1235 1232 -3 do_change 495 - -495 ------------------------------------------------------------------------------ (add/remove: 3/1 grow/shrink: 0/1 up/down: 1151/-498) Total: 653 bytes Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ip: code shrinkDenys Vlasenko2013-07-153-20/+16
| | | | | | | | | | | | | function old new delta do_ipaddr 78 81 +3 do_iprule 140 139 -1 do_iptunnel 283 278 -5 iprule_modify 851 841 -10 ipaddr_modify 1293 1236 -57 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 1/4 up/down: 3/-73) Total: -70 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* wget: do not abort if "_" is encountered in a HTTP headerDenys Vlasenko2013-07-011-2/+10
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ping: code shrinkDenys Vlasenko2013-06-281-13/+14
| | | | | | | function old new delta unpack_tail 262 243 -19 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* Move create_icmp[6]_socket to its only user, and simplify itDenys Vlasenko2013-06-281-20/+44
| | | | | | | | | | | | | function old new delta run_applet_and_exit 711 714 +3 sendping_tail 239 236 -3 common_ping_main 1798 1770 -28 create_icmp_socket 65 - -65 create_icmp6_socket 65 - -65 ------------------------------------------------------------------------------ (add/remove: 0/4 grow/shrink: 1/2 up/down: 3/-161) Total: -158 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* nslookup: set default DNS server again. Hopefully helps with 675Denys Vlasenko2013-06-271-2/+13
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ntpd: set offset to 0.0 in "usync" eventDenys Vlasenko2013-05-231-3/+8
| | | | | | | function old new delta ntpd_main 1030 1026 -4 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ntpd: set G.last_script_run even if script isn't configuredDenys Vlasenko2013-05-221-2/+2
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ntpd: make "unsync" code actually work.Denys Vlasenko2013-05-221-3/+13
| | | | | | While at it: don't run "periodic" if interrupted by a signal. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ntpd: drop delay outliers; run "unsync" handler if no replies for some timeDenys Vlasenko2013-05-221-8/+34
| | | | | | | | | | function old new delta ntpd_main 960 1029 +69 recv_and_process_peer_pkt 834 892 +58 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 2/0 up/down: 127/0) Total: 127 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* 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>
* telnet: code shrinkDenys Vlasenko2013-05-121-9/+8
| | | | | | | | function old new delta telnet_main 1519 1515 -4 con_escape 296 285 -11 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* libbb: introduce and use strftime_[YYYYMMDD]HHMMSS()Denys Vlasenko2013-03-292-3/+3
| | | | | | | | | | | | | | | | | | function old new delta strftime_fmt - 53 +53 strftime_YYYYMMDDHHMMSS - 12 +12 strftime_HHMMSS - 12 +12 human_time 44 43 -1 fmtstr_t 9 - -9 step_time 361 345 -16 watch_main 261 232 -29 ------------------------------------------------------------------------------ (add/remove: 3/1 grow/shrink: 0/3 up/down: 77/-55) Total: 22 bytes text data bss dec hex filename 919203 932 17692 937827 e4f63 busybox_old 919209 932 17692 937833 e4f69 busybox_unstripped Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* httpd: don't allow tabs and multiple spaces in request stringDenys Vlasenko2013-03-251-2/+5
| | | | | | | | | HTTP standard doesn't allow it and no sane clients should ever use it. function old new delta handle_incoming_and_exit 2795 2785 -10 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* nc: fix build failure ("subscripted value is neither array nor pointer")Denys Vlasenko2013-03-171-1/+1
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>