feat: add NTP; fix networking bugs/regressions
This commit is contained in:
1 parent
a288dee7df
commit
d99dab45e5
26 files changed
+809
-47
No files matched your search
@@ -12,6 +12,7 @@
|
||||
#include <Timekeeping/ApicTimer.hpp>
|
||||
#include <Net/Icmp.hpp>
|
||||
#include <Net/Dns.hpp>
|
||||
#include <Net/Ipv4.hpp>
|
||||
#include <Net/Socket.hpp>
|
||||
#include <Net/NetConfig.hpp>
|
||||
#include <Drivers/Net/E1000.hpp>
|
||||
@@ -82,6 +83,10 @@ namespace montauk::abi {
|
||||
|
||||
static int Sys_RecvFrom(int fd, uint8_t* buf, uint32_t maxLen,
|
||||
uint32_t* srcIp, uint16_t* srcPort) {
|
||||
// A preceding UDP send may be queued while ARP resolves the next hop.
|
||||
// Drive the pending IPv4 queue on each non-blocking receive so a lost
|
||||
// initial ARP request is retried without unrelated network traffic.
|
||||
Net::Ipv4::FlushPending();
|
||||
return Net::Socket::RecvFrom(fd, buf, maxLen, srcIp, srcPort, Sched::GetCurrentPid());
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user