Skip to content
This repository has been archived by the owner on Jul 11, 2023. It is now read-only.

DNS grain doesn't work #302

Open
lberezy opened this issue Feb 15, 2021 · 0 comments
Open

DNS grain doesn't work #302

lberezy opened this issue Feb 15, 2021 · 0 comments

Comments

@lberezy
Copy link

lberezy commented Feb 15, 2021

I think this is related to foniod/redbpf#102

I can get it to "work" by replacing the header test with the following.

if transport.source() != 53 {
        return Ok(XdpAction::Pass);
    }

Explicitly testing the length of the header before access is not enough it seems.
This doesn't work.

    let header = data.slice(12)?;
    if header.len() == 12 {
        if header[2] >> 3 & 0xF != 0u8 {
            return Ok(XdpAction::Pass);
        }
    }
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant