Jeremy Sowden <jeremy@xxxxxxxxxx> wrote: > Good point. I imagine I copied and pasted the types from `len`, which > also has `NLA_U32` and `u8`. It, however, is parsed correctly: > > err = nft_parse_u32_check(tb[NFTA_BITWISE_LEN], U8_MAX, &len); > if (err < 0) > return err; > > Since `len` is `u8`, `nbits` will need to be `u16`. My inclination is > to leave the netlink type as NLA_U32 and parse it as follows: > > err = nft_parse_u32_check(tb[NFTA_BITWISE_NBITS], U8_MAX * BITS_PER_BYTE, > &nbits); > if (err < 0) > return err; Yes, thats fine as well.