Name update
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
//! pass, or the HTTP URL of the boot script once iPXE has chained.
|
||||
|
||||
use dhcproto::v4::{DhcpOption, Message, MessageType, Opcode, OptionCode};
|
||||
use pxeforge_core::{ClientArch, FirmwareClass};
|
||||
use openpxe_core::{ClientArch, FirmwareClass};
|
||||
use std::net::Ipv4Addr;
|
||||
|
||||
/// Where the reply directs the client next.
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
use crate::reply::{build_reply, decide, BootDirective, ReplyContext};
|
||||
use dhcproto::v4::{DhcpOption, Message, OptionCode};
|
||||
use dhcproto::{Decodable, Decoder, Encodable, Encoder};
|
||||
use pxeforge_core::{
|
||||
use openpxe_core::{
|
||||
ClientArch, ClientEvent, ClientRegistry, FirmwareClass,
|
||||
};
|
||||
use socket2::{Domain, Protocol, Socket, Type};
|
||||
@@ -19,7 +19,7 @@ pub struct DhcpProxyServer {
|
||||
our_ip: Ipv4Addr,
|
||||
public_base_url: String,
|
||||
clients: Arc<ClientRegistry>,
|
||||
metrics: pxeforge_core::Metrics,
|
||||
metrics: openpxe_core::Metrics,
|
||||
}
|
||||
|
||||
impl DhcpProxyServer {
|
||||
@@ -30,7 +30,7 @@ impl DhcpProxyServer {
|
||||
our_ip: Ipv4Addr,
|
||||
public_base_url: String,
|
||||
clients: Arc<ClientRegistry>,
|
||||
metrics: pxeforge_core::Metrics,
|
||||
metrics: openpxe_core::Metrics,
|
||||
) -> Self {
|
||||
Self {
|
||||
bind,
|
||||
@@ -47,7 +47,7 @@ impl DhcpProxyServer {
|
||||
let dhcp_sock = bind_udp(self.bind, self.dhcp_port, true)?;
|
||||
let pxe_sock = bind_udp(self.bind, self.pxe_port, false)?;
|
||||
tracing::info!(
|
||||
target: "pxeforge::dhcp",
|
||||
target: "openpxe::dhcp",
|
||||
"DHCP proxy listening on {}:{} and :{}",
|
||||
self.bind, self.dhcp_port, self.pxe_port
|
||||
);
|
||||
@@ -67,12 +67,12 @@ impl DhcpProxyServer {
|
||||
let (n, from) = match sock.recv_from(&mut buf).await {
|
||||
Ok(v) => v,
|
||||
Err(e) => {
|
||||
tracing::warn!(target: "pxeforge::dhcp", port=label, "recv error: {e}");
|
||||
tracing::warn!(target: "openpxe::dhcp", port=label, "recv error: {e}");
|
||||
continue;
|
||||
}
|
||||
};
|
||||
if let Err(e) = self.handle_datagram(&sock, &buf[..n], from, label).await {
|
||||
tracing::warn!(target: "pxeforge::dhcp", port=label, "handle error: {e}");
|
||||
tracing::warn!(target: "openpxe::dhcp", port=label, "handle error: {e}");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -128,7 +128,7 @@ impl DhcpProxyServer {
|
||||
if matches!(directive, BootDirective::Ignore) {
|
||||
self.metrics.record_dhcp_decline();
|
||||
tracing::debug!(
|
||||
target: "pxeforge::dhcp",
|
||||
target: "openpxe::dhcp",
|
||||
mac=%mac, arch=?arch, "ignoring — no bootfile for arch"
|
||||
);
|
||||
return Ok(());
|
||||
@@ -142,7 +142,7 @@ impl DhcpProxyServer {
|
||||
let dest = reply_destination(&request, from);
|
||||
sock.send_to(&out, dest).await?;
|
||||
tracing::info!(
|
||||
target: "pxeforge::dhcp",
|
||||
target: "openpxe::dhcp",
|
||||
mac=%mac, arch=arch.as_str(), class=?class, dest=%dest, directive=?directive,
|
||||
"PXE reply sent"
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user