summaryrefslogtreecommitdiff
path: root/netio.c
diff options
context:
space:
mode:
authorMatt Johnston <matt@ucc.asn.au>2017-06-24 00:47:07 +0800
committerMatt Johnston <matt@ucc.asn.au>2017-06-24 00:47:07 +0800
commit9fca3b1ce3cc65e724d6ede788c138a1ce5eec27 (patch)
tree116570e45aa263ef04a73e8a03c1a8f3c438e059 /netio.c
parent1b9625af1a6ad769e684f4fca0d103102c549a91 (diff)
parenta0e5f7ca2ac16f5f603f02a6d26440f20753c348 (diff)
downloaddropbear-9fca3b1ce3cc65e724d6ede788c138a1ce5eec27.tar.gz
merge from main
Diffstat (limited to 'netio.c')
-rw-r--r--netio.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/netio.c b/netio.c
index 89a0843..7f7e54f 100644
--- a/netio.c
+++ b/netio.c
@@ -195,6 +195,7 @@ void set_connect_fds(fd_set *writefd) {
}
iter = next_iter;
}
+ TRACE(("leave set_connect_fds"))
}
void handle_connect_fds(fd_set *writefd) {
@@ -310,6 +311,12 @@ void set_sock_priority(int sock, enum dropbear_prio prio) {
int so_prio_val = 0;
#endif
+#ifdef DROPBEAR_FUZZ
+ if (fuzz.fuzzing) {
+ TRACE(("fuzzing skips set_sock_prio"))
+ return;
+ }
+#endif
/* Don't log ENOTSOCK errors so that this can harmlessly be called
* on a client '-J' proxy pipe */
@@ -481,6 +488,13 @@ void get_socket_address(int fd, char **local_host, char **local_port,
{
struct sockaddr_storage addr;
socklen_t addrlen;
+
+#if DROPBEAR_FUZZ
+ if (fuzz.fuzzing) {
+ fuzz_get_socket_address(fd, local_host, local_port, remote_host, remote_port, host_lookup);
+ return;
+ }
+#endif
if (local_host || local_port) {
addrlen = sizeof(addr);