Skip to content

Commit ac1a6fc

Browse files
authored
Merge pull request #18 from danielinux/tcp-congestion-control-fixes
TCP congestion control fixes
2 parents da977a5 + f3816bf commit ac1a6fc

5 files changed

Lines changed: 2080 additions & 383 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ A single network interface can be associated with the device.
3030
| **Transport** | UDP | Unicast datagrams, checksum | [RFC 768](https://datatracker.ietf.org/doc/html/rfc768) |
3131
| **Transport** | TCP | Connection management, reliable delivery | [RFC 793](https://datatracker.ietf.org/doc/html/rfc793), [RFC 9293](https://datatracker.ietf.org/doc/html/rfc9293) |
3232
| **Transport** | TCP Options: MSS | Maximum Segment Size negotiation | [RFC 793](https://datatracker.ietf.org/doc/html/rfc793) |
33-
| **Transport** | TCP Options: Timestamps | RTT measurement, PAWS | [RFC 7323](https://datatracker.ietf.org/doc/html/rfc7323) |
33+
| **Transport** | TCP Options: Timestamps | RTT measurement, PAWS, Window Scaling | [RFC 7323](https://datatracker.ietf.org/doc/html/rfc7323) |
3434
| **Transport** | TCP Congestion Control | Slow start, congestion avoidance | [RFC 5681](https://datatracker.ietf.org/doc/html/rfc5681) |
3535
| **Transport** | TCP Fast Retransmit | Triple duplicate ACK detection | [RFC 5681](https://datatracker.ietf.org/doc/html/rfc5681) |
3636
| **Application** | DHCP | Client only (DORA) | [RFC 2131](https://datatracker.ietf.org/doc/html/rfc2131) |

src/port/posix/bsd_socket.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1431,7 +1431,7 @@ void __attribute__((constructor)) init_wolfip_posix() {
14311431
wolfIP_ipconfig_set(IPSTACK, atoip4(WOLFIP_IP), atoip4("255.255.255.0"),
14321432
atoip4(HOST_STACK_IP));
14331433
printf("IP: manually configured - %s\n", WOLFIP_IP);
1434-
sleep(1);
1434+
sleep(2);
14351435
pthread_create(&wolfIP_thread, NULL, wolfIP_sock_posix_ip_loop, IPSTACK);
14361436
in_the_stack = 0;
14371437
}

src/port/posix/tap_linux.c

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,9 +101,14 @@ int tap_init(struct wolfIP_ll_dev *ll, const char *ifname, uint32_t host_ip)
101101
tap_fd = -1;
102102
}
103103
}
104-
if (tap_fd < 0) {
105-
return -1;
106-
}
104+
if (tap_fd < 0) {
105+
return -1;
106+
}
107+
{
108+
int flags = fcntl(tap_fd, F_GETFL, 0);
109+
if (flags >= 0)
110+
(void)fcntl(tap_fd, F_SETFL, flags | O_NONBLOCK);
111+
}
107112
}
108113
/* Get mac address */
109114
if (ioctl(tap_fd, SIOCGIFHWADDR, &ifr) < 0) {

0 commit comments

Comments
 (0)