aboutsummaryrefslogtreecommitdiff
path: root/networking
AgeCommit message (Collapse)Author
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>
2013-08-05udhcpc: tweak help textDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-08-04ifplugd: use a larger netlink bufferTito Ragusa
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>
2013-07-30Whitespace fixesDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-07-29nc: remove unnecessary "errno = 0"Denys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-07-28iplink: fix build error (IFLA_VLAN_PROTOCOL defined before include)Denys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-07-28nc: remove some dead codeDenys Vlasenko
function old new delta readwrite 887 841 -46 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-07-28nc: exit when both stdin and network are closed.Denys Vlasenko
function old new delta nc_main 1051 1042 -9 readwrite 943 887 -56 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-07-28nc: use symbolic SHUT_WR instead of literal 1Denys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-07-25networking: code shrinkBartosz Golaszewski
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>
2013-07-15ip link: add VLAN supportPatrick McHardy
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>
2013-07-15ip: code shrinkDenys Vlasenko
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>
2013-07-01wget: do not abort if "_" is encountered in a HTTP headerDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-06-28ping: code shrinkDenys Vlasenko
function old new delta unpack_tail 262 243 -19 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-06-28Move create_icmp[6]_socket to its only user, and simplify itDenys Vlasenko
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>
2013-06-27nslookup: set default DNS server again. Hopefully helps with 675Denys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-05-23ntpd: set offset to 0.0 in "usync" eventDenys Vlasenko
function old new delta ntpd_main 1030 1026 -4 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-05-22ntpd: set G.last_script_run even if script isn't configuredDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-05-22ntpd: make "unsync" code actually work.Denys Vlasenko
While at it: don't run "periodic" if interrupted by a signal. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-05-22ntpd: drop delay outliers; run "unsync" handler if no replies for some timeDenys Vlasenko
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>
2013-05-17udhcp: code shrinkDenys Vlasenko
function old new delta attach_option 416 413 -3 allocate_tempopt_if_needed 74 - -74 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-05-17udhcpc: fix a problem with binary-encoded options #2Denys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-05-12telnet: code shrinkDenys Vlasenko
function old new delta telnet_main 1519 1515 -4 con_escape 296 285 -11 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-03-29libbb: introduce and use strftime_[YYYYMMDD]HHMMSS()Denys Vlasenko
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>
2013-03-25httpd: don't allow tabs and multiple spaces in request stringDenys Vlasenko
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>
2013-03-17nc: fix build failure ("subscripted value is neither array nor pointer")Denys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-03-15traceroute: free some memory allocated by xzalloc()Guilherme Maciel Ferreira
Signed-off-by: Guilherme Maciel Ferreira <guilherme.maciel.ferreira@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-03-15ping[6]: accept and ignore -n. Code shrinkDenys Vlasenko
function old new delta print_stats_and_exit 270 232 -38 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-03-14udhcpd: also add -I ADDR to help textDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-03-13udhcpd: add -I LOCAL_ADDR optionDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-03-12platform: use KERNEL_VERSION to simplify uClibc version checkingMike Frysinger
This makes reading the logic (as well as adding new code) a lot simpler, and fixes one or two cases that were broken due to incorrect sub-version tests. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2013-02-28ifupdown: support "source" stanza in /etc/network/interfacesDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-02-28ifplugd: make -k send SIGINT, not SIGQUITDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-02-28Fix config help textDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-02-28nc_bloaty: support -ll and -lk. Closes 2245Denys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-02-28nc: don't redirect stderr to network in -e PROG modeDenys Vlasenko
This in incompatible with nc-1.10, but makes a lot of sense. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>