> 在 2024年3月17日,02:51,Alessandro Vesely <vesely@xxxxxxx> 写道: > > On Sat 16/Mar/2024 19:11:58 +0100 Alessandro Vesely wrote: >> char *payload = mnl_attr_get_payload(attr[NFQA_PAYLOAD]); >> if (payload) >> { >> int const af = (payload[0] & 0xf); > > Heck, should be af = (payload[0] &0xf0)>>4 = 0x6 > > third time I change it... > > > Best > Ale > char *payload = mnl_attr_get_payload(attr[NFQA_PAYLOAD]); before this line, you must check if attr[NFQA_PAYLOAD] is NULL pointer,may be it is NULL pointer