diff options
author | Marvin Borner | 2020-11-09 22:18:55 +0100 |
---|---|---|
committer | Marvin Borner | 2020-11-09 22:18:55 +0100 |
commit | b20fdcfe67ea56c47bfe1e059b504fae73bc52b3 (patch) | |
tree | 89ddaad40a3fcd601f2bdbd7cee0e71f66944fd7 /kernel/features | |
parent | 49da2ac6b70a107c22c784b48e4ae332128f684c (diff) |
Removed non-net support and fixed some bugs
Diffstat (limited to 'kernel/features')
-rw-r--r-- | kernel/features/net.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/kernel/features/net.c b/kernel/features/net.c index 19b76bc..3c1d620 100644 --- a/kernel/features/net.c +++ b/kernel/features/net.c @@ -424,7 +424,6 @@ void tcp_handle_packet(struct tcp_packet *packet, u32 dst, int len) /* tcp->ack_no += strlen(http_req); */ - print("Setting to 5!\n"); tcp->state = 5; // TODO: TCP enum state machine return; } else if (tcp->state == 5 && (flags & 0xff) == TCP_FLAG_ACK) { @@ -653,11 +652,13 @@ void net_send(struct socket *socket, void *data, u32 len) void net_install(void) { - if (rtl8139_install()) { - sti(); - arp_lookup_add(broadcast_mac, 0xffffffff); - dhcp_discover(); - } + if (!rtl8139_install()) + return; + + sti(); + + arp_lookup_add(broadcast_mac, 0xffffffff); + dhcp_discover(); tcp_sockets = list_new(); udp_sockets = list_new(); |