net::/ipv4:: namespace, mac/addr filter framework with default filters, dlog on registry overflow
This commit is contained in:
@@ -24,7 +24,7 @@ void handle(std::span<const uint8_t> frame, span_writer& tx) {
|
||||
if (!icmp_pkt) return;
|
||||
if (icmp_pkt->type != 8) return;
|
||||
|
||||
const auto& ns = net_get_state();
|
||||
const auto& ns = net::get_state();
|
||||
prepend_buffer<4096> buf;
|
||||
memcpy(buf.append(icmp_len), pb.remaining().data() - sizeof(echo), icmp_len);
|
||||
|
||||
@@ -34,7 +34,7 @@ void handle(std::span<const uint8_t> frame, span_writer& tx) {
|
||||
reply->checksum = ipv4::checksum(reply, icmp_len);
|
||||
|
||||
ipv4::prepend(buf, eth_hdr->src, ns.mac, ns.ip, ip->src, 1, icmp_len);
|
||||
net_send_raw(buf.span());
|
||||
net::send_raw(buf.span());
|
||||
}
|
||||
|
||||
__attribute__((constructor))
|
||||
|
||||
Reference in New Issue
Block a user