aboutsummaryrefslogtreecommitdiff
path: root/networking (follow)
Commit message (Collapse)AuthorAgeFilesLines
* tls: fix double free of HMAC contextRon Yorston2026-04-251-4/+1
| | | | | | | | | | | | | | | | | Commit aed19625ff (Post-merge fixes) attempted to handle some upstream code shuffling which broke support for https in wget with FEATURE_USE_CNG_API enabled and CONFIG_FEATURE_TLS_SCHANNEL disabled (i.e. using the upstream internal TLS code). Unfortunately it resulted in the HMAC context being freed twice which caused failures in certain cases. Fix this by not freeing the context in hmac_blocks(), thus making that function match upstream again. Thanks to @avih for identifying the problem. (GitHub issue #582)
* wget: allow HTTPS certificate check to be skippedRon Yorston2026-04-243-2/+34
| | | | | | | | | | | The Microsoft Windows Schannel implementation of TLS validates the server certificate. Enable the --no-check-certificate option to wget to allow these checks to be skipped. This may be useful to connect to badly configured websites. Adds 202 bytes to the x86_64 build with Schannel enabled. (GitHub issue #581)
* Merge branch 'busybox' into mergeRon Yorston2026-03-1123-1495/+5631
|\
| * *: don't use getservbyname, it links in a static bufferDenys Vlasenko2026-02-251-11/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | function old new delta bb_get_servport_by_name - 348 +348 bb_lookup_port 83 111 +28 reread_config_file 886 907 +21 static.se 16 - -16 getservbyname 53 - -53 getservbyname_r 284 - -284 ------------------------------------------------------------------------------ (add/remove: 2/5 grow/shrink: 2/0 up/down: 397/-353) Total: 44 bytes text data bss dec hex filename 1080084 555 5024 1085663 1090df busybox_old 1080144 555 4992 1085691 1090fb busybox_unstripped Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * telnet: fix false positive "Error writing to foreign host"Denys Vlasenko2026-02-241-28/+34
| | | | | | | | | | | | | | function old new delta write_to_net 620 625 +5 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * netstat: fix breakage due to last commitDenys Vlasenko2026-02-241-2/+2
| | | | | | | | | | | | | | | | | | | | function old new delta bb_get_servname_by_port 182 195 +13 ip_port_str 121 120 -1 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 1/1 up/down: 13/-1) Total: 12 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * netstat,pscan: don't use getservbyport(), it links in a static bufferDenys Vlasenko2026-02-242-10/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | function old new delta bb_get_servname_by_port - 182 +182 ip_port_str 112 121 +9 pscan_main 594 591 -3 getservbyport 53 - -53 getservbyport_r 430 - -430 ------------------------------------------------------------------------------ (add/remove: 2/4 grow/shrink: 1/1 up/down: 191/-486) Total: -295 bytes text data bss dec hex filename 1080362 555 5056 1085973 109215 busybox_old 1080067 555 5024 1085646 1090ce busybox_unstripped Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * telnet: fixes after testing against some MUD serversDenys Vlasenko2026-02-241-112/+193
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A few size tests were not tight enough. More importantly, the logic "is this a telnet server?" made more robust. TTYPE seems to be understood by the MUD server I tried, for some reason NAWS is not? function old new delta packed_usage 36040 36078 +38 write_to_net 598 620 +22 telnet_main 455 462 +7 handle_SIGWINCH 15 21 +6 read_from_net 534 539 +5 show_menu 212 203 -9 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 5/1 up/down: 78/-9) Total: 69 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * telnetd: if vfork in make_new_session() fails, do close socket.Denys Vlasenko2026-02-241-22/+26
| | | | | | | | | | | | | | | | | | | | | | function old new delta telnetd_main 372 385 +13 make_new_session 550 552 +2 xgetpty 81 78 -3 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 2/1 up/down: 15/-3) Total: 12 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * telnet: code shrinkDenys Vlasenko2026-02-231-21/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | function old new delta write_to_stdout 105 113 +8 put_iac 28 35 +7 write_to_net 596 598 +2 read_from_stdin 227 229 +2 read_from_net 543 534 -9 telnet_main 476 455 -21 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 4/2 up/down: 19/-30) Total: -11 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * telnet: rewrite to use ioloop()Denys Vlasenko2026-02-232-439/+1388
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now should never block on network I/O. Also, window resizing is dynamic now. function old new delta write_to_net - 596 +596 read_from_net - 543 +543 read_from_stdin - 227 +227 show_menu - 212 +212 write_to_stdout - 105 +105 have_data_to_write_to_net - 72 +72 have_data_to_write_to_stdout - 38 +38 put_iac_byte_escaped - 32 +32 ioloop_run 411 438 +27 have_buffer_to_read_from_stdin - 25 +25 have_buffer_to_read_from_net - 25 +25 .rodata 107125 107141 +16 handle_SIGWINCH - 15 +15 put_iac 36 28 -8 put_iac4_msb_lsb 19 - -19 iac_flush 36 - -36 setConMode 87 - -87 handle_net_output 110 - -110 con_escape 271 - -271 telnet_main 1232 476 -756 ------------------------------------------------------------------------------ (add/remove: 11/5 grow/shrink: 2/2 up/down: 1933/-1287) Total: 646 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * telnetd: do not wait for more input after 10-byte NAWS is receivedDenys Vlasenko2026-02-221-28/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | If the the screen is resized to 255 columns without any subsequent data received, the server won't parse and react to the NAWS (until eventually at least one more byte arrives). function old new delta read_byte_unescaping_IAC 28 31 +3 net_to_pty__have_data_to_write 551 552 +1 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 2/0 up/down: 4/0) Total: 4 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * telnetd: fix handshake: had one wrong, but harmless elementDenys Vlasenko2026-02-222-7/+15
| | | | | | | | | | | | | | function old new delta static.iacs_to_send 12 9 -3 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * telnetd: correct handling of screen sizes with any dimension equal to 255Denys Vlasenko2026-02-221-23/+52
| | | | | | | | | | | | | | | | | | | | | | | | IOW: teach NAWS parser how to IAC-unescape. function old new delta net_to_pty__have_data_to_write 429 551 +122 read_byte_unescaping_IAC - 28 +28 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 1/0 up/down: 150/0) Total: 150 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * telnetd: do close pty when network read returns EOF; try to cause EOF-on-readDenys Vlasenko2026-02-221-36/+66
| | | | | | | | | | | | | | | | | | | | | | | | | | | | function old new delta fabricate_ctrl_D_on_pty - 65 +65 net_to_pty__have_data_to_write 368 429 +61 .rodata 107096 107125 +29 telnetd_main 367 372 +5 net_to_pty__have_buffer_to_read_into 164 162 -2 packed_usage 36066 36040 -26 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 3/2 up/down: 160/-28) Total: 132 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * libbb: add generic "fd polling and I/O" loop, use it in telnetdDenys Vlasenko2026-02-213-558/+2288
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We do it, badly, in many places. Better to use one robust implementation. Can be buggy yet. Initial use is in a rather old, rarely used tech: telnet. The I/O in telnetd should be fully non-blocking now, including pty delays handling. Several bugs in telnetd handling of IACs are fixed. function old new delta ioloop_run - 411 +411 net_to_pty__have_data_to_write - 368 +368 pty_to_net__write - 318 +318 net_to_pty__write - 180 +180 pty_to_net__read - 171 +171 net_to_pty__have_buffer_to_read_into - 164 +164 pty_to_net__have_buffer_to_read_into - 90 +90 net_to_pty__read - 87 +87 pty_to_net__have_data_to_write - 59 +59 make_new_session 491 550 +59 conn_close_fds - 52 +52 accept_conn__accept - 49 +49 conn_close_fds_remove_and_free - 27 +27 ioloop_remove_conn - 22 +22 remove_and_free_to_pty - 19 +19 ioloop_insert_conn - 10 +10 accept_conn__can_accept - 6 +6 accept_conn__return_zero - 3 +3 static.ayt_response - 2 +2 handle_sigchld 59 61 +2 free_session 130 - -130 telnetd_main 1797 367 -1430 ------------------------------------------------------------------------------ (add/remove: 19/1 grow/shrink: 2/1 up/down: 2099/-1560) Total: 539 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * tls: code shrinkDenys Vlasenko2026-02-211-14/+13
| | | | | | | | | | | | | | function old new delta tls_handshake_as_server 2408 2400 -8 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * tls: server: fix incorrect key_block assignments - now works against openssl ↵Denys Vlasenko2026-02-154-80/+229
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | s_client function old new delta privRsaEncryptSignedElement - 236 +236 tls_handshake_as_server 2033 2264 +231 .rodata 108079 108301 +222 initialize_aes_keys - 77 +77 xwrite_encrypted 507 506 -1 tls_handshake 1519 1500 -19 derive_master_secret_and_keys 154 123 -31 ------------------------------------------------------------------------------ (add/remove: 2/0 grow/shrink: 2/3 up/down: 766/-51) Total: 715 bytes Totoal growth compared to code before TLS server code: function old new delta tls_handshake_as_server - 2264 +2264 .rodata 107074 108301 +1227 psRsaCrypt - 577 +577 load_rsa_priv_key - 282 +282 ssl_server_main - 279 +279 privRsaEncryptSignedElement - 236 +236 ssl_client_main 137 363 +226 psRsaDecryptPriv - 171 +171 set_cipher_parameters - 161 +161 derive_master_secret_and_keys - 123 +123 packed_usage 36034 36146 +112 sp_ecc_make_key_256 - 103 +103 send_finished - 94 +94 get_change_cipher_spec - 88 +88 initialize_aes_keys - 77 +77 static.BLOCK_NAMES - 70 +70 curve_P256_compute_premaster - 65 +65 der_binary_to_pstm - 50 +50 curve_x25519_generate_keypair - 44 +44 get_finished - 42 +42 get_outbuf_fill_handshake_record - 37 +37 client_hello_ciphers - 32 +32 curve_P256_generate_keypair - 27 +27 sp_256_from_bin_8 - 26 +26 tls_xread_record 681 704 +23 curve_x25519_compute_premaster - 15 +15 applet_names 2870 2881 +11 applet_main 1652 1656 +4 xwrite_encrypted 507 506 -1 xwrite_and_update_handshake_hash 76 59 -17 sp_256_point_from_bin2x32 70 43 -27 curve_x25519_compute_pubkey_and_premaster 71 39 -32 curve_P256_compute_pubkey_and_premaster 167 65 -102 psRsaEncryptPub 395 199 -196 tls_handshake 2069 1500 -569 ------------------------------------------------------------------------------ (add/remove: 23/0 grow/shrink: 6/7 up/down: 6466/-944) Total: 5522 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * tls: make ECDHE_RSA work against our client (openssl s_client not yet)Denys Vlasenko2026-02-154-67/+320
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | function old new delta tls_handshake_as_server 1601 2033 +432 sp_ecc_make_key_256 - 103 +103 curve_P256_compute_premaster - 65 +65 .rodata 108023 108079 +56 curve_x25519_generate_keypair - 44 +44 tls_get_zeroed_outbuf - 28 +28 curve_P256_generate_keypair - 27 +27 sp_256_from_bin_8 - 26 +26 curve_x25519_compute_premaster - 15 +15 tls_xread_record 708 704 -4 tls_handshake 1530 1519 -11 get_outbuf_fill_handshake_record 51 37 -14 sp_256_point_from_bin2x32 70 43 -27 curve_x25519_compute_pubkey_and_premaster 71 39 -32 curve_P256_compute_pubkey_and_premaster 167 65 -102 ------------------------------------------------------------------------------ (add/remove: 7/0 grow/shrink: 2/6 up/down: 796/-190) Total: 606 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * tls: remove unnecessary malloc/free in psRsaDecryptPriv()Denys Vlasenko2026-02-151-22/+10
| | | | | | | | | | | | | | | | | | | | function old new delta .rodata 108007 108023 +16 psRsaDecryptPriv 200 171 -29 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 1/1 up/down: 16/-29) Total: -13 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * tls: fix cipher-id selection in server modeDenys Vlasenko2026-02-152-219/+429
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ECDSA keys still don't work, and currently will be ignored function old new delta tls_handshake_as_server 824 1601 +777 .rodata 107764 108007 +243 set_cipher_parameters - 161 +161 packed_usage 36072 36146 +74 static.BLOCK_NAMES - 70 +70 client_hello_ciphers - 32 +32 ssl_server_main 288 279 -9 load_rsa_priv_key 329 282 -47 tls_handshake 1676 1530 -146 ------------------------------------------------------------------------------ (add/remove: 3/0 grow/shrink: 3/3 up/down: 1357/-202) Total: 1155 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * tls: eliminate unnecessary ENCRYPT_ON_WRITE, merge tls_get_zeroed_outbuf() ↵Denys Vlasenko2026-02-151-37/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | with fill_handshake_record_hdr() function old new delta get_outbuf_fill_handshake_record - 51 +51 send_finished 95 94 -1 tls_handshake 1690 1676 -14 xwrite_and_update_handshake_hash 76 59 -17 tls_handshake_as_server 852 824 -28 tls_get_zeroed_outbuf 28 - -28 ------------------------------------------------------------------------------ (add/remove: 1/1 grow/shrink: 0/4 up/down: 51/-88) Total: -37 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * tls: fix up debug printouts wrt newlinesDenys Vlasenko2026-02-151-88/+90
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * tls: implement server codeDenys Vlasenko2026-02-154-126/+654
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | function old new delta tls_handshake_as_server 7 852 +845 .rodata 107103 107764 +661 psRsaCrypt - 577 +577 load_rsa_priv_key - 329 +329 psRsaDecryptPriv - 200 +200 derive_master_secret_and_keys - 154 +154 send_finished - 95 +95 get_change_cipher_spec - 88 +88 der_binary_to_pstm - 50 +50 get_finished - 42 +42 tls_xread_record 681 708 +27 ssl_server_main 285 288 +3 psRsaEncryptPub 395 199 -196 tls_handshake 2069 1690 -379 ------------------------------------------------------------------------------ (add/remove: 8/0 grow/shrink: 4/2 up/down: 3071/-575) Total: 2496 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ssl_server: new applet, not functional yetDenys Vlasenko2026-02-153-16/+182
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | function old new delta ssl_server_main - 285 +285 ssl_client_main 137 363 +226 packed_usage 36034 36072 +38 .rodata 107074 107103 +29 applet_names 2870 2881 +11 tls_handshake_as_server - 7 +7 applet_main 1652 1656 +4 ------------------------------------------------------------------------------ (add/remove: 3/0 grow/shrink: 5/0 up/down: 600/0) Total: 600 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * *: placate warnings where strchr/strstr returns constant pointerDenys Vlasenko2026-02-157-24/+26
| | | | | | | | | | | | | | | | | | Newer glibc is now smarter and can propagate const-ness from those! function old new delta readtoken1 3111 3108 -3 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Merge branch 'busybox' into mergeRon Yorston2026-02-126-26/+23
|\|
| * tls: document PSTM_64BIT + PSTM_X86_64 optimizations betterDenys Vlasenko2026-02-082-11/+11
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * *: use is_prefixed_with() where appropriateDenys Vlasenko2026-02-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | function old new delta resume_main 560 556 -4 uuidcache_check_device 107 101 -6 ntp_init 1005 997 -8 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 0/3 up/down: 0/-18) Total: -18 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * *: use xasprintf_inplace() and concat_path_file() where appropriateDenys Vlasenko2026-02-061-7/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | function old new delta acpid_main 1059 1063 +4 resume_main 561 560 -1 unpack_package 642 640 -2 adduser_main 861 859 -2 getty_main 1517 1512 -5 ftpd_main 2149 2142 -7 .rodata 107018 107010 -8 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 1/6 up/down: 4/-25) Total: -21 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * libbb: introduce and use xasprintf_inplace()Denys Vlasenko2026-02-052-7/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | function old new delta xasprintf_and_free - 49 +49 watch_main 269 282 +13 singlemount 1313 1315 +2 append_mount_options 157 149 -8 ip_port_str 122 112 -10 lsblk_main 869 858 -11 add_cmd 1178 1167 -11 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 2/4 up/down: 64/-40) Total: 24 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Merge branch 'busybox' into mergeRon Yorston2026-02-103-92/+89
|\|
| * tar: strip unsafe hardlink components - GNU tar does the sameDenys Vlasenko2026-01-291-4/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Defends against files like these (python reproducer): import tarfile ti = tarfile.TarInfo("leak_hosts") ti.type = tarfile.LNKTYPE ti.linkname = "/etc/hosts" # or "../etc/hosts" or ".." ti.size = 0 with tarfile.open("/tmp/hardlink.tar", "w") as t: t.addfile(ti) function old new delta skip_unsafe_prefix - 127 +127 get_header_tar 1752 1754 +2 .rodata 106861 106856 -5 unzip_main 2715 2706 -9 strip_unsafe_prefix 102 18 -84 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 1/3 up/down: 129/-98) Total: 31 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * httpd: do not use a global variable in index.cgiDenys Vlasenko2026-01-291-74/+53
| | | | | | | | | | | | | | | | text data bss dec hex filename 3255 0 0 3255 cb7 httpd_indexcgi.o 3253 0 4 3257 cb9 httpd_indexcgi.o.old Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * httpd: handle bare "Location: URL" redirects from CGIsDenys Vlasenko2026-01-281-14/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Many sites on the Web give those as valid CGI examples - no "Status:", just "Location:". function old new delta cgi_io_loop_and_exit 620 684 +64 log_cgi_status - 49 +49 .rodata 106846 106861 +15 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 2/0 up/down: 128/0) Total: 128 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Merge branch 'busybox' into mergeRon Yorston2026-02-044-156/+240
|\|
| * httpd: optimize example CGIsDenys Vlasenko2026-01-262-37/+25
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * networking/httpd_indexcgi.c: non-mallocing versionDenys Vlasenko2026-01-262-108/+200
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * httpd: add a TODO, no code changesDenys Vlasenko2026-01-251-0/+3
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * httpd: allow static files in /cgi-bin/, do not search for interpreter twiceDenys Vlasenko2026-01-241-24/+25
| | | | | | | | | | | | | | | | | | | | function old new delta handle_incoming_and_exit 2270 2334 +64 send_cgi_and_exit 790 754 -36 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 1/1 up/down: 64/-36) Total: 28 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Merge branch 'busybox' into mergeRon Yorston2026-02-023-221/+739
|\|
| * httpd: code shrinkDenys Vlasenko2026-01-241-18/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | function old new delta send_file_and_exit 931 933 +2 get_line 126 120 -6 httpd_main 968 959 -9 send_headers 708 694 -14 handle_incoming_and_exit 2285 2270 -15 cgi_io_loop_and_exit 635 620 -15 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 1/5 up/down: 2/-59) Total: -57 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * httpd: code shrink via "split-globals" trickDenys Vlasenko2026-01-241-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | function old new delta httpd_main 957 968 +11 log_and_exit 25 26 +1 send_headers 712 708 -4 handle_incoming_and_exit 2292 2285 -7 sigalrm_handler 102 93 -9 parse_conf 1332 1323 -9 send_cgi_and_exit 803 790 -13 cgi_io_loop_and_exit 656 635 -21 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 2/6 up/down: 12/-63) Total: -51 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * httpd: implement POSTDATA read timeout, and -K KILLSECS CGI lifetime controlDenys Vlasenko2026-01-241-59/+110
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | function old new delta cgi_io_loop_and_exit 496 656 +160 sigalrm_handler 1 102 +101 .rodata 106814 106853 +39 send_cgi_and_exit 770 803 +33 packed_usage 35894 35924 +30 httpd_main 950 957 +7 handle_incoming_and_exit 2297 2292 -5 send_REQUEST_TIMEOUT_and_exit 10 - -10 ------------------------------------------------------------------------------ (add/remove: 0/1 grow/shrink: 6/1 up/down: 370/-15) Total: 355 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * httpd: fix incorrect == comparison in last commit, must be !=Denys Vlasenko2026-01-231-1/+3
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * httpd: smarter handling of CGI's "Status: " headerDenys Vlasenko2026-01-231-10/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | Do one less write() function old new delta handle_incoming_and_exit 2290 2297 +7 cgi_io_loop_and_exit 498 500 +2 .rodata 106821 106814 -7 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 2/1 up/down: 9/-7) Total: 2 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * httpd: simplify CGI headers handling, check "HTTP/1.1" prefix, not just "HTTP"Denys Vlasenko2026-01-231-28/+30
| | | | | | | | | | | | | | | | | | | | function old new delta cgi_io_loop_and_exit 477 498 +21 .rodata 106830 106821 -9 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 1/1 up/down: 21/-9) Total: 12 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * httpd: simplify CGI code a bit, add a bunch of TODOs and FIXMEsDenys Vlasenko2026-01-232-29/+37
| | | | | | | | | | | | | | | | | | | | | | | | function old new delta log_and_exit 33 25 -8 handle_incoming_and_exit 2298 2290 -8 send_cgi_and_exit 784 770 -14 cgi_io_loop_and_exit 538 477 -61 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 0/4 up/down: 0/-91) Total: -91 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * httpd: do not force clean connection termination on write errors and timeoutsDenys Vlasenko2026-01-221-24/+45
| | | | | | | | | | | | | | | | | | | | | | | | function old new delta send_file_and_exit 891 931 +40 send_EOF_and_exit - 14 +14 cgi_io_loop_and_exit 535 538 +3 log_and_exit 44 33 -11 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 2/1 up/down: 57/-11) Total: 46 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * httpd: make timeout messages less confusingDenys Vlasenko2026-01-221-6/+10
| | | | | | | | | | | | | | function old new delta send_file_and_exit 891 930 +39 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>