aboutsummaryrefslogtreecommitdiff
path: root/networking
AgeCommit message (Collapse)Author
2014-03-23ntpd: add optional support for /etc/ntp.confDenys Vlasenko
function old new delta add_peers - 98 +98 packed_usage 29470 29511 +41 ntp_init 407 428 +21 pw_encrypt 14 27 +13 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 3/0 up/down: 173/0) Total: 173 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2014-03-05use [s]rand(), not [s]random()Denys Vlasenko
rand() is the most standard C library function, and on uclibc they are the same. I guess they are the same in most todays' libc... Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2014-03-01ip link: add support for "address ETHADDR". Closes 4862Denys Vlasenko
function old new delta do_iplink 2175 2289 +114 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2014-02-27udhcpc: ignore NAKs from "wrong" servers. Closes 4267Denys Vlasenko
function old new delta udhcpc_main 2716 2814 +98 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2014-02-26nc: fix option bit positions. Closes 6926Denys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2014-02-24wget: fix commentDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2014-02-23wget: add commented-out code to use ssl_helper instead of opensslDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2014-02-23networking/ssl_helper: experimental matrixssl-based ssl helperDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2014-02-22wget: add support for https using "openssl s_client" as a helperDenys Vlasenko
www.kernel.org started redirecting http:// to https:// making https support mandatory for any auto build scripts. function old new delta wget_main 2631 2971 +340 parse_url 409 471 +62 .rodata 115607 115626 +19 P_HTTPS - 6 +6 P_HTTP - 5 +5 P_FTP - 4 +4 ------------------------------------------------------------------------------ (add/remove: 3/0 grow/shrink: 3/0 up/down: 436/0) Total: 436 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2014-02-19udhcpc: fix BPF filter. Hopefully fixes the root cause of 4598 and 6746Denys Vlasenko
Use a *signed* large positive value in BPF filter to indicate success. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2014-02-10ifplugd: code shrinkDenys Vlasenko
function old new delta ifplugd_main 1161 1144 -17 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2014-02-09htpd: trivial simplification in random interval selectionDenys Vlasenko
function old new delta poll_interval 57 52 -5 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2014-02-07udhcpc: in comments, explain the kind of raw socket we createDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2014-02-03udhcpc: don't use BPF filter, users report problems (bugs 4598, 6746)Denys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2014-02-03ifupdown: support 'link' address familyKaarle Ritvanen
Does not configure anything. L2 configuration hook scripts should do their job on receiving ADDRFAM=link. Configuration will be done only once, irrespective of L3 protocols used. Using the 'link' family in the interfaces file conforms to the Debian implementation: http://sources.debian.net/src/ifupdown/0.7.47.1/link.defn function old new delta link_methods - 12 +12 addr_link - 12 +12 link_up_down - 6 +6 static.addr_fams 12 16 +4 ------------------------------------------------------------------------------ (add/remove: 3/0 grow/shrink: 1/0 up/down: 34/0) Total: 34 bytes Signed-off-by: Kaarle Ritvanen <kaarle.ritvanen@datakunkku.fi> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2014-02-03wget: fix use-after-free of ->user. Closes 6836Denys Vlasenko
function old new delta wget_main 2207 2223 +16 parse_url 339 353 +14 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2014-01-22iplink: fix build with kernel versions prior to 2.6.23Eugene Rudoy
Signed-off-by: Eugene Rudoy <gene.devel@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2014-01-20ntpd: remove now unnecessary check for IP_PKTINFO definitionDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2014-01-20ntpd: fix compilation warningsBartosz Golaszewski
GCC complained about since_last_update being set but not used. Signed-off-by: Bartosz Golaszewski <bartekgola@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2014-01-10fakeidentd: simplify ndelay manipulationsDenys Vlasenko
function old new delta new_peer 91 79 -12 do_rd 197 152 -45 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2014-01-09fixlet for the previous commit #2Denys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2014-01-09fixlet for the previous commitDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2014-01-09networking: explain isrv_run() APIDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2014-01-09fakeidentd: fix use-after-freeRyan Mallon
function old new delta do_rd 199 197 -2 Signed-off-by: Ryan Mallon <rmallon@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2014-01-09ping: revert "try SOCK_DGRAM if no root privileges"Denys Vlasenko
It wasn't working, and fixes on top of it would make ping noticeably larger. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2014-01-08ntpd: adjust last packet's recv time after a stepDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-12-17hostname: do not use gethostbyname() for "hostname -s"Michael Tokarev
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>
2013-12-17wget: user-friendly fallback to httpLauri Kasanen
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>
2013-12-08ntpd: speed up resyncing if our clock is seriously offDenys Vlasenko
function old new delta recv_and_process_peer_pkt 892 922 +30 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-12-07ntpd: do not invalidate datapoints after stepDenys Vlasenko
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>
2013-12-04ntpd: comment out "spike detection" codeDenys Vlasenko
function old new delta update_local_clock 982 835 -147 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-12-04ntpd: promote log level 3 to productionDenys Vlasenko
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>
2013-12-04ntpd: let user know if spike was detectedDenys Vlasenko
function old new delta update_local_clock 861 943 +82 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-11-29Use unsigned printf/scanf conversion where more appropriateDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-11-29fix assorted unused code and wrong format specs found by cppchekc (bug 6716)Denys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-11-28ping: try SOCK_DGRAM if no root privilegesDaniel Borca
Signed-off-by: Daniel Borca <dborca@yahoo.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-11-12udhcp: add PXELINUX config file option (code 209) definitionJeremy Kerr
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>
2013-11-03udhcpc: allow zero server-id. Closes 6614.Denys Vlasenko
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>
2013-10-28udhcpc: make DHCP packets to have at least 300 DHCP bytesJohannes Stezenbach
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>
2013-10-16wget: if FEATURE_CLEAN_UP, free(ptr_to_globals)Guilherme Maciel Ferreira
Signed-off-by: Guilherme Maciel Ferreira <guilherme.maciel.ferreira@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-10-16Fix some compiler warnings emitted by gcc-4.8.0Denys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-10-14ether-wake: shorten help text, reduce packet buffer sizeDenys Vlasenko
function old new delta ether_wake_main 726 727 +1 packed_usage 29468 29434 -34 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-10-12wget: add support for connect timeoutLauri Kasanen
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>
2013-09-18httpd: make sire pfd[TO_CGI].revents is cleared before poll()Denys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-09-11httpd: treat errors from stdin correctly.Denys Vlasenko
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>
2013-08-16iplink: comment out include <net/if_packet.h>Denys Vlasenko
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>
2013-08-15fix build error with musl libc due to if_slip.hDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-08-14networking: fix potential overflow in ife_print6()Nicolas Dichtel
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>
2013-08-08udhcpc: tweak help text moreDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-08-08udhcpc: tweak help textDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>