aboutsummaryrefslogtreecommitdiff
path: root/networking (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
| * style fix, no code changesDenys Vlasenko2019-05-143-4/+7
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * udhcpd: code shrinkDenys Vlasenko2019-05-101-6/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | function old new delta is_nip_reserved_as_static - 28 +28 get_static_nip_by_mac 43 47 +4 udhcpd_main 1459 1454 -5 send_offer 449 444 -5 read_leases 309 299 -10 is_nip_reserved 20 - -20 packed_usage 33283 33243 -40 ------------------------------------------------------------------------------ (add/remove: 1/1 grow/shrink: 1/4 up/down: 32/-80) Total: -48 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * Optionally re-introduce bb_info_msg()James Byrne2019-04-3012-86/+85
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Between Busybox 1.24.2 and 1.25.0 the bb_info_msg() function was eliminated and calls to it changed to be bb_error_msg(). The downside of this is that daemons now log all messages to syslog at the LOG_ERR level which makes it hard to filter errors from informational messages. This change optionally re-introduces bb_info_msg(), controlled by a new option FEATURE_SYSLOG_INFO, restores all the calls to bb_info_msg() that were removed (only in applets that set logmode to LOGMODE_SYSLOG or LOGMODE_BOTH), and also changes informational messages in ifplugd and ntpd. The code size change of this is as follows (using 'defconfig' on x86_64 with gcc 7.3.0-27ubuntu1~18.04) function old new delta bb_info_msg - 182 +182 bb_vinfo_msg - 27 +27 static.log7 194 198 +4 log8 190 191 +1 log5 190 191 +1 crondlog 45 - -45 ------------------------------------------------------------------------------ (add/remove: 2/1 grow/shrink: 3/0 up/down: 215/-45) Total: 170 bytes If you don't care about everything being logged at LOG_ERR level then when FEATURE_SYSLOG_INFO is disabled Busybox actually gets smaller: function old new delta static.log7 194 200 +6 log8 190 193 +3 log5 190 193 +3 syslog_level 1 - -1 bb_verror_msg 583 581 -2 crondlog 45 - -45 ------------------------------------------------------------------------------ (add/remove: 0/2 grow/shrink: 3/1 up/down: 12/-48) Total: -36 bytes Signed-off-by: James Byrne <james.byrne@origamienergy.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ip: fix comment placementDenys Vlasenko2019-04-291-1/+1
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ifupdown: close memory leakDenys Vlasenko2019-04-281-3/+9
| | | | | | | | | | | | | | function old new delta execute_all 80 91 +11 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Merge branch 'busybox' into mergeFRP-3128-g241d4d4acRon Yorston2019-04-201-114/+146
|\|
| * httpd: do disable header reading timeout even if proxyingDenys Vlasenko2019-04-191-0/+2
| | | | | | | | | | | | | | function old new delta handle_incoming_and_exit 2362 2369 +7 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * httpd: use full size of iobuf[] when piping CGI dataDenys Vlasenko2019-04-191-11/+4
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * httpd: do not set alarm() timeout if we read cached headerDenys Vlasenko2019-04-191-1/+1
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * httpd: deindent code block, no code changesDenys Vlasenko2019-04-191-91/+91
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * httpd: require "HTTP/xyz" at the end of request lineDenys Vlasenko2019-04-191-14/+8
| | | | | | | | | | | | | | | | | | | | | | | | function old new delta handle_incoming_and_exit 2379 2362 -17 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 0/1 up/down: 0/-17) Total: -17 bytes text data bss dec hex filename 981787 485 7296 989568 f1980 busybox_old 981779 485 7296 989560 f1978 busybox_unstripped Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * httpd: pass authorization header to CGI if not BasicAlexander Vickberg2019-04-181-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | Pass the Authorization header to CGI if not of type Basic. This will make it possible for CGI to verify authorization headers of type Bearer <token>. function old new delta handle_incoming_and_exit 2370 2379 +9 Signed-off-by: Alexander Vickberg <wickbergster@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * httpd: When sending gzipped content use content-length headerAlexander Vickberg2019-04-171-2/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Today for gzipped content httpd is using a header with name Transfer-Length. However I can't find a header with that name in the standards. Instead use Content-Length. function old new delta .rodata 157940 157936 -4 send_headers 980 939 -41 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 0/2 up/down: 0/-45) Total: -45 bytes Signed-off-by: Alexander Vickberg <wickbergster@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Merge branch 'busybox' into mergeRon Yorston2019-04-179-448/+500
|\|
| * httpd: extract query string only after proxying checkDenys Vlasenko2019-04-161-12/+7
| | | | | | | | | | | | | | function old new delta handle_incoming_and_exit 2398 2370 -28 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * httpd: make rmt_ip variable localDenys Vlasenko2019-04-161-17/+22
| | | | | | | | | | | | | | | | | | | | | | function old new delta handle_incoming_and_exit 2385 2398 +13 if_ip_denied_send_HTTP_FORBIDDEN_and_exit 51 54 +3 get_line 110 106 -4 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 2/1 up/down: 16/-4) Total: 12 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * httpd: check denied IPs even before reading 1st query lineDenys Vlasenko2019-04-161-2/+2
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * httpd: do not decode URL and headers if proxying - send all verbatimDenys Vlasenko2019-04-161-68/+46
| | | | | | | | | | | | | | function old new delta handle_incoming_and_exit 2566 2385 -181 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * httpd: remove duplicate "decode URL escape sequences" codeDenys Vlasenko2019-04-161-9/+0
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * httpd: put all headers into environment as HTTP_UPPERCASED_HEADER=valDenys Vlasenko2019-04-161-105/+120
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Set up environment variables before running the CGI script. The variables will be named HTTP_<filtered_name> where the <filtered_name> is the header name capitalized and all characters not matching [a-z] | [A-Z] | [0-9] replaced with '_'. function old new delta http_response 80 88 +8 http_response_type 20 22 +2 send_headers 718 715 -3 parse_conf 1481 1478 -3 get_line 128 110 -18 cgi_io_loop_and_exit 599 569 -30 send_cgi_and_exit 882 738 -144 handle_incoming_and_exit 2793 2592 -201 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 2/6 up/down: 10/-399) Total: -389 bytes text data bss dec hex filename 982178 485 7296 989959 f1b07 busybox_old 981675 485 7296 989456 f1910 busybox_unstripped Signed-off-by: Alexander Vickberg <wickbergster@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * httpd: fix handling of EOF in get_line()Denys Vlasenko2019-04-161-8/+10
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * httpd: add missing {}Denys Vlasenko2019-04-161-1/+2
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * httpd: do not percent-decode URI if proxyingDenys Vlasenko2019-04-161-10/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The proxying is documented as follows: P:/url:[http://]hostname[:port]/new/path Howeverm urlcopy is not a true copy anymore when it is fdprint'ed to proxy_fd, this is because percent_decode_in_place() is called after the copy is created. This breaks reverse proxying all URIs containing percent encoded spaces, e.g. - because a decoded URI will be printed out to proxy_fd instead of the original. The fix keeps the logic in place to canonicalize the uri first, before reverse proxying (one could argue that the uri should be proxied completely unaltered, except for the prefix rewrite). function old new delta handle_incoming_and_exit 2752 2792 +40 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * httpd: fix proxy headers passing - full_write() instead of write()Denys Vlasenko2019-04-141-11/+16
| | | | | | | | | | | | | | function old new delta handle_incoming_and_exit 2763 2752 -11 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * httpd: if remote IP is denied, send FORBIDDEN reply earlierDenys Vlasenko2019-04-141-10/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | While at it, fix sighup_handler to not clobber errno. function old new delta send_HTTP_FORBIDDEN_and_exit_if_denied_ip - 47 +47 sighup_handler 15 30 +15 handle_incoming_and_exit 2791 2763 -28 checkPermIP 48 - -48 ------------------------------------------------------------------------------ (add/remove: 1/1 grow/shrink: 1/1 up/down: 62/-76) Total: -14 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * udhcpc6: code shrinkDenys Vlasenko2019-04-143-10/+18
| | | | | | | | | | | | | | function old new delta d6_read_interface 593 582 -11 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * udhcpc6: add a few comments, no code changes.Denys Vlasenko2019-04-132-0/+10
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * udhcpc6: make it enabled in defconfigDenys Vlasenko2019-04-131-3/+1
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * udhcp: add 100 and 101 dhcp options for ipv4Antoine Girard-Vallée2019-04-132-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Support for the IEEE timezone string and timezone database strings (100 and 101 options respectively) is added for ipv4, conforming to RFC-4833. The two options are passed to hook scripts in the variables tzstr and tzdbstr. function old new delta dhcp_option_strings 280 294 +14 dhcp_optflags 76 80 +4 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 2/0 up/down: 18/0) Total: 18 bytes Signed-off-by: Antoine Girard-Vallée <antoine.girard-vallee@savoirfairelinux.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * brctl: add TODO: "showmacs BR"Denys Vlasenko2019-04-131-4/+18
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * brctl: simplify str_to_jiffies()Denys Vlasenko2019-04-131-48/+20
| | | | | | | | | | | | | | | | | | | | | | function old new delta write_uint - 96 +96 brctl_main 721 678 -43 write_ulong 96 - -96 ------------------------------------------------------------------------------ (add/remove: 1/1 grow/shrink: 0/1 up/down: 96/-139) Total: -43 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * brctl: convert remaining commands to work via /sysDenys Vlasenko2019-04-131-184/+147
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | function old new delta write_ulong - 96 +96 show_bridge 310 338 +28 static.ops 3 - -3 arm_ioctl 20 - -20 packed_usage 33344 33315 -29 brctl_main 885 721 -164 ------------------------------------------------------------------------------ (add/remove: 1/2 grow/shrink: 1/2 up/down: 124/-216) Total: -92 bytes text data bss dec hex filename 982112 485 7296 989893 f1ac5 busybox_old 982157 485 7296 989938 f1af2 busybox_unstripped Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * brctl: make "show" command retrieve data from /sysDenys Vlasenko2019-04-121-49/+114
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ioctl interface is obsolete and has no 32/64 compat shim, making "brctl show" fail for 32-bit userspace and 64-bit kernel. function old new delta show_bridge - 310 +310 read_file - 64 +64 if_indextoname 117 - -117 brctl_main 1183 885 -298 ------------------------------------------------------------------------------ (add/remove: 2/1 grow/shrink: 0/1 up/down: 374/-415) Total: -41 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ipaddress: remove unused variable no_linkBernhard Reutner-Fischer2019-04-071-4/+0
| | | | | | | | | | | | | | ipaddress.c: In function ‘ipaddr_list_or_flush’: ipaddress.c:427:6: warning: variable ‘no_link’ set but not used [-Wunused-but-set-variable] Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
| * telnetd: whitespace fixDenys Vlasenko2019-04-041-1/+1
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * telnetd: better AYT handlingDenys Vlasenko2019-04-041-3/+8
| | | | | | | | | | | | | | function old new delta telnetd_main 1792 1837 +45 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * telnetd: Added support for AYT IAC command.Martin Lewis2019-04-041-1/+8
| | | | | | | | | | | | | | Fixed a TODO in AYT IAC handling by replying back with a NOP. Signed-off-by: Martin Lewis <martin.lewis.x84@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Merge branch 'busybox' into mergeRon Yorston2019-03-313-7/+9
|\|
| * ip: Fix ip -o linkStefan Sørensen2019-03-301-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | Commit db169f253854db572c0c2b7e3d74ebbe6afdb97f breaks the "ip -o link" command, no output is displayed.. Fix by only excluding the link info if in oneline mode and if the address family is not AF_PACKET. function old new delta ipaddr_list_or_flush 1232 1202 -30 Signed-off-by: Stefan Sørensen <stefan.sorensen@spectralink.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ntpd: do not create pid file if not backgroundedDenys Vlasenko2019-03-271-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | function old new delta ntp_init 995 1021 +26 ntpd_main 1267 1257 -10 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 1/1 up/down: 26/-10) Total: 16 bytes Reported by Alfonso Ranieri <alforan@tin.it> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * do not duplicate CONFIG_PID_FILE_PATH and ".pid" stringsDenys Vlasenko2019-03-172-4/+4
| | | | | | | | | | | | | | | | text data bss dec hex filename 981737 485 7296 989518 f194e busybox_old 981704 485 7296 989485 f192d busybox_unstripped Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Merge branch 'busybox' into mergeRon Yorston2019-03-123-10/+21
|\|
| * udhcpc: don't exit after backgrounding on -n -bAndrey Mazo2019-02-272-2/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, running "udhcpc -n -b" causes udhcpc to go to background and then exit after some time unless a lease is obtained. It's not very useful to do so as the calling process doesn't know if the lease was obtained or not anyway. The code actually tries to favor "-b" over "-n", but doesn't clear "-n" flag while clearing "-b" after backgrounding. So, clear "-n" flag after going into background. This effectively makes "-b" override "-n" completely and "-n -b" behave the same as "-b". This allows to override default "-n" option, passed to udhcpc by ifupdown, without recompiling busybox. URL: https://bugs.busybox.net/11691 Signed-off-by: Andrey Mazo <ahippo@yandex.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * udhcpc: tweak --helpDenys Vlasenko2019-02-271-3/+3
| | | | | | | | | | | | | | function old new delta packed_usage 33324 33315 -9 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ntpd: increase SLEW_THRESHOLD from 0.125 to 0.5Denys Vlasenko2019-02-151-5/+4
| | | | | | | | | | | | Linux kernel supports it since ~2006 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | su, wget: use magic '--busybox' flagRon Yorston2019-03-081-1/+2
| | | | | | | | | | | | I've been a bit lax about ensuring the --busybox flag is passed in command lines. It's needed to avoid problems if the binary is called something like sh.exe.
* | Merge branch 'busybox' into mergeRon Yorston2019-02-124-38/+45
|\|
| * ip link: Fix vlan proto, closes 8261 and 11638Bernhard Reutner-Fischer2019-01-221-5/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The proto has to be passed in network byte-order. While at it allow for ip link add link eth0 name eth0.2.24 type vlan proto 802.1ad id 24 ip link del link eth0 name eth0.2.24 type vlan proto 802.1ad id 24 The del was lacking a dev_str and thus errored out. Fix by using name/dev counterpart as fallback. The proto identifier 802.1Q was not recognized, just it's lowercase variant, fix that too. function old new delta do_add_or_delete 1275 1376 +101 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 1/0 up/down: 101/0) Total: 101 bytes Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
| * ip link: fix mismatched enums in vlan_parse_opt(), closes 11631Denys Vlasenko2019-01-221-1/+1
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * wget: detect when the length of received file is less than advertisedDenys Vlasenko2019-01-211-8/+10
| | | | | | | | | | | | | | function old new delta retrieve_file_data 579 596 +17 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>