busybox/networking
Michal Kazior b817699e6c udhcp: bind to device even for ucast packets
There are cases where binding to source IP and
destination IP is insufficient to guarantee sane
xmit netdev.

One case where this can fail is when
route-matching netdev carrier is down (cable
unplugged, wifi disconnected), or the netdev is
admin down. Then all the IP based bindings (bind()
+ connect()) will seemingly succeed but the actual
packet can go out through a default gw path.

Depending on the network this happens on
it can create issues or false alarms. It can
also leak some subnet info across networks that
shouldn't be routed.

As such better be safe than sorry and bind to a
netdev to be sure it's used for xmit.

function                                             old     new   delta
udhcp_send_kernel_packet                             293     336     +43
send_packet                                          182     188      +6
bcast_or_ucast                                        37      43      +6
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 3/0 up/down: 55/0)               Total: 55 bytes

Signed-off-by: Michal Kazior <michal@plume.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2020-12-15 21:44:21 +01:00
..
libiproute decrease paddign: gcc-9.3.1 slaps 32-byte alignment on arrays willy-nilly 2020-11-30 13:03:03 +01:00
ssl_helper
ssl_helper-wolfssl Update information on building httpd and wget helpers 2016-12-22 15:13:37 +01:00
udhcp udhcp: bind to device even for ucast packets 2020-12-15 21:44:21 +01:00
arp.c build system: drop PLATFORM_LINUX 2020-08-13 17:12:56 +02:00
arping.c build system: drop PLATFORM_LINUX 2020-08-13 17:12:56 +02:00
brctl.c build system: drop PLATFORM_LINUX 2020-08-13 17:12:56 +02:00
Config.src tls: introduce FEATURE_TLS_SHA1 to make SHA1 code optional 2018-12-10 16:14:58 +01:00
dnsd.c libbb: reduce the overhead of single parameter bb_error_msg() calls 2019-07-02 11:35:03 +02:00
ether-wake.c build system: drop PLATFORM_LINUX 2020-08-13 17:12:56 +02:00
ftpd.c ftpd: allow -A if !FTPD_AUTHENTICATION as well 2018-04-07 14:18:42 +02:00
ftpgetput.c libbb: reduce the overhead of single parameter bb_error_msg() calls 2019-07-02 11:35:03 +02:00
hostname.c more --help text tweaks 2020-12-13 19:18:28 +01:00
httpd_helpers.sh Update information on building httpd and wget helpers 2016-12-22 15:13:37 +01:00
httpd_indexcgi.c httpd_indexcgi.c: use CSS for odd/even rows 2020-07-31 18:14:54 +02:00
httpd_post_upload.cgi Make POST upload example script easier to use 2016-12-22 15:33:11 +01:00
httpd_ssi.c
httpd.c libbb: change decode_base32/64 API to return the end of _dst_, not _src_. 2020-11-28 13:27:36 +01:00
ifconfig.c help text tweaks 2020-12-13 19:04:19 +01:00
ifenslave.c build system: drop PLATFORM_LINUX 2020-08-13 17:12:56 +02:00
ifplugd.c decrease paddign: gcc-9.3.1 slaps 32-byte alignment on arrays willy-nilly 2020-11-30 13:03:03 +01:00
ifupdown.c libbb: make msleep() result in only one syscall instead of looping 2020-12-11 16:48:47 +01:00
inetd.c decrease padding: gcc-9.3.1 slaps 32-byte alignment on arrays willy-nilly 2020-11-30 14:58:02 +01:00
interface.c decrease paddign: gcc-9.3.1 slaps 32-byte alignment on arrays willy-nilly 2020-11-30 13:03:03 +01:00
ip.c decrease paddign: gcc-9.3.1 slaps 32-byte alignment on arrays willy-nilly 2020-11-30 13:03:03 +01:00
ipcalc.c help text: replace [OPTIONS] with actual options (if not too long) 2020-12-13 22:34:05 +01:00
isrv_identd.c config: update size information 2018-12-28 03:20:17 +01:00
isrv.c libbb: reduce the overhead of single parameter bb_error_msg() calls 2019-07-02 11:35:03 +02:00
isrv.h
Kbuild.src Convert all networking/* applets to "new style" applet definitions 2016-11-23 09:05:14 +01:00
nameif.c build system: drop PLATFORM_LINUX 2020-08-13 17:12:56 +02:00
nbd-client.c libbb: introduce and use sleep1() 2020-11-29 11:37:34 +01:00
nc_bloaty.c libbb: introduce and use sleep1() 2020-11-29 11:37:34 +01:00
nc.c libbb: reduce the overhead of single parameter bb_error_msg() calls 2019-07-02 11:35:03 +02:00
netstat.c decrease padding: gcc-9.3.1 slaps 32-byte alignment on arrays willy-nilly 2020-11-30 14:58:02 +01:00
nslookup.c decrease padding: gcc-9.3.1 slaps 32-byte alignment on arrays willy-nilly 2020-11-30 14:58:02 +01:00
ntpd.c ntpd: fix the case where two replies received at once and first one causes a step 2020-09-29 14:19:17 +02:00
ntpd.diff
parse_pasv_epsv.c networking: support ftp PASV responses not ending with ')' 2020-07-19 20:59:35 +02:00
ping.c traceroute: even with -v, don't show other ping processes reply's 2020-12-13 15:53:06 +01:00
pscan.c libbb: bb_do_delay(3) -> pause_after_failed_login(), and stop looping there 2020-11-29 11:32:48 +01:00
route.c decrease paddign: gcc-9.3.1 slaps 32-byte alignment on arrays willy-nilly 2020-11-30 13:03:03 +01:00
slattach.c libbb: introduce and use sleep1() 2020-11-29 11:37:34 +01:00
ssl_client.c config: update size information 2018-12-28 03:20:17 +01:00
tc.c tc: array address is never NULL 2019-10-25 13:41:31 +02:00
tcpudp_perhost.c tcpudp: shrink per-host rate-limiting code 2018-02-27 13:03:44 +01:00
tcpudp_perhost.h tcpudp: shrink per-host rate-limiting code 2018-02-27 13:03:44 +01:00
tcpudp.c libbb: reduce the overhead of single parameter bb_error_msg() calls 2019-07-02 11:35:03 +02:00
telnet.c libbb: introduce and use sleep1() 2020-11-29 11:37:34 +01:00
telnetd.c libbb: reduce the overhead of single parameter bb_error_msg() calls 2019-07-02 11:35:03 +02:00
telnetd.ctrlSQ.patch *: slap on a few ALIGN1/2s where appropriate 2016-04-22 18:09:21 +02:00
telnetd.IAC_test.sh telnetd: fix corner case of input processing of 0xff bytes 2016-10-12 19:13:46 +02:00
tftp.c tftp: on download, open local file only when first bit of data arrived 2020-02-13 15:27:23 +01:00
tls_aes.c tls: code shrink in AES code 2020-12-15 18:47:25 +01:00
tls_aes.h tls: in AES-CBC code, do not set key for every record - do it once 2018-11-23 18:02:44 +01:00
tls_aesgcm.c suppress a few "unused function" warnings 2019-10-25 13:05:15 +02:00
tls_aesgcm.h tls: in AES-GCM decoding, avoid memmove 2018-11-24 13:51:46 +01:00
tls_fe.c tls: code shrink 2019-01-10 20:18:02 +01:00
tls_fe.h tls: add support for TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 cipher 2018-11-23 17:48:07 +01:00
tls_pstm_montgomery_reduce.c networking: cc is not a register 2019-05-17 22:56:47 +02:00
tls_pstm_mul_comba.c networking: cc is not a register 2019-05-17 22:56:47 +02:00
tls_pstm_sqr_comba.c networking: cc is not a register 2019-05-17 22:56:47 +02:00
tls_pstm.c tls: pstm code shrink 2019-01-01 15:40:43 +01:00
tls_pstm.h tls: pstm code shrink 2019-01-01 15:40:43 +01:00
tls_rsa.c tls: pstm code shrink 2019-01-01 15:40:43 +01:00
tls_rsa.h tls: do not leak RSA key 2018-11-25 16:17:26 +01:00
tls_symmetric.h tls: set TLS_DEBUG to 0; placate a gcc indentation warning 2017-01-23 01:15:13 +01:00
tls.c decrease paddign: gcc-9.3.1 slaps 32-byte alignment on arrays willy-nilly 2020-11-30 13:03:03 +01:00
tls.h libbb: reduce the overhead of single parameter bb_error_msg() calls 2019-07-02 11:35:03 +02:00
traceroute.c traceroute: code shrink 2020-12-13 15:58:47 +01:00
tunctl.c build system: drop PLATFORM_LINUX 2020-08-13 17:12:56 +02:00
vconfig.c build system: drop PLATFORM_LINUX 2020-08-13 17:12:56 +02:00
wget.c wget: do not ftruncate if -O- is used, closes 13351 2020-12-08 19:06:28 +01:00
whois.c whois: limit total length of response to 32+2 kb 2019-12-03 14:52:17 +01:00
zcip.c build system: drop PLATFORM_LINUX 2020-08-13 17:12:56 +02:00