Cannot get the correct IP version from packet

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Help me please,

In the queue callback (const struct nlmsghdr *nlh, void *data), I do:

    struct nlattr *attr[NFQA_MAX+1] = {};
    if (nfq_nlmsg_parse(nlh, attr) < 0)
        return MNL_CB_ERROR;

    char *payload = mnl_attr_get_payload(attr[NFQA_PAYLOAD]);
    if (payload)
    {
        int const af = (payload[0] & 0xf);

And here I get af == 5.  It should be 4 or 6.

That's using libmnl0:amd64 1.0.4-3.  What's happening?


TIA for any hint
Best
Ale








[Index of Archives]     [Linux Netfilter Development]     [Linux Kernel Networking Development]     [Netem]     [Berkeley Packet Filter]     [Linux Kernel Development]     [Advanced Routing & Traffice Control]     [Bugtraq]

  Powered by Linux