aquasecurity/btfhub

can not support centos 7 x86_64 linux kernel 5.x version. except 5.4

tanruixing88 opened this issue · 2 comments

I has many machines that are linux kernel 5.x 。 But I find the project(https://github.com/aquasecurity/btfhub-archive) only having centos 7 5.4。so may be incompatible, my program run error.

int tc_ingress(struct __sk_buff *skb)
{
__u32 len = skb->len;
void *data_end = (void *)(__u64)skb->data_end;
void *data = (void *)(__u64)skb->data;
__u32 tc_classid = skb->tc_classid;

char* l2_data_start = data;
char* l2_data_end   = data_end;
unsigned long long int l2_pkt_len = (unsigned long long int)(l2_data_end - l2_data_start);


// if print len, it error, can not running.
// if  print skb->protocol it success
// if print  l2_pkt_len  it success
// if print tc_classid  but the value of tc_classid is 0。it should not 0.

}

Sorry, could you clarify what kernel version you're using, from which distribution ?

I'm closing this as there was no response.