mirror of
https://github.com/outbackdingo/firezone.git
synced 2026-01-27 10:18:54 +00:00
chore(eBPF): change error log-levels (#8805)
Neither of the moved error cases should happen very often so it is fine to log them on debug. - `Error::NotTurn` only happens if we receive a UDP packet that isn't STUN traffic (port 3478) or not in the allocation-port range. I am suspecting there to be a bug that I am aiming to fix in #8804. - `Error::NotAChannelDataMessage` will happen for all STUN control traffic, like channel bindings, allocation requests, etc. Those only happen occasionally so won't spam too much. - `Ipv4PacketWithOptions` should basically not happen at all because - as far as I know - IPv4 options aren't used a lot. In any case, when debugging, it is useful to see when we do hit these cases to know, why a packet was offloaded to user space.
This commit is contained in:
@@ -69,13 +69,12 @@ static UDP_TO_CHAN_64: HashMap<PortAndPeerV6, ClientAndChannelV4> =
|
||||
#[xdp]
|
||||
pub fn handle_turn(ctx: XdpContext) -> u32 {
|
||||
try_handle_turn(&ctx).unwrap_or_else(|e| match e {
|
||||
Error::NotUdp
|
||||
| Error::NotTurn
|
||||
| Error::NotIp
|
||||
| Error::NotAChannelDataMessage
|
||||
| Error::Ipv4PacketWithOptions => xdp_action::XDP_PASS,
|
||||
Error::NotIp | Error::NotUdp => xdp_action::XDP_PASS,
|
||||
|
||||
Error::PacketTooShort
|
||||
| Error::NotTurn
|
||||
| Error::NotAChannelDataMessage
|
||||
| Error::Ipv4PacketWithOptions
|
||||
| Error::NoMacAddress
|
||||
| Error::UnsupportedChannel(_)
|
||||
| Error::NoEntry(_) => {
|
||||
|
||||
Reference in New Issue
Block a user